Beispiel #1
0
    // Update is called once per frame
    public void Update()
    {
        if (fos.Count > 0 && FlowNetworkManager.testProject != null)
        {
            registerObject();
        }

        if (pastState.Equals(ft))
        {
            selected = true;
        }

        if (selected)
        {
            if (FlowNetworkManager.connection_established)
            {
                ft.Read();

                if (!pastState.Equals(ft))
                {
                    pastState.Copy(ft);
                    transformUpdateEvent.Send(ft);
                }
            }
        }
    }
Beispiel #2
0
        public void Send(FlowTObject transformToSend)
        {
            transformToSend.Read();
            obj = new FlowTObject();
            obj.Copy(transformToSend);

            project = new FlowProject(Config.projectId);
            client  = new FlowClient(Config.deviceId);

            CommandProcessor.sendCommand(this);
        }
Beispiel #3
0
        public static string Receive()
        {
            ObjectUpdateEvent trans_update_cmd = JsonUtility.FromJson <ObjectUpdateEvent>(FlowNetworkManager.reply);
            FlowTObject       local_transform  = FlowProject.activeProject.transformsById[trans_update_cmd.obj._id];

            //if (local_transform.flowObject.selected)
            //    local_transform.flowObject.selected = false;

            local_transform.Copy(trans_update_cmd.obj);
            local_transform.Update();

            local_transform.flowObject.pastState.Copy(local_transform);

            return("Receiving Transform update: " + FlowNetworkManager.reply);
        }