Exemplo n.º 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Exemplo n.º 2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 3
0
 void Start()
 {
     tapToStart         = GameObject.FindGameObjectWithTag("C1").GetComponent <TapToStart>();
     isbu               = false;
     isfu               = false;
     playerBreak        = false;
     isDead             = false;
     enemy_AI           = GameObject.Find("Enemy").GetComponent <Enemy_AI>();
     isPlayerWon        = false;
     player_Rigidbody   = GetComponent <Rigidbody>();
     isJumpLimitReached = false;
 }
Exemplo n.º 4
0
 void Start()
 {
     tapToStart            = GameObject.FindGameObjectWithTag("C1").GetComponent <TapToStart>();
     enemyBreak            = false;
     isDead                = false;
     enemyAnimator         = GetComponent <Animator>();
     isEnemyWon            = false;
     isBreakableEnemyTouch = false;
     enemy_Rigidbody       = GetComponent <Rigidbody>();
     isJumpLimitReached    = false;
     player_Movement       = GameObject.Find("PlayerNew").GetComponent <Player_Movement>();
 }