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); }
public GOAPGoal GetGoal(E_GOAPGoals type) { if (Goals.ContainsKey(type)) { return(Goals[type]); } return(null); }
/** * Adds the goal to the list of goals * @param the new goal */ public GOAPGoal AddGoal(E_GOAPGoals newGoal) { if (!IsGoalInGoalSet(newGoal)) { GOAPGoal goal = GOAPGoalFactory.Create(newGoal, Owner); m_GoalSet.Add(goal); return(goal); } return(null); }
/** * Adds the goal to the list of goals * @param the new goal */ public GOAPGoal AddGoal(E_GOAPGoals type) { if (Goals.ContainsKey(type) == false) { GOAPGoal goal = GOAPGoalFactory.Create(type, Owner); Goals.Add(type, goal); return(goal); } return(null); }
/** * Checks whether the goal to be added is part of the agents goals already * @return true if the goal is part of the agent's goalset */ bool IsGoalInGoalSet(E_GOAPGoals goalType) { for (int i = 0; i < m_GoalSet.Count; i++) { if (m_GoalSet [i].GoalType == goalType) { return(true); } } return(false); }
public GOAPGoal AddGoal(E_GOAPGoals newGoal) { return(GoapManager.AddGoal(newGoal)); }
public void AddGOAPGoal(E_GOAPGoals goal) { m_GoalManager.AddGoal(goal); }
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); }
protected GOAPGoal(E_GOAPGoals type, Agent ai) { GoalType = type; Owner = ai; }
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); }
public GOAPGoal AddGoal(E_GOAPGoals newGoal) { GOAPManager.AddGoal(newGoal); return(null); }
protected GOAPGoal(E_GOAPGoals type, AgentHuman owner) { GoalType = type; Owner = owner; }