Beispiel #1
0
 private void Start()
 {
     Cursor.lockState    = CursorLockMode.Locked;
     inventory.MaxWeight = 100;
     ValidItemIsAddedToInventory.AddListener(AddItemToInventory);
     UIHandler.InventoryOpened.AddListener(FreezePlayer);
     UIHandler.InventoryClosed.AddListener(UnfreezePlayer);
 }
Beispiel #2
0
    /// <summary>
    /// Called before game start
    /// </summary>
    private void Awake()
    {
        ItemPickupEvent = new ItemEvent();
        ItemPickupEvent.AddListener(Ping);
        ItemDroppedEvent = new ItemEvent();
        ItemDroppedEvent.AddListener(Ping);

        DialogOpenEvent = new DialogEvent();
        DialogOpenEvent.AddListener(Ping);
        DialogOptionSelectedEvent = new DialogOptionEvent();
        DialogOptionSelectedEvent.AddListener(Ping);

        CharacterDeathEvent = new CharacterEvent();
        CharacterDeathEvent.AddListener(Ping);

        InteractableActivatedEvent = new InteractableEvent();
    }
Beispiel #3
0
 #pragma warning disable 0108
 void Awake()
 {
     ItemEvent.AddListener(Effect);
 }
Beispiel #4
0
 //*********************************impl
 public void AddOnAddItemListener(UnityAction <Item, IBackpack> listener)
 {
     OnAddItem.AddListener(listener);
 }
 // Use this for initialization
 void Start()
 {
     gm = GameObject.Find("Main Camera").GetComponent <GameManager>();
     gotItem.AddListener(nullping);
 }
 public void AddItemListener(UnityAction <CollectibleItem.ItemID, int> cb)
 {
     m_itemGainedEvent.AddListener(cb);
 }