示例#1
0
    public static GOAPGoal Create(E_GOAPGoals type, Agent owner)
    {
        GOAPGoal g;

        switch (type)
        {
        case E_GOAPGoals.E_GOTO:
            g = new GOAPGoalGoTo(owner);
            break;

        case E_GOAPGoals.E_PLAY_ANIM:
            g = new GOAPGoalPlayAnim(owner);
            break;

        case E_GOAPGoals.E_IDLE_ANIM:
            g = new GOAPGoalIdleAction(owner);
            break;

        default:
            return(null);
        }

        g.InitGoal();
        return(g);
    }
示例#2
0
    public static GOAPGoal Create(E_GOAPGoals type, Agent owner)
    {
        GOAPGoal g;

        switch (type)
        {
        case E_GOAPGoals.E_ORDER_ATTACK:
            g = new GOAPGoalOrderAttack(owner);
            break;

        case E_GOAPGoals.E_ORDER_DODGE:
            g = new GOAPGoalOrderDodge(owner);
            break;

        case E_GOAPGoals.E_ORDER_USE:
            g = new GOAPGoalOrderUseWorldObject(owner);
            break;

        case E_GOAPGoals.E_GOTO:

            g = new GOAPGoalGoTo(owner);
            break;

        case E_GOAPGoals.E_COMBAT_MOVE_RIGHT:
            g = new GOAPGoalCombatMoveToRight(owner);
            break;

        case E_GOAPGoals.E_COMBAT_MOVE_LEFT:
            g = new GOAPGoalCombatMoveToLeft(owner);
            break;

        case E_GOAPGoals.E_COMBAT_MOVE_FORWARD:
            g = new GOAPGoalCombatMoveForward(owner);
            break;

        case E_GOAPGoals.E_COMBAT_MOVE_BACKWARD:
            g = new GOAPGoalCombatMoveBackward(owner);
            break;

        case E_GOAPGoals.E_LOOK_AT_TARGET:
            g = new GOAPGoalLookAtTarget(owner);
            break;

        case E_GOAPGoals.E_KILL_TARGET:
            g = new GOAPGoalKillTarget(owner);
            break;

        case E_GOAPGoals.E_DODGE:
            g = new GOAPGoalDodge(owner);
            break;

        case E_GOAPGoals.E_DO_BLOCK:
            g = new GOAPGoalDoBlock(owner);
            break;

        case E_GOAPGoals.E_ALERT:
            g = new GOAPGoalAlert(owner);
            break;

        case E_GOAPGoals.E_CALM:
            g = new GOAPGoalCalm(owner);
            break;

        case E_GOAPGoals.E_USE_WORLD_OBJECT:
            g = new GOAPGoalUseWorldObject(owner);
            break;

        case E_GOAPGoals.E_PLAY_ANIM:
            g = new GOAPGoalPlayAnim(owner);
            break;

        case E_GOAPGoals.E_IDLE_ANIM:
            g = new GOAPGoalIdleAction(owner);
            break;

        case E_GOAPGoals.E_REACT_TO_DAMAGE:
            g = new GOAPGoalReactToDamage(owner);
            break;

        case E_GOAPGoals.E_TELEPORT:
            g = new GOAPGoalTeleport(owner);
            break;

        default:
            return(null);
        }

        g.InitGoal();
        return(g);
    }