void Start() { GameStateScript.addStateListener(this); transforms = PlayerScript.GetAllPlayerTransforms(); pointTransforms = new Transform[transforms.Length]; for (int i = 0; i < transforms.Length; i++) { GameObject tmp = (GameObject)Instantiate(playerPointPrefab); pointTransforms[i] = tmp.transform; Vector3 originalScale = pointTransforms[i].localScale; pointTransforms[i].parent = transform.parent; pointTransforms[i].localScale = originalScale; if (i == 0) { UISprite sprite = tmp.GetComponent <UISprite>(); sprite.color = new Color(1, 0.2f, 0.2f); sprite.depth = 10; } } updatePosition(); }
void Start() { GameStateScript.addStateListener(this); // AudioSource mainAudio = FindObjectOfType(typeof(AudioSource)); //mainAudio = GetComponents<AudioSource>(); audio1 = playerCamera.GetComponents <AudioSource>(); /* foreach (HingeJoint joint in hingeJoints) { * joint.useSpring = false; * }*/ //audio1 = playerCamera[0]; }
void Start() { GameStateScript.addStateListener(this); }
void Start() { GameStateScript.addStateListener(this); player = PlayerScript.FindPlayerById(playerId); }