internal override void FocussedLeftOnEnemy(GameObject enemy) { if (this.gameObject.GetComponent <Attackability>()) { standardOrder = true; this.gameObject.GetComponent <Attackability>().attackState = Attackability.OPTIONS.Attack; UnitState = (this.GetComponent <Attackability>()) ? EnumProvider.ORDERSLIST.Attack : EnumProvider.ORDERSLIST.Cancel; Target = enemy; if (!UNIT.IsABuilding) { movement.SetKinematic(); MoveToPoint = Target.transform.position; movement.IsMoving = true; } IsAttacking = true; // GetComponent<Movability>().IsMoving = true; // airUnitState = (OPTIONS)EnumProvider.ORDERSLIST.Attack; standardOrder = false; } }
internal override void FocussedLeftOnGround(Vector3 worldPoint) { standardOrder = true; // IsMovingAsGroup = true; movement.SetKinematic(); // UnitState = OPTIONS.MoveTo; movement.MoveToPoint = worldPoint; movement.MovingDirection = worldPoint; // gameObject.transform.position += (Movement.MovingDirection * Movement.Speed); IsAttacking = false; Target = null; IsMoving = true; UnitState = OPTIONS.MoveTo; standardOrder = false; }