Example #1
0
        public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
        {
            // receive dice message
            var spawn_state = message.FromJson <SpawnMessage>();

            if (spawn_state.idx > 0)
            {
                current_piece_index = spawn_state.idx;
            }
            else
            {
                var dice_state = message.FromJson <DiceMessage>();

                player_id   = dice_state.owner_id;
                dice_result = dice_state.result;

                // receive map index message
                var map_state = message.FromJson <MapBlockMessage>();
                map_player_id    = map_state.player_id;
                map_player_index = map_state.map_index;
                map_dice_result  = map_state.map_dice_result;
                get_dice_result  = true;

                var click_state = message.FromJson <ClickMessage>();
                is_click = click_state.is_click;
                is_start = click_state.is_start;

                var buy_state = message.FromJson <BuyMapBlockMessage>();
                buy_info    = buy_state.buy_info;
                buy_map_idx = buy_state.buy_map_idx;
            }
        }
Example #2
0
        public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
        {
            var msg = message.FromJson <Message>();

            transform.localPosition = msg.transform.position; // The Message constructor will take the *local* properties of the passed transform.
            transform.localRotation = msg.transform.rotation;
            fired = msg.fired;
        }
        public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
        {
            var spawnmessage = message.FromJson <Message>();
            var ball         = Instantiate(Prefab, transform).GetComponent <SimpleBasketball>();

            ball.Id.Set(spawnmessage.newNetworkObjectId);
            ball.owner = false;
        }
Example #4
0
    public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
    {
        Message msg = message.FromJson <Message>();

        gripTargetLeft  = msg.l;
        gripTargetRight = msg.r;
        //Debug.Log("Anim Remote: " + gripCurrent + " " + gripTarget);
    }
Example #5
0
 public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
 {
     if (owner == false)
     {
         var msg = message.FromJson <Message>();
         rectTransform.position = msg.trans;
     }
     // self connection (2 rooms in one scence scenario), used in debug network code by one pc
 }
Example #6
0
        public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
        {
            owner          = false;
            rb.isKinematic = true;
            var state = message.FromJson <TransformMessage>();

            transform.position = state.position;
            transform.rotation = state.rotation;
        }
Example #7
0
        public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
        {
            // the other end has taken control of this object
            owner          = false;
            rb.isKinematic = true;

            var state = message.FromJson <TransformMessage>();

            transform.localPosition = state.position;
            transform.localRotation = state.rotation;
        }
Example #8
0
 public void ProcessMessage(ReferenceCountedSceneGraphMessage data)
 {
     try
     {
         OnRtcMessage(data.FromJson<Message>());
     }
     catch (Exception e)
     {
         Debug.LogException(e);
         return;
     }
 }
Example #9
0
        public void ProcessMessage(ReferenceCountedSceneGraphMessage data)
        {
            var message = data.FromJson <Message>();

            // Buffer messages until the RtcPeerConnection is initialised
            if (rtcPeerConnection == null)
            {
                messageQueue.Enqueue(message);
            }
            else
            {
                DoProcessMessage(message);
            }
        }
Example #10
0
    public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
    {
        if (!isMePressStartButton)
        {
            var msg = message.FromJson <Message>();
            spendTime   = msg.time;
            distroyflag = msg.distroyflag;

            /*if (!isgetposition)
             * {
             *  ClosePanel.transform.position = msg.position;
             *  isgetposition = true;
             * }*/
        }
    }
 public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
 {
     meter.Volume = message.FromJson <Message>().volume;
 }
Example #12
0
        public void ProcessMessage(ReferenceCountedSceneGraphMessage message)
        {
            var msg = message.FromJson <Message>();

            Instantiate(msg.catalogueIndex, msg.networkId, false);
        }