Example #1
0
 public void NotifyDeath(AIEntity _whoDied, AIEventNotification _event)
 {
     if (_whoDied.transform == this.m_Target)
     {
         this.Cancel();
     }
     else
     {
         this.TargetHijackEnd(_whoDied.transform);
     }
 }
Example #2
0
 public void NotifyMyDeath(AIEntity _whoDied, AIEventNotification _event)
 {
     this.Remove();
     if (!SrNetworkManager.RemoteClient)
     {
         System.Collections.Generic.List <AIEntity> list = ModdedAbilityHijack.HijackedEntities.FindAll((AIEntity x) => x.IsHijackedBy(_whoDied)).ToList <AIEntity>();
         foreach (AIEntity aientity in list)
         {
             aientity.Unhijack();
         }
     }
 }
Example #3
0
        public void AIEntityEventCallback(AIEntity _target, AIEventNotification _event)
        {
            var    agent  = (AgentAI)_target;
            string aClass = agent.AgentClassName();

            agent.m_DidRespawn = false;
            this.m_AIEntity    = null;

            DeleteAllSaves();
            Destroy(agent.gameObject);
            //Manager.Get().DoSaveGame(0);
            //Manager.GetInputControl().DoSaveGame(0);
            //Manager.GetInputControl().DoSaveAuto();
            //Manager.Get().AutoSave();
            //StartCoroutine("ShowMessage");


            Manager.Get().DoSaveGame(0);
            Manager.GetInputControl().DoSaveGame(0);
            Manager.GetInputControl().DoSaveAuto();
            Manager.Get().AutoSave();
            Manager.GetUIManager().DoModalMessageBox($"{aClass} is dead and gone", "Take a minute to mourn your lost agent.", InputBoxUi.InputBoxTypes.MbOk);
        }