Пример #1
0
        public override void ProcessMessage(Guid clientId, JediumBehaviourMessage message)
        {
            if (message.GetType() != typeof(JediumTransformMessage))
            {
                return;
            }

            Console.WriteLine("______PROCESSING TRANSFORM MESSAGE");

            JediumTransformMessage amsg = (JediumTransformMessage)message;


            _posX   = amsg.X;
            _posY   = amsg.Y;
            _posZ   = amsg.Z;
            _quatX  = amsg.RotX;
            _quatY  = amsg.RotY;
            _quatZ  = amsg.RotZ;
            _quatW  = amsg.RotW;
            _scaleX = amsg.ScaleX;
            _scaleY = amsg.ScaleY;
            _scaleZ = amsg.ScaleZ;

            //CRASH
            // if(_parent==null)
            //     Console.WriteLine("_______NULL PARENT");
            // if(_parent.Actor==null)
            //     Console.WriteLine("___NULL ACTOR");

            _parent.Actor.SendMessageToRegisteredClients(Guid.Empty, message).Wait();

            Console.WriteLine("______END PROCESSING TRANSFORM MESSAGE");
        }
Пример #2
0
        public override void ProcessMessage(Guid clientId, JediumBehaviourMessage message)
        {
            if (message.GetType() != typeof(JediumTakeMessage))
            {
                return;
            }

            _parent.Actor.SendMessageToRegisteredClients(Guid.Empty, message);
        }
Пример #3
0
        public override void ProcessMessage(Guid clientId, JediumBehaviourMessage message)
        {
            //stub
            if (message.GetType() != typeof(JediumAnimatorMessage))
            {
                return;
            }

            _parent.Actor.SendMessageToRegisteredClients(clientId, message);
        }
Пример #4
0
        public override bool ProcessUpdate(JediumBehaviourMessage message)
        {
            if (message == null) //empty update
            {
                return(false);
            }

            if (message.GetBehaviourType() != TYPEBEHAVIOUR.GetTypeIndex(GetComponentType()))
            {
                Debug.Log("WRONG MESSAGE TYPE:" + message.GetBehaviourType() + ";" + message.GetType());
                return(false);
            }

            JediumTestBehaviourMessage tmsg = (JediumTestBehaviourMessage)message;

            Debug.Log("__GOT TEST MESSAGE:" + tmsg.SomeTestMessage);
            return(true);
        }