public override ResultType DoAction() { float value = EnergyStation.GetInstance().Execute(); bool isDone = _baseSprite.ReplenishEnergy(value); ResultType resultType = isDone ? ResultType.Success : ResultType.Running; return(resultType); }
public IMove GetIMove(TargetTypeEnum targetType) { IMove iMove = null; if (targetType == TargetTypeEnum.ENEMY) { iMove = MoveEnemy(); } else if (targetType == TargetTypeEnum.ENERY_SUPPLY) { iMove = EnergyStation.GetInstance(); } else if (targetType == TargetTypeEnum.PATROL) { iMove = PatrolMove(); } return(iMove); }