public void ResurrectPlayerAtLastRestartPoint() { Player.WorldPosition = RestartPosition; Player.Mirror = RestartsFacingLeft; Player.Activate(); Player.StartTimerToResurrectionCompleted(); }
public static Player.Player LoadPlayer(XElement playerData) { Player.Player player = Factory.CreateAndRegisterPlayer(); player.CreateBonesFromDataManager(Definitions.Avatar_Skeleton_Side); player.SkinBones(AvatarComponentManager.SideFacingAvatarSkin(Profile.Settings.SelectedAvatarSlot)); player.CustomSkinSlotIndex = Profile.Settings.SelectedAvatarSlot; player.WorldPosition = new Vector2((float)playerData.Attribute("x"), (float)playerData.Attribute("y")) + new Vector2(Definitions.Grid_Cell_Pixel_Size / 2.0f); player.Mirror = (bool)playerData.Attribute("startfacingleft"); player.Activate(); return(player); }