void Awake() { Transform = transform; GameObject = gameObject; AnimSet = GetComponent <AnimSet> (); Memory = new Memory(); WorldState = new WorldState(); GoapManager = new GOAPManager(this); CharacterController = Transform.GetComponent <CharacterController> (); CollisionCenter = CharacterController.center; Sound = Transform.GetComponent <ComponentSounds> (); BlackBoard.Owner = this; BlackBoard.myGameObject = GameObject; ResetAgent(); SetWorldState(); WorldState.SetWSProperty(E_PropKey.E_LOOKING_AT_TARGET, false); WorldState.SetWSProperty(E_PropKey.E_USE_WORLD_OBJECT, false); EnableCollisions(); //t = GameObject.Find ("GameObject").transform; }
/// <summary> /// Call Repaint on OnInspectorUpdate as it repaints the windows /// less times as if it was OnGUI/Update /// </summary> void OnInspectorUpdate() { if (!gOAPManager) { gOAPManager = FindObjectOfType <GOAPManager>(); } allAgents = FindObjectsOfType <AgentBase>(); Repaint(); }
void Awake() { BlackBoard = GetComponent <BlackBoard>(); AnimEngine = GetComponent <Animation>(); Transform = GetComponent <Transform>(); CharacterController = GetComponent <CharacterController>(); AnimSet = GetComponent <AnimSet>(); _animFsm = GetComponent <Fsm>(); _input = GetComponent <PlayerInput>(); _goapMgr = GetComponent <GOAPManager>(); _audioEffect = GetComponent <AudioSource>(); }
void Awake() { Transform = transform; GameObject = gameObject; AnimSet = GetComponent <AnimSet>(); WorldState = new WorldState(); GOAPManager = new GOAPManager(this); CharacterController = transform.GetComponent <CharacterController>(); CollisionCenter = CharacterController.center; BlackBoard.Owner = this; BlackBoard.myGameObject = GameObject; AnimSet = GetComponent <AnimSet>(); t = GameObject.Find("GameObject").transform; }
//only once throught whole level void Awake() { Transform = transform; GameObject = gameObject; Audio = GetComponent <AudioSource>(); CharacterController = Transform.GetComponent <CharacterController>(); CollisionCenter = CharacterController.center; BlackBoard.Owner = this; BlackBoard.myGameObject = GameObject; AnimSet = GetComponent <AnimSet>(); WorldState = new WorldState(); Memory = new Memory(); m_GoalManager = new GOAPManager(this); ResetAgent(); WorldState.SetWSProperty(E_PropKey.E_ORDER, AgentOrder.E_OrderType.E_NONE); WorldState.SetWSProperty(E_PropKey.E_IDLING, true); WorldState.SetWSProperty(E_PropKey.E_AT_TARGET_POS, true); WorldState.SetWSProperty(E_PropKey.E_ATTACK_TARGET, false); WorldState.SetWSProperty(E_PropKey.E_LOOKING_AT_TARGET, false); WorldState.SetWSProperty(E_PropKey.E_USE_WORLD_OBJECT, false); WorldState.SetWSProperty(E_PropKey.E_PLAY_ANIM, false); WorldState.SetWSProperty(E_PropKey.E_IN_DODGE, false); WorldState.SetWSProperty(E_PropKey.E_IN_WEAPONS_RANGE, false); WorldState.SetWSProperty(E_PropKey.E_WEAPON_IN_HANDS, false); WorldState.SetWSProperty(E_PropKey.E_IN_BLOCK, false); WorldState.SetWSProperty(E_PropKey.E_ALERTED, false); WorldState.SetWSProperty(E_PropKey.E_IN_COMBAT_RANGE, false); WorldState.SetWSProperty(E_PropKey.E_AHEAD_OF_ENEMY, false); WorldState.SetWSProperty(E_PropKey.E_BEHIND_ENEMY, false); WorldState.SetWSProperty(E_PropKey.MoveToRight, false); WorldState.SetWSProperty(E_PropKey.MoveToLeft, false); WorldState.SetWSProperty(E_PropKey.E_TELEPORT, false); WorldState.SetWSProperty(E_PropKey.E_EVENT, E_EventTypes.None); //SetupActions(); //SetupGoals(); }
public GOAPAgent() { planner = new GOAPManager(this); }