This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "code": 0, | |
| "response": { | |
| "NetworkCons": [ | |
| { | |
| "Network": { | |
| "_id": "517046e52bb163132b000000", | |
| "created": { | |
| "sec": 1366312677, | |
| "usec": 567000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void)pullAllNetworkConRequestsSuccess:(NSDictionary *)result { | |
| User *user = [[[CodifyDataStore sharedInstance] getLoggedAccount] user]; | |
| [user saveInNetworkConRequestsDetails:[result valueForKey:@"NetworkRequests"]]; | |
| // Add network profiles if there are any | |
| NSArray *networkProfiles = [result valueForKeyPath:@"NetworkProfiles"]; | |
| if(networkProfiles && [networkProfiles count]>0) { | |
| NSManagedObjectContext *moc = [[CodifyDataStore sharedInstance] managedObjectContext]; | |
| NetworkConnectRequest *networkConnectRequest = [NetworkConnectRequest getNetworkConnectRequestWithId:[[[[result valueForKey:@"NetworkRequests"] objectAtIndex:0] valueForKey:@"NetworkRequest"] valueForKey:@"_id"] withManagedObjectContext:moc]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function identify() { | |
| $data = @$this->params['form']; | |
| unset($data['api_key']); | |
| unset($data['auth_token']); | |
| // CakeLog::write('debug', '[identified_users_controller.php] [params] ' . print_r($data, true)); | |
| $owner = $this->User->getWithId($this->loggedUser['User']['_id']); | |
| // queue task to recognize static shares |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "stat":{ | |
| "type":"ViewWillAppear", | |
| "value":"UINavigationController", | |
| "detail":"", | |
| "datetime":"1375686236.725499" | |
| }, | |
| "stat":{ | |
| "type":"ViewWillAppear", | |
| "value":"AddUsers", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1 class StatsController < ApplicationController | |
| 2 | |
| 3 protect_from_forgery :except => :create | |
| 4 def create | |
| 5 | |
| 6 if Stat.create(params) | |
| 7 {:success=>1}.to_json | |
| 8 else | |
| 9 {:succes=>0}.to_json | |
| 10 end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class StatsController < ApplicationController | |
| respond_to :json | |
| protect_from_forgery :except => :create | |
| def create | |
| params[:stats].each do |stat| | |
| puts stat | |
| Stat.create(stat) | |
| end | |
| r = {:succes=>true} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public class HumanPlayer : MonoBehaviour { | |
| // Where the actor wants to be | |
| Vector3 finalTargetPosition; | |
| // Where the actor needs to go first in order to get to the final target | |
| Vector3 targetPosition; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void) applySmudgeWithOrigin: (CGPoint)origin: (CGPoint)direction { | |
| CGPoint oldOrigin; | |
| oldOrigin.x=origin.x; | |
| oldOrigin.y=origin.y; | |
| origin.x= invModelViewMatrix2d.a*oldOrigin.x+ | |
| invModelViewMatrix2d.c*oldOrigin.y+ | |
| invModelViewMatrix2d.tx; | |
| origin.y= invModelViewMatrix2d.b*oldOrigin.x+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void ActivateVehicle() { | |
| // Get it moving! | |
| vehicle.constantForce.enabled = true; | |
| // Switch to vehicle camera | |
| Camera.mainCamera.GetComponent<SmoothLookAt>().enabled = false; | |
| Camera.mainCamera.GetComponent<MouseOrbit>().enabled = true; | |
| // Target the vehicle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void DeactivateVehicle() { | |
| isRunning = false; | |
| HumanPlayer hp = FindObjectOfType(typeof(HumanPlayer)) as HumanPlayer; | |
| hp.Respawn(transform.position+2*Vector3.up); | |
| hp.rigidbody.velocity = 2*transform.eulerAngles; | |
| // Stop it's movement | |
| constantForce.enabled = false; | |