// Use this for initialization void Start() { //obtain necessary information if (player == null) { player = GameObject.FindGameObjectWithTag("Player"); } if (gm == null) { gm = gameObject.GetComponent <GameManagerSPM>(); } if (zombies == null) { zombies = GameObject.FindGameObjectWithTag("zombies"); } playerHealth = player.GetComponent <PlayerHealth>(); playerMaterial = player.GetComponent <PlayerMaterial>(); detectRange = player.GetComponent <PlayerMove>().detectableRange; interactiveMessage.enabled = false; changeSceneMessage.enabled = false; player.GetComponent <PlayerRoateView>().setGameManager(this); checkUpdate(); }
void Awake() { playerRenderers = GetComponentsInChildren <SkinnedMeshRenderer> (); playerMaterial = GetComponent <PlayerMaterial> (); }
void Awake() { playerRenderers = GetComponentsInChildren<SkinnedMeshRenderer> (); playerMaterial = GetComponent<PlayerMaterial> (); }