Example #1
0
 // 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();
 }
Example #2
0
 void Awake()
 {
     playerRenderers = GetComponentsInChildren <SkinnedMeshRenderer> ();
     playerMaterial  = GetComponent <PlayerMaterial> ();
 }
 void Awake()
 {
     playerRenderers = GetComponentsInChildren<SkinnedMeshRenderer> ();
     playerMaterial = GetComponent<PlayerMaterial> ();
 }