egInt GameLength = 300; //in seconds // Use this for initialization void egAwake() { print("egAwake"); // initialize SUKI if (Skeleton == null) { Skeleton = GameObject.Find("Tracking Avatar").GetComponent <SkeletonData> (); } if (netskeleton == null) { netskeleton = GameObject.Find("Tracking Avatar").GetComponent <NetworkSkeleton> (); } suki = Suki.SukiInput.Instance; suki.Skeleton = Skeleton; print("egAwake:Trying to connect..."); // connect the client skeleton to the server skeleton (running in the enablegames launcher app) string address = PlayerPrefs.GetString(egParameterStrings.LAUNCHER_ADDRESS); print("Address= " + address); NetworkClientConnect.Instance.Connect(address); print("egAwake:after connect."); // Bind Speed to the variable "STARTING SPEED" from the settings menu //NOTE:Binding will be skipped if ParameterHandler not loaded (i.e. running this scene //without first running MainMenu scene) //Also, parameters must be added to DefaultParameters.json file (located in StreamingAssets folder). VariableHandler.Instance.Register(ParameterStrings.STARTING_SPEED, Speed); //VariableHandler.Instance.Register (ParameterStrings.GRAVITY, Gravity); VariableHandler.Instance.Register(egParameterStrings.GAME_LENGTH, GameLength); print("Speed=" + Speed); //print ("Gravity=" + Gravity); print("GameLength=" + GameLength); }
// Use this for initialization void egAwake() { print("egAwake"); // initialize SUKI if (Skeleton == null) { Skeleton = GameObject.Find("Tracking Avatar").GetComponent <SkeletonData>(); } if (netskeleton == null) { netskeleton = GameObject.Find("Tracking Avatar").GetComponent <NetworkSkeleton>(); } suki = Suki.SukiInput.Instance; suki.Skeleton = Skeleton; print("egAwake:Trying to connect..."); // connect the client skeleton to the server skeleton (running in the enablegames launcher app) string address = PlayerPrefs.GetString(egParameterStrings.LAUNCHER_ADDRESS); print("Address= " + address); NetworkClientConnect.Instance.Connect(address); print("egAwake:after connect."); //Bind Speed to the variable "STARTING SPEED" from the settings menu //NOTE:Binding will be skipped if ParameterHandler not loaded (i.e. running this scene //without first running MainMenu scene VariableHandler.Instance.Register(CBParameterStrings.STARTING_SPEED, Speed); VariableHandler.Instance.Register(CBParameterStrings.BALL_SIZE_WIDTH, maxSize); VariableHandler.Instance.Register(egParameterStrings.GAME_LENGTH, GameLength); PlayerObject.localScale += new Vector3(0, maxSize, 0); print("Speed=" + Speed); print("GameLength=" + GameLength); }