コード例 #1
0
 public void Restart()
 {
     currentState            = OwlbertStates.IDLE;
     _currentNodeIndex       = 0;
     _currentTarget          = TravelNodes[_currentNodeIndex].transform.position;
     this.transform.position = StartPoint.position;
     Invoke("StartMoving", 3);
 }
コード例 #2
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.name == "SwipHitBox")
     {
         _theGameManager.PapaPointsText.rectTransform.position = Camera.main.WorldToScreenPoint(new Vector2(col.transform.position.x + 1, col.transform.position.y));
         _theGameManager.PapaPointsText.text = "+30";
         Invoke("ResetText", 1);
         myGameManager.TheAuidoManager.PlaySFX(AudioLoader.instance.OwlbertHit);
         currentState = OwlbertStates.DEATH;
     }
 }
コード例 #3
0
 public void Death()
 {
     currentState            = OwlbertStates.IDLE;
     myRigidbody.velocity    = Vector2.zero;
     this.transform.position = new Vector3(500, 500, 500);
     if (myGameManager.OwlbertLives > 0)
     {
         myGameManager.OwlbertLives--;
     }
     else
     {
         myGameManager.GameOver();
     }
 }
コード例 #4
0
 private void StartMoving()
 {
     currentState = OwlbertStates.FOLLOWROUTE;
 }