示例#1
0
 private void Awake()
 {
     foreach (StoryEventContainer PstoryEvent in _storyEvents)
     {
         if (PstoryEvent._storyEventTriggerType == TriggerType.Awake)
         {
             if (PstoryEvent.CanExecuteStoryEvent())
             {
                 StoryEventManager.QueStoryEvents(PstoryEvent._storyEventsToPlay, PstoryEvent._eventName);
             }
         }
     }
 }
示例#2
0
 private void OnTriggerExit(Collider other)
 {
     foreach (StoryEventContainer PstoryEvent in _storyEvents)
     {
         if (PstoryEvent._storyEventTriggerType == TriggerType.TriggerExit)
         {
             if (PstoryEvent.CanExecuteStoryEvent(other.gameObject))
             {
                 StoryEventManager.QueStoryEvents(PstoryEvent._storyEventsToPlay, PstoryEvent._eventName);
                 return;
             }
         }
     }
 }
示例#3
0
    public void OnItemInteract(PlayerController owningPlayer)
    {
        Debug.Log("interact");

        foreach (StoryEventContainer PstoryEvent in _storyEvents)
        {
            if (PstoryEvent._storyEventTriggerType == TriggerType.Interact)
            {
                if (PstoryEvent.CanExecuteStoryEvent())
                {
                    StoryEventManager.QueStoryEvents(PstoryEvent._storyEventsToPlay, PstoryEvent._eventName);
                    return;
                }
            }
        }
    }