Exemplo n.º 1
0
 //method for null checking the player. Display an error message if so
 void PlayerNullCheck()
 {
     _player = GameObject.Find("Player").GetComponent <PlayerLevelThree>();
     if (_player == null)
     {
         Debug.LogError("The player is null.");
     }
 }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     _player = GameObject.Find("Player").GetComponent <PlayerLevelThree>();
     if (_player == null)
     {
         Debug.LogError("the player is null");
     }
 }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     _player = GameObject.Find("Player").GetComponent <PlayerLevelThree>(); //locating our player
     //if player is null. print a log error message
     if (_player == null)
     {
         Debug.LogError("The player is null");
     }
 }