示例#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, AgentHuman owner)
    {
        GOAPGoal g;

        switch (type)
        {
        case E_GOAPGoals.Move:
            g = new GOAPGoalMove(owner);
            break;

        case E_GOAPGoals.Roll:
            g = new GOAPGoalRoll(owner);
            break;

        case E_GOAPGoals.CoverEnter:
            g = new GOAPGoalCoverEnter(owner);
            break;

        case E_GOAPGoals.CoverLeave:
            g = new GOAPGoalCoverLeave(owner);
            break;

        case E_GOAPGoals.CoverFire:
            g = new GOAPGoalCoverFire(owner);
            break;

        case E_GOAPGoals.CoverMove:
            g = new GOAPGoalCoverMove(owner);
            break;

        case E_GOAPGoals.CoverJumpOver:
            g = new GOAPGoalCoverJumpOver(owner);
            break;

        case E_GOAPGoals.WeaponReload:
            g = new GOAPGoalWeaponReload(owner);
            break;

/*			case E_GOAPGoals.WeaponChange:
 *              g = new GOAPGoalWeaponChange(owner);
 *              break;
 */
        case E_GOAPGoals.UseWorldObject:
            g = new GOAPGoalUseWorldObject(owner);
            break;

        case E_GOAPGoals.UseGadget:
            g = new GOAPGoalUseGadget(owner);
            break;

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

        case E_GOAPGoals.Melee:
            g = new GOAPGoalMelee(owner);
            break;

        default:
            Debug.LogError("GOAPGoalFactory Unknow goal " + type + " for " + owner.name);
            return(null);
        }

        g.InitGoal();
        return(g);
    }
示例#3
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);
    }