Exemplo n.º 1
0
 private void Awake()
 {
     _stachContainer = StachContainer.Instance;
     _switchScene    = SwitchScene.Instance;
     ActiveNotification(false);
     ActiveNextButton(true);
 }
Exemplo n.º 2
0
 public ItemPickUp()
 {
     stach_container           = StachContainer.Instance;
     inventory_container       = InventoryContainer.Instance;
     otherBonusController      = OtherBonusController.Instance;
     hardSkillsController      = HardSkillsController.Instance;
     characterStatusController = CharacterStatusController.Instance;
 }
Exemplo n.º 3
0
 public ItemPickUp(ItemPickUp_Template itemPickUp_Template)
 {
     itemDefinition            = itemPickUp_Template;
     stach_container           = StachContainer.Instance;
     inventory_container       = InventoryContainer.Instance;
     otherBonusController      = OtherBonusController.Instance;
     hardSkillsController      = HardSkillsController.Instance;
     characterStatusController = CharacterStatusController.Instance;
 }
Exemplo n.º 4
0
    protected void Start()
    {
        _found_player    = GameObject.FindGameObjectWithTag("Player");
        _inv_container   = _found_player.GetComponentInChildren <InventoryContainer>();
        _stach_container = _found_player.GetComponentInChildren <StachContainer>();

        // Setup Events:
        // Left Click
        inv_container_display.OnLeftClickEvent.AddListener(InventoryLeftClick);
        storage_container_display.OnLeftClickEvent.AddListener(StachLeftClick);

        // right click
        inv_container_display.OnRightClickEvent.AddListener(InventoryLeftClick);
        storage_container_display.OnRightClickEvent.AddListener(StachLeftClick);

        // Pointer Enter
        inv_container_display.OnPointEnterEvent.AddListener(ShowTooltip);
        storage_container_display.OnPointEnterEvent.AddListener(ShowTooltip);
        // Pointer Exit
        inv_container_display.OnPointExitEvent.AddListener(HideTooltip);
        storage_container_display.OnPointExitEvent.AddListener(HideTooltip);

        //BeginDrag
        inv_container_display.OnBeginDragEvent.AddListener(BeginDrag);
        storage_container_display.OnBeginDragEvent.AddListener(BeginDrag);
        // End Drag
        inv_container_display.OnEndDragEvent.AddListener(EndDrag);
        storage_container_display.OnEndDragEvent.AddListener(EndDrag);
        // Drag
        inv_container_display.OnDragEvent.AddListener(Drag);
        storage_container_display.OnDragEvent.AddListener(Drag);
        // Drop
        inv_container_display.OnDropEvent.AddListener(Drop);
        storage_container_display.OnDropEvent.AddListener(Drop);

        Reset();
        draggableItem.gameObject.SetActive(false);
    }
Exemplo n.º 5
0
    private void Start()
    {
        //fonud inventory container in main Scene
        found_player = GameObject.FindGameObjectWithTag("Player");
        container    = found_player.GetComponentInChildren <StachContainer>();

        container.OnStachUpdated.AddListener(OnStachUpdatedHandler);

        for (int index = 0; index < StachItemSlots.Count; index++)
        {
            StachItemSlots[index].OnLeftClickEvent.AddListener(OnLeftClickEventHandler);
            StachItemSlots[index].OnRightClickEvent.AddListener(OnRightClickEventHandler);
            StachItemSlots[index].OnBeginDragEvent.AddListener(OnBeginDragEventHandler);
            StachItemSlots[index].OnEndDragEvent.AddListener(OnEndDragEventHandler);
            StachItemSlots[index].OnDragEvent.AddListener(OnDragEventHandler);
            StachItemSlots[index].OnDropEvent.AddListener(OnDropEventHandler);
            StachItemSlots[index].OnPointEnterEvent.AddListener(OnPointEnterEventHandler);
            StachItemSlots[index].OnPointExitEvent.AddListener(OnPointExitEventHandler);
            StachItemSlots[index].INDEX = index;
        }

        displayed = false;
    }