Esempio n. 1
0
    public static GOAPAction Create(E_GOAPAction type, Agent owner)
    {
        GOAPAction a;

        switch (type)
        {
        case E_GOAPAction.move:
            a = new GOAPActionMove(owner);
            break;

        case E_GOAPAction.gotoPos:
            a = new GOAPActionGoTo(owner);
            break;

        case E_GOAPAction.weaponShow:
            a = new GOAPActionWeaponShow(owner);
            break;

        case E_GOAPAction.weaponHide:
            a = new GOAPActionWeaponHide(owner);
            break;

        default:
            Debug.LogError("GOAPActionFactory -  unknow state " + type);
            return(null);
        }

        a.InitAction();
        return(a);
    }
Esempio n. 2
0
    public static GOAPAction Create(E_GOAPAction type, AgentHuman owner)
    {
        GOAPAction a;

        switch (type)
        {
        case E_GOAPAction.Move:
            a = new GOAPActionMove(owner);
            break;

        case E_GOAPAction.Goto:
            a = new GOAPActionGoTo(owner);
            break;

        case E_GOAPAction.Roll:
            a = new GOAPActionRoll(owner);
            break;

/*			case E_GOAPAction.WeaponChange:
 *              a = new GOAPActionWeaponChange(owner);
 *              break;
 */
        case E_GOAPAction.WeaponReload:
            a = new GOAPActionWeaponReload(owner);
            break;

        case E_GOAPAction.Use:
            a = new GOAPActionUse(owner);
            break;

        case E_GOAPAction.UseGadget:
            a = new GOAPActionUseGadget(owner);
            break;

        case E_GOAPAction.PlayAnim:
            a = new GOAPActionPlayAnim(owner);
            break;

        case E_GOAPAction.CoverEnter:
            a = new GOAPActionCoverEnter(owner);
            break;

        case E_GOAPAction.CoverMove:
            a = new GOAPActionCoverMove(owner);
            break;

        case E_GOAPAction.CoverFire:
            a = new GOAPActionCoverFire(owner);
            break;

        case E_GOAPAction.CoverLeave:
            a = new GOAPActionCoverLeave(owner);
            break;

        case E_GOAPAction.CoverJumpOverPlayer:
            a = new GOAPActionCoverJumpOverPlayer(owner);
            break;

        case E_GOAPAction.CoverLeaveRightLeft:
            a = new GOAPActionCoverLeaveRightLeft(owner);
            break;

        case E_GOAPAction.Melee:
            a = new GOAPActionMelee(owner);
            break;

        default:
            Debug.LogError("GOAPActionFactory -  unknow state " + type);
            return(null);
        }

        a.InitAction();
        return(a);
    }
Esempio n. 3
0
    public static GOAPAction Create(E_GOAPAction type, Agent owner)
    {
        GOAPAction a;

        switch (type)
        {
        case E_GOAPAction.move:
            a = new GOAPActionMove(owner);
            break;

        case E_GOAPAction.gotoPos:
            a = new GOAPActionGoTo(owner);
            break;

        case E_GOAPAction.combatMoveRight:
            a = new GOAPActionCombatMoveToRight(owner);
            break;

        case E_GOAPAction.combatMoveLeft:
            a = new GOAPActionCombatMoveToLeft(owner);
            break;

        case E_GOAPAction.combatMoveForward:
            a = new GOAPActionCombatMoveForward(owner);
            break;

        case E_GOAPAction.combatMoveBackward:
            a = new GOAPActionCombatMoveBackward(owner);
            break;

        case E_GOAPAction.combatRunForward:
            a = new GOAPActionCombatRunForward(owner);
            break;

        case E_GOAPAction.combatRunBackward:
            a = new GOAPActionCombatRunBackward(owner);
            break;

        case E_GOAPAction.lookatTarget:
            a = new GOAPActionLookAtTarget(owner);
            break;

        case E_GOAPAction.gotoMeleeRange:
            a = new GOAPActionGoToMeleeRange(owner);
            break;

        case E_GOAPAction.weaponShow:
            a = new GOAPActionWeaponShow(owner);
            break;

        case E_GOAPAction.weaponHide:
            a = new GOAPActionWeaponHide(owner);
            break;

        case E_GOAPAction.attackMeleeOnce:
            a = new GOAPActionAttackMeleeOnce(owner);
            break;

        case E_GOAPAction.attackBerserk:
            a = new GOAPActionAttackBerserk(owner);
            break;

        case E_GOAPAction.attackWhirl:
            a = new GOAPActionAttackWhirl(owner);
            break;

        case E_GOAPAction.attackCounter:
            a = new GOAPActionAttackCounter(owner);
            break;

        case E_GOAPAction.attackMeleeTwoSwords:
            a = new GOAPActionAttackMeleeTwoSwords(owner);
            break;

        case E_GOAPAction.attackBow:
            a = new GOAPActionAttackBow(owner);
            break;

        case E_GOAPAction.orderAttack:
            a = new GOAPActionOrderAttack(owner);
            break;

        case E_GOAPAction.attackBoss:
            a = new GOAPActionAttackBossSpecial(owner);
            break;

        case E_GOAPAction.attackRoll:
            a = new GOAPActionAttackRoll(owner);
            break;

        case E_GOAPAction.orderDodge:
            a = new GOAPActioOrderDodge(owner);
            break;

        case E_GOAPAction.rollToTarget:
            a = new GOAPActionRollToTarget(owner);
            break;

        case E_GOAPAction.useLever:
            a = new GOAPActionUseLever(owner);
            break;

        case E_GOAPAction.playAnim:
            a = new GOAPActionPlayAnim(owner);
            break;

        case E_GOAPAction.injury:
            a = new GOAPActionInjury(owner);
            break;

        case E_GOAPAction.injuryOrochi:
            a = new GOAPActionInjuryOrochi(owner);
            break;

        case E_GOAPAction.death:
            a = new GOAPActionDeath(owner);
            break;

        case E_GOAPAction.block:
            a = new GOAPActionBlock(owner);
            break;

        case E_GOAPAction.tount:
            a = new GOAPActionIdleActionTount(owner);
            break;

        case E_GOAPAction.knockdown:
            a = new GOAPActionKnockdown(owner);
            break;

        case E_GOAPAction.teleport:
            a = new GOAPActionTeleport(owner);
            break;

        default:
            Debug.LogError("GOAPActionFactory -  unknow state " + type);
            return(null);
        }

        a.InitAction();
        return(a);
    }