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 }; }
} // 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; }