예제 #1
0
 void Update()
 {
     this.transform.position = player.transform.position + (Vector3)Direction;
     if (timer.shouldDestroy())
     {
         Destroy(this.gameObject);
     }
 }
예제 #2
0
 void Update()
 {
     this.gameObject.GetComponent <Rigidbody2D>().transform.Rotate(Vector3.forward * Time.deltaTime * 500);
     this.transform.position = player.transform.position;
     if (timer.shouldDestroy())
     {
         Destroy(this.gameObject);
     }
 }
예제 #3
0
 void Update()
 {
     this.transform.position = player.transform.position;
     if (timer.shouldDestroy())
     {
         player.characterClass.ps.LoseAttackDamage(2);
         player.characterClass.ps.GainDefense(1);
         Destroy(this.gameObject);
     }
 }