public static void TriggerInventoryUICellEnter(CellInventory cellInventory, int index) { if (InventoryUICellEnter != null) { InventoryUICellEnter(cellInventory, index); } }
public static void TriggerFightInventories(CellInventory cellInv, int index) { if (FightInventories != null) { FightInventories(cellInv, index); } }
protected virtual void Awake() { cells.Add(this); Active = true; Position = transform.position; HeroesPosition = transform.Find("positions/heroes").position; MovablesPosition = transform.Find("positions/movables").position; TokensPosition = transform.Find("positions/tokens").position; Index = int.Parse(this.name); Inventory = new CellInventory(Index); }
public void RemoveTokenCell(Token token, CellInventory inv) { int objectIndex = inv.AllTokens.IndexOf(token); if (objectIndex == -1) { return; } int cellIndex = inv.cellID; photonView.RPC("RemoveTokenCellRPC", RpcTarget.AllViaServer, new object[] { objectIndex, cellIndex }); }
void UpdateUIEnter(CellInventory cellInv, int index) { if (!isLockedFight || index == fightIndex) { if (!isLocked) { this.index = index; InventorySpotCell.cellIndex = index; for (int i = 0; i < spots.Length; i++) { if (i < cellInv.AllTokens.Count) { if (cellInv.AllTokens[i] == null) { continue; } spots[i].AddItem(cellInv.AllTokens[i]); } else if (i < cellInv.items.Count + cellInv.AllTokens.Count) { if (cellInv.items[i - cellInv.AllTokens.Count] == null) { continue; } spots[i].AddItem((Token)cellInv.items[i - cellInv.AllTokens.Count]); } else { spots[i].ClearSpot(); } } titleTransformGraphic.GetComponent <Text>().text = "Cell: " + index; titleTransformGraphic.gameObject.SetActive(true); } } }
void UpdateUIFight(CellInventory cellInv, int index) { UpdateUIEnter(cellInv, index); isLockedFight = true; fightIndex = index; }
public void ForceUpdate(CellInventory inv, int index) { isLocked = false; UpdateUIEnter(inv, index); }