protected new virtual void End(string reason)
 {
     if (reactable != null)
     {
         reactable.PairEmote(null);
         reactable.Cleanup();
         reactable = null;
     }
     base.End(reason);
 }
 private void RegisterReactEmotePair(string reactable_id, string kanim_file_name, float max_trigger_time)
 {
     if (!((Object)base.gameObject == (Object)null))
     {
         ReactionMonitor.Instance sMI = base.gameObject.GetSMI <ReactionMonitor.Instance>();
         if (sMI != null)
         {
             EmoteChore emoteChore = new EmoteChore(base.gameObject.GetComponent <ChoreProvider>(), Db.Get().ChoreTypes.EmoteIdle, kanim_file_name, new HashedString[1]
             {
                 "react"
             }, null);
             SelfEmoteReactable selfEmoteReactable = new SelfEmoteReactable(base.gameObject, reactable_id, Db.Get().ChoreTypes.Cough, kanim_file_name, max_trigger_time, 20f, float.PositiveInfinity);
             emoteChore.PairReactable(selfEmoteReactable);
             selfEmoteReactable.AddStep(new EmoteReactable.EmoteStep
             {
                 anim = (HashedString)"react"
             });
             selfEmoteReactable.PairEmote(emoteChore);
             sMI.AddOneshotReactable(selfEmoteReactable);
         }
     }
 }
Beispiel #3
0
 public void RegisterHitReaction()
 {
     ReactionMonitor.Instance sMI = base.gameObject.GetSMI <ReactionMonitor.Instance>();
     if (sMI != null)
     {
         SelfEmoteReactable selfEmoteReactable = new SelfEmoteReactable(base.gameObject, "Hit", Db.Get().ChoreTypes.Cough, "anim_hits_kanim", 0f, 1f, 1f);
         selfEmoteReactable.AddStep(new EmoteReactable.EmoteStep
         {
             anim = (HashedString)"hit"
         });
         if (!base.gameObject.GetComponent <Navigator>().IsMoving())
         {
             EmoteChore emoteChore = new EmoteChore(base.gameObject.GetComponent <ChoreProvider>(), Db.Get().ChoreTypes.EmoteIdle, "anim_hits_kanim", new HashedString[1]
             {
                 "hit"
             }, null);
             emoteChore.PairReactable(selfEmoteReactable);
             selfEmoteReactable.PairEmote(emoteChore);
         }
         sMI.AddOneshotReactable(selfEmoteReactable);
     }
 }