示例#1
0
    public override ResultType DoAction()
    {
        float value  = EnergyStation.GetInstance().Execute();
        bool  isDone = _baseSprite.ReplenishEnergy(value);

        ResultType resultType = isDone ? ResultType.Success : ResultType.Running;

        return(resultType);
    }
示例#2
0
    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);
    }