예제 #1
0
        public LightPlayer(int id, Level level)
        {
            ID = id;
            Vector2i spawnPoint = level.SpawnPoints[id % level.SpawnPoints.Count];

            Pos = new LightVect2()
            {
                X = spawnPoint.X,
                Y = spawnPoint.Y
            };
        }
예제 #2
0
        }                       // Used by Json deserialization

        public LightPlayer(Player player)
        {
            ID   = player.ID;
            Name = player.Name;
            Pos  = new LightVect2()
            {
                X = player.Rect.Left,
                Y = player.Rect.Top
            };
            State     = player.State;
            Frame     = player.Frame;
            Direction = player.Direction;
            HookPoint = new LightVect2()
            {
                X = player.HookPoint.X,
                Y = player.HookPoint.Y
            };
            Hooked       = player.Hooked;
            HasRespawned = player.HasRespawned;
        }