private void Awake() { statsPanel.SetStats(GameObject.FindGameObjectWithTag("CharacterStat").GetComponent <CharacterStats>()); statsPanel.UpdateStatValues(); // Setup Events // RightClick inventory.OnRightClickEvent += InventoryRightClick; equipmentPanel.OnRightClickEvent += EquipmentPanelRightClick; // Pointer Enter inventory.OnPointerEnterEvent += ShowTooltip; equipmentPanel.OnPointerEnterEvent += ShowTooltip; // Point Exit inventory.OnPointerExitEvent += HideTooltip; equipmentPanel.OnPointerExitEvent += HideTooltip; // Begin Drag inventory.OnBeginDragEvent += BeginDrag; equipmentPanel.OnBeginDragEvent += BeginDrag; // End Drag inventory.OnEndDragEvent += EndDrag; equipmentPanel.OnEndDragEvent += EndDrag; // Drag inventory.OnDragEvent += Drag; equipmentPanel.OnDragEvent += Drag; // Drop inventory.OnDropEvent += Drop; equipmentPanel.OnDropEvent += Drop; itemSaveManager.LoadEquipment(this); itemSaveManager.LoadInventory(this); }
private void Awake() { statPanel.SetStats(Strength, Agility, Intelligence, Defence, Damage, HP, Mana, DodgeChance, CritChance); statPanel.UpdateStatValues(); Inventory.OnRightClickEvent += InventoryRightClick; EquipmentPanel.OnRightClickEvent += EquipmentPanelRightClick; Inventory.OnPointerEnterEvent += ShowTooltip; EquipmentPanel.OnPointerEnterEvent += ShowTooltip; Inventory.OnPointerExitEvent += HideTooltip; EquipmentPanel.OnPointerExitEvent += HideTooltip; Inventory.OnBeginDragEvent += BeginDrag; EquipmentPanel.OnBeginDragEvent += BeginDrag; Inventory.OnEndDragEvent += EndDrag; EquipmentPanel.OnEndDragEvent += EndDrag; Inventory.OnDragEvent += Drag; EquipmentPanel.OnDragEvent += Drag; Inventory.OnDropEvent += Drop; EquipmentPanel.OnDropEvent += Drop; itemSaveManager.LoadEquipment(this); itemSaveManager.LoadInventory(this); }
private void Start() { if (itemSaveManager != null) { itemSaveManager.LoadEquipment(this); itemSaveManager.LoadInventory(this); } }
private void Start() { if (itemSaveManager != null) { itemSaveManager.LoadEquipment(this); itemSaveManager.LoadInventory(this); } playerNumber = GameHandler.Instance.AddCharacter(this); }
private void Start() { if (itemTooltip == null) { itemTooltip = FindObjectOfType <ItemTooltip>(); } statPanel.SetStats(Strength, Agility, Intelligence, Vitality); statPanel.UpdateStatValues(); //Setup Events; //Right Click Inventory.OnRigtClickEvent += InventoryRightClick; EquipmentPanel.OnRigtClickEvent += EquipmentPanelRightClick; //Pointer Enter Inventory.OnPointerEnterEvent += ShowTooltip; EquipmentPanel.OnPointerEnterEvent += ShowTooltip; craftingWindow.OnPointerEnterEvent += ShowTooltip; //Pointer Exit Inventory.OnPointerExitEvent += HideTooltip; EquipmentPanel.OnPointerExitEvent += HideTooltip; craftingWindow.OnPointerExitEvent += HideTooltip; //Begin Drag Inventory.OnBeginDragEvent += BeginDrag; EquipmentPanel.OnBeginDragEvent += BeginDrag; //End Drag Inventory.OnEndDragEvet += EndDrag; EquipmentPanel.OnEndDragEvet += EndDrag; //Drag Inventory.OnDragEvent += Drag; EquipmentPanel.OnDragEvent += Drag; //Drop Inventory.OnDropEvent += Drop; EquipmentPanel.OnDropEvent += Drop; dropItemArea.OnDropEvent += DropItemOutSideUI; itemSaveManager.LoadEquipment(this); itemSaveManager.LoadInventory(this); }
public void Init() { statPanel.SetStats(player.Health, player.Mana, player.Stamina, player.Attack, player.MagicAttack, player.BowAttack, player.Defense, player.AttackSpeed, player.Vitality, player.Crit, player.Spirit, player.Endurance, player.Strength, player.Dexterity, player.Intelligence, player.Agility, player.Toughness); statPanel.UpdateStatValues(); im = InventoryManager.instance; //Setup Events: //RightClick inventory.OnRightClickEvent += InventoryRightClick; equipmentPanel.OnRightClickEvent += EquipmentPanelRightClick; //Pointer Enter inventory.OnPointerEnterEvent += ShowTooltip; equipmentPanel.OnPointerEnterEvent += ShowTooltip; craftingWindow.OnPointerEnterEvent += ShowTooltip; //Pointer Exit inventory.OnPointerExitEvent += HideTooltip; equipmentPanel.OnPointerExitEvent += HideTooltip; craftingWindow.OnPointerExitEvent += HideTooltip; //Begin Drag inventory.OnBeginDragEvent += im.BeginDrag; equipmentPanel.OnBeginDragEvent += im.BeginDrag; //End Drag inventory.OnEndDragEvent += im.EndDrag; equipmentPanel.OnEndDragEvent += im.EndDrag; //Drag inventory.OnDragEvent += im.Drag; equipmentPanel.OnDragEvent += im.Drag; //Drop inventory.OnDropEvent += im.Drop; equipmentPanel.OnDropEvent += im.Drop; dropItemArea.OnDropEvent += im.DropItemOutsideUI; itemSaveManager.LoadEquipment(this); itemSaveManager.LoadInventory(this); curPanel = invPanel; }