コード例 #1
0
        public void ToggleSunPointLightModel(bool toggleOn)
        {
            sunPointLightModel.SetActive(toggleOn);

            //send networkMessage
            KomodoMessage message = new KomodoMessage("light", JsonUtility.ToJson(new LightProperties {
                isRendering = toggleOn, lightType = LightType.Point
            }));

            message.Send();
        }
コード例 #2
0
        public void SendGroupUpdate(int _entityID, int _groupID, bool isAdding)
        {
            KomodoMessage km = new KomodoMessage("group", JsonUtility.ToJson(
                                                     new GroupProperties
            {
                entityID = _entityID,
                groupID  = _groupID,
                isAdding = isAdding
            })
                                                 );

            km.Send();
        }
コード例 #3
0
        public void SendPrimitiveUpdate(int sID, int primitiveType, float scale = 1, Vector3 primitivePos = default, Vector4 primitiveRot = default)
        {
            var drawUpdate = new Primitive(
                (int)NetworkUpdateHandler.Instance.client_id,
                sID,
                (int)primitiveType,
                scale,
                primitivePos,
                primitiveRot
                );

            var primSer = JsonUtility.ToJson(drawUpdate);

            KomodoMessage komodoMessage = new KomodoMessage("primitive", primSer);

            komodoMessage.Send();
        }