Beispiel #1
0
    void updateInput()
    {
        var dir = Util.GetInput();

        if (!lastDir.Equals(dir))
        {
            var d = self.data.Clone();
            d.Vel = dir;
            conn.SendMessage(new Msg.CMove {
                Id  = d.Id,
                Vel = d.Vel,
                Pos = d.Pos,
            });
        }
        lastDir = dir.Clone();
    }
Beispiel #2
0
 public void setCamPos(Msg.Vector2 pos)
 {
     transform.position = new Vector3(pos.X, 10, pos.Y);
 }