void Update() { this.transform.position = player.transform.position + (Vector3)Direction; if (timer.shouldDestroy()) { Destroy(this.gameObject); } }
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); } }
void Update() { this.transform.position = player.transform.position; if (timer.shouldDestroy()) { player.characterClass.ps.LoseAttackDamage(2); player.characterClass.ps.GainDefense(1); Destroy(this.gameObject); } }