public override ActionResult Execute(RAIN.Core.AI ai) { GoblinAI gob = ai.Body.GetComponent <GoblinAI>(); gob.AnimRange = GoblinAI.AI_RANGE_MOVE; return(ActionResult.SUCCESS); }
public override ActionResult Execute(RAIN.Core.AI ai) { GoblinAI gob = ai.Body.GetComponent <GoblinAI>(); gob.ExecuteAttack(); return(ActionResult.SUCCESS); }
public override ActionResult Execute(RAIN.Core.AI ai) { ai.WorkingMemory.SetItem <bool>("isMovingRandom", false); GoblinAI gob = ai.Body.GetComponent <GoblinAI>(); gob.AnimRange = GoblinAI.AI_RANGE_IDLE; return(ActionResult.SUCCESS); }
public override ActionResult Execute(RAIN.Core.AI ai) { GoblinAI gob = ai.Body.GetComponent <GoblinAI>(); gob.AnimRange = GoblinAI.AI_RANGE_ATTACK_BASH; //gob.executeAttack(); return(ActionResult.SUCCESS); }
public override ActionResult Execute(RAIN.Core.AI ai) { GoblinAI gob = ai.Body.GetComponent <GoblinAI>(); gob.AnimRange = GoblinAI.AI_RANGE_DEATH; GameObject mus = GameObject.Find("MusicController"); if (mus != null) { MusicController.LastAttackCounter = 0.0f; mus.GetComponent <MusicController>().PlaySpecialClip(mus.GetComponent <MusicController>().VictoryTracks); } return(ActionResult.SUCCESS); }
// Use this for initialization void Start() { base.Start(); Gob = this.GetComponent <GoblinAI>(); ai = this.GetComponentInChildren <AIRig>(); if (playerUW == null) { playerUW = GameObject.Find("Gronk").GetComponent <UWCharacter>(); } //playerUW = GameObject.Find ("Gronk").GetComponent<UWCharacter>(); ai.AI.WorkingMemory.SetItem <GameObject>("playerUW", playerUW.gameObject); ai.AI.Body = this.gameObject; }
public override ActionResult Execute(RAIN.Core.AI ai) { GoblinAI gob = ai.Body.GetComponent <GoblinAI>(); switch (Random.Range(0, 3)) { case 0: gob.AnimRange = GoblinAI.AI_RANGE_ATTACK_BASH; break; case 1: gob.AnimRange = GoblinAI.AI_ANIM_ATTACK_SLASH; break; case 2: gob.AnimRange = GoblinAI.AI_ANIM_ATTACK_THRUST; break; } return(ActionResult.SUCCESS); }
void Start() { GoblinAIScript = GetComponent <GoblinAI>(); GoblinShowHealthScript = GetComponent <GoblinShowHealth>(); }