Esempio n. 1
0
 public static void AIMoveToGameObjectEnable(
     this Agent agent,
     UsableMissionObject usedObject,
     Agent.AIScriptedFrameFlags scriptedFrameFlags = Agent.AIScriptedFrameFlags.NoAttack)
 {
     agent.GetComponent <UseObjectAgentComponent>()?.MoveToUsableGameObject(usedObject, scriptedFrameFlags);
 }
Esempio n. 2
0
        public override TextObject GetActionTextForStandingPoint(
            UsableMissionObject usableGameObject)
        {
            TextObject textObject = new TextObject("{=bNYm3K6b}({KEY}) Pick Up");

            textObject.SetTextVariable("KEY", Game.Current.GameTextManager.GetHotKeyGameText("CombatHotKeyCategory", 13));
            return(textObject);
        }
Esempio n. 3
0
        public override TextObject GetActionTextForStandingPoint(
            UsableMissionObject usableGameObject)
        {
            TextObject textObject = !usableGameObject.GameEntity.HasTag(this.AmmoPickUpTag) ? (!usableGameObject.GameEntity.HasTag(this.ReloadTag) ? (!usableGameObject.GameEntity.HasTag("rotate") ? (!usableGameObject.GameEntity.HasTag(this.AmmoLoadTag) ? TextObject.Empty : new TextObject("{=ibC4xPoo}({KEY}) Load Ammo")) : new TextObject("{=5wx4BF5h}({KEY}) Rotate")) : new TextObject(this.PilotStandingPoint == usableGameObject ? "{=fEQAPJ2e}({KEY}) Use" : "{=Na81xuXn}({KEY}) Rearm")) : new TextObject("{=bNYm3K6b}({KEY}) Pick Up");

            textObject.SetTextVariable("KEY", Game.Current.GameTextManager.GetHotKeyGameText("CombatHotKeyCategory", 13));
            return(textObject);
        }
 public void MoveToClear()
 {
     if (this.CurrentlyMovingGameObject != null)
     {
         this.CurrentlyMovingGameObject.OnMoveToStopped(this.Agent);
     }
     this.CurrentlyMovingGameObject = (UsableMissionObject)null;
     this.Agent.AIStateFlags       &= ~Agent.AIStateFlag.UseObjectMoving;
 }
        public void MoveToUsableGameObject(
            UsableMissionObject usedObject,
            Agent.AIScriptedFrameFlags scriptedFrameFlags = Agent.AIScriptedFrameFlags.NoAttack)
        {
            this.Agent.AIStateFlags       |= Agent.AIStateFlag.UseObjectMoving;
            this.CurrentlyMovingGameObject = usedObject;
            usedObject.OnAIMoveToUse(this.Agent);
            WorldFrame userFrameForAgent = usedObject.GetUserFrameForAgent(this.Agent);

            this.Agent.SetScriptedPositionAndDirection(ref userFrameForAgent.Origin, userFrameForAgent.Rotation.f.AsVec2.RotationInRadians, false, scriptedFrameFlags);
        }
Esempio n. 6
0
        public override TextObject GetActionTextForStandingPoint(
            UsableMissionObject usableGameObject)
        {
            if (!usableGameObject.GameEntity.HasTag(this.AmmoPickUpTag))
            {
                return(TextObject.Empty);
            }
            TextObject textObject = new TextObject("{=jfcceEoE}{PILE_TYPE} Pile");

            textObject.SetTextVariable("PILE_TYPE", new TextObject("{=1CPdu9K0}Stone"));
            return(textObject);
        }