private void MyCallBack(SyncListInt.Operation op, int index) { Debug.Log("MyCallBack"); int num = syncListTexture[index]; if (num == -1) { return; } SetTexture(gameObject, num); }
//Called when Player hand changes private void OnInventoryChanged(SyncListInt.Operation op, int index) { switch (op) { case SyncList <int> .Operation.OP_ADD: { CardSprites.CardSprite tSprite = CardSprites.InstantiateCard(mPlayerDeck [index]); tSprite.transform.position = new Vector2((float)index / 6f - 5f, 0); } break; } Debug.Log("Items changed " + op); }
private void UpdateWallText(SyncListInt.Operation op, int index) { sb = new StringBuilder(); sb.Append("Score: ").AppendLine(); for (int i = 0; i < scoreList.Count; ++i) { sb.Append("Player ").Append(i).Append(": ").Append(scoreList[i]); sb.AppendLine(); } text.text = sb.ToString(); }
private void MyCallBack(SyncListInt.Operation op, int index) { int num = syncListTexture[index]; if (num == -1) { return; } if (childCnt == 0) { SetTexture(gameObject, num); } else { GameObject target = transform.GetChild(index).gameObject; SetTexture(target, num); } }
void OnPlayerConnectionIDsUpdated(SyncListInt.Operation op, int index, int oldItem, int newItem) //SyncList.Callback { //operation is enum that specifies the operation peformed //new item and old item are pretty self explanatory but index is the index of the item that was changed print("ConnectionID's Updated"); switch (op) { case SyncListInt.Operation.OP_ADD: print("New Connection! Conn ID: " + newItem); break; case SyncListInt.Operation.OP_CLEAR: break; case SyncListInt.Operation.OP_INSERT: break; case SyncListInt.Operation.OP_REMOVEAT: break; case SyncListInt.Operation.OP_SET: break; } }
public void OnPlayerSizeChanged(SyncListInt.Operation op, int index) { Log.Write("dasdas dsaasdasd"); PlayerSize[index].value = GameManger.GetInstance().size[index]; }
private void OnSyncListPortObjectTransmitterChanged(SyncListInt.Operation op, int index) { Debug.Log("List Changed " + op); }
private void OnSyncListPortObjectReceiverChanged(SyncListInt.Operation op, int index) { Debug.Log("List changed " + op); }
public void SyncSprites(SyncListInt.Operation op, int index) { clothingSlots[index].Reference = syncEquipSprites[index]; }
void QuestionListChanged(SyncListInt.Operation op, int itemIndex) { string message = "Quest list changed: " + op + " > " + questionsSynced[itemIndex] + "\n"; //Debug.LogError(message); }
void OnChangeAmmo(SyncListInt.Operation op, int index) { playerUI.SetAmmo(ammoCache); }
public void SyncAccess(SyncListInt.Operation op, int index) { //Do anything special when the synclist changes on the client }
private void OnChanged(SyncListInt.Operation op, int index) { Debug.Log("OnChanged : " + op + " : " + this.value + " / " + this.syncList[index]); }
private void OnSequenceChanged(SyncListInt.Operation op, int index) { //Debug.Log("SyncListChange"); }
public void HandleStockUpdate(SyncListInt.Operation op, int index, int oldCount, int newCount) { StockCounters[index].text = newCount.ToString(); }
public void testlistCB(SyncListInt.Operation op, int idx) { testlist.Add(-1); print(testlist.Count); }
public void OnPlayerSizeChanged(SyncListInt.Operation op, int index) { PlayerSize[index].value = GameManger.GetInstance().size[index]; }
public void ChangeStockCount(SyncListInt.Operation op, int index, int oldItem, int newItem) { StockCounters[index].text = newItem.ToString(); }