private void OnTriggerExit(Collider playerCollider) { if (playerCollider.GetComponent <CharacterControls>()) { CharacterControls player = playerCollider.GetComponent <CharacterControls>(); player.reSpawnPosition = GetComponent <Transform>().position; player.spawnPosition = GetComponent <Transform>().position; player.timerOk = true; } }
private void Start() { player = (CharacterControls)GameObject.FindObjectOfType(typeof(CharacterControls)); timerDisplay = GetComponent <Text>(); }
void Start() { gun = GetComponent <Transform>(); player = (CharacterControls)GameObject.FindObjectOfType(typeof(CharacterControls)); }