コード例 #1
0
ファイル: SimpleClient.cs プロジェクト: wuyuntao/Synchronica
        public SimpleClient(TcpClient tcpClient, SimpleScene scene)
        {
            this.tcpClient = tcpClient;
            this.networkStream = tcpClient.GetStream();
            this.scene = scene;

            logger.Info("Connected from {0}", tcpClient.Client.RemoteEndPoint);

            ThreadPool.QueueUserWorkItem(ReadThread);
        }
コード例 #2
0
            public Cube(SimpleScene scene, float posX, float posY, float posZ)
            {
                this.scene = scene;

                this.actor = this.scene.recorder.AddActor(0, f =>
                {
                    this.posX = f.AddFloat(1, posX);
                    this.posY = f.AddFloat(2, posY);
                    this.posZ = f.AddFloat(3, posZ);
                });

                logger.Debug("Cube #{0} created: Pos: ({1}, {2}, {3}), Time: {4}",
                             this.actor.Id,
                             this.posX.GetValue(this.actor.StartTime),
                             this.posY.GetValue(this.actor.StartTime),
                             this.posZ.GetValue(this.actor.StartTime),
                             this.actor.StartTime);
            }
コード例 #3
0
ファイル: SimpleScene.cs プロジェクト: wuyuntao/Synchronica
            public Cube(SimpleScene scene, float posX, float posY, float posZ)
            {
                this.scene = scene;

                this.actor = this.scene.recorder.AddActor(0, f =>
                {
                    this.posX = f.AddFloat(1, posX);
                    this.posY = f.AddFloat(2, posY);
                    this.posZ = f.AddFloat(3, posZ);
                });

                logger.Debug("Cube #{0} created: Pos: ({1}, {2}, {3}), Time: {4}",
                        this.actor.Id,
                        this.posX.GetValue(this.actor.StartTime),
                        this.posY.GetValue(this.actor.StartTime),
                        this.posZ.GetValue(this.actor.StartTime),
                        this.actor.StartTime);
            }