private void Attack(GameObject monster) { /////////////////////////////////////////// //Local Variables PlayerActions actionController = GetComponent <PlayerActions>(); Fighter myFighter; /////////////////////////////////////////// myFighter = GetComponent <Fighter>(); myFighter.AttackTarget(monster); actionController.ActionPerformed(); }
private void SmoothMovement() { if (EnableMove == true) { transform.position = Vector3.MoveTowards(transform.position, MovePosition, Time.deltaTime * MoveTime); if (transform.position == MovePosition) { EnableMove = false; transform.position = MovePosition; if (GetComponent <Tile>().Type == TileType.TILE_PLAYER) { ActionController.ActionPerformed(); } } } }