예제 #1
0
    private void MyCallBack(SyncListInt.Operation op, int index)
    {
        Debug.Log("MyCallBack");
        int num = syncListTexture[index];

        if (num == -1)
        {
            return;
        }

        SetTexture(gameObject, num);
    }
예제 #2
0
 //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);
 }
예제 #3
0
        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();
        }
예제 #4
0
    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);
        }
    }
예제 #5
0
    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;
        }
    }
예제 #6
0
 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);
 }
예제 #9
0
 public void SyncSprites(SyncListInt.Operation op, int index)
 {
     clothingSlots[index].Reference = syncEquipSprites[index];
 }
예제 #10
0
 void QuestionListChanged(SyncListInt.Operation op, int itemIndex)
 {
     string message = "Quest list changed: " + op + " > " + questionsSynced[itemIndex] + "\n";
     //Debug.LogError(message);
 }
예제 #11
0
 void OnChangeAmmo(SyncListInt.Operation op, int index)
 {
     playerUI.SetAmmo(ammoCache);
 }
예제 #12
0
 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]);
 }
예제 #14
0
 private void OnSequenceChanged(SyncListInt.Operation op, int index)
 {
     //Debug.Log("SyncListChange");
 }
예제 #15
0
 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);
 }
예제 #17
0
 public void OnPlayerSizeChanged(SyncListInt.Operation op, int index)
 {
     PlayerSize[index].value = GameManger.GetInstance().size[index];
 }
예제 #18
0
 public void ChangeStockCount(SyncListInt.Operation op, int index, int oldItem, int newItem)
 {
     StockCounters[index].text = newItem.ToString();
 }