public Mobile(Player player, Vector2 position, MobileType mobileType, bool IsSummon = false) : base() { ProjectileList = new List <Projectile>(); UnusedProjectile = new List <Projectile>(); LastCreatedProjectileList = new List <Projectile>(); UninitializedProjectileList = new List <Projectile>(); ItemsUnderEffectList = new List <ItemType>(); MobileType = mobileType; Owner = player; movingSE = AssetHandler.Instance.RequestSoundEffect(SoundEffectParameter.MobileMovement(mobileType)); unableToMoveSE = AssetHandler.Instance.RequestSoundEffect(SoundEffectParameter.MobileUnableToMove(mobileType)); this.IsSummon = IsSummon; IsPlayable = GameInformation.Instance.IsOwnedByPlayer(this) && !IsSummon; if (IsPlayable) { Movement = new LocalMovement(this); } else if (!IsSummon) { Movement = new RemoteMovement(this); } MobileMetadata = MobileMetadata.BuildMobileMetadata(player, mobileType); Position = position; MobileFlipbook = MobileFlipbook.CreateMobileFlipbook(MobileType, position); if (!IsSummon) { Rider = new Rider(this); if (MobileType != MobileType.Random) { Crosshair = new Crosshair(this); } } //Sync SyncMobile = new SyncMobile(); SyncMobile.Owner = player; SyncMobile.Position = Position.ToArray <int>(); SyncMobile.MobileMetadata = MobileMetadata.BuildMobileMetadata(player, player.PrimaryMobile); SyncPosition = Position; IsAlive = true; IsActionsLocked = false; hasShotSequenceStarted = false; #if DEBUG DebugHandler.Instance.Add(debugCrosshair); DebugHandler.Instance.Add(debugCrosshair2); #endif }
public SyncMobile(Player player, int[] position) { Owner = player; MobileMetadata = MobileMetadata.BuildMobileMetadata(player, player.PrimaryMobile); Position = position; SynchronizableActionList = new List <SynchronizableAction>(); Facing = Facing.Left; IsAlive = true; AimPreset aimPreset = MobileMetadata.MobileAimPreset[ShotType.S1]; CrosshairAngle = (aimPreset.AimTrueRotationMax + aimPreset.AimTrueRotationMin) / 2; }
internal static void InitializeObjects() { ConfigFileManager.CreateConfigFile(RequesterApplication.Launcher); ConfigFileManager.LoadConfigFile(RequesterApplication.Launcher); Parameter.Initialize(new LauncherInformation( LauncherOperationStatus.AuthConfirmed, ConfigFileManager.ReadClientInformation(), GameInformation.Instance.PlayerInformation = new Player() { ID = 0, Gender = Gender.Female, Nickname = "Winged", //SelectedItemTypeList, })); GameInformation.Instance.PlayerInformation.SelectedItemTypeList.Add(ItemType.PowerUp); GameInformation.Instance.PlayerInformation.SelectedItemTypeList.Add(ItemType.PowerUp); GameInformation.Instance.PlayerInformation.SelectedItemTypeList.Add(ItemType.BungeShot); GameInformation.Instance.PlayerInformation.SelectedItemTypeList.Add(ItemType.BungeShot); GameInformation.Instance.PlayerInformation.SelectedItemTypeList.Add(ItemType.Blood); GameInformation.Instance.PlayerInformation.SelectedItemTypeList.Add(ItemType.Blood); #region Sync Mobile List List <Player> pList = new List <Player>() { new Player() { Gender = Gender.Female, Email = "*****@*****.**", ID = 0, Nickname = "Wicked", Password = "******", PlayerRank = PlayerRank.Staff4, PlayerRoomStatus = PlayerRoomStatus.Ready, PrimaryMobile = MobileType.Ice, SecondaryMobile = MobileType.Knight, PlayerTeam = PlayerTeam.Red, Guild = new Guild() { GuildMembers = new List <Player>(), ID = 1, Name = "Zica", Tag = "zicamasters" }, PlayerStatus = PlayerStatus.Normal, SecurityToken = new SecurityToken() { DateTime = DateTime.Now, Token = "123123123", UnifiedSecurityToken = "123123123" }, Attribute = new int[] { 1, 1, 1, 1, 1, 1, 1, 1 }, }, new Player() { Gender = Gender.Male, Email = "*****@*****.**", ID = 1, Nickname = "Zicoman", Password = "******", PlayerRank = PlayerRank.Dragon1, PlayerRoomStatus = PlayerRoomStatus.Ready, PrimaryMobile = MobileType.Lightning, SecondaryMobile = MobileType.Knight, PlayerTeam = PlayerTeam.Blue, Guild = new Guild() { GuildMembers = new List <Player>(), ID = 1, Name = "Zica", Tag = "zicamasters" }, PlayerStatus = PlayerStatus.Normal, SecurityToken = new SecurityToken() { DateTime = DateTime.Now, Token = "123123123", UnifiedSecurityToken = "123123123" } }, new Player() { Email = "*****@*****.**", ID = 2, Nickname = "Big String To Test The Box Size Calc", Password = "******", PlayerRank = PlayerRank.Axe1, PlayerRoomStatus = PlayerRoomStatus.Ready, PrimaryMobile = MobileType.Knight, SecondaryMobile = MobileType.Knight, PlayerTeam = PlayerTeam.Red, Guild = new Guild() { GuildMembers = new List <Player>(), ID = 1, Name = "Zica", Tag = "zicamasters" }, PlayerStatus = PlayerStatus.Normal, SecurityToken = new SecurityToken() { DateTime = DateTime.Now, Token = "123123123", UnifiedSecurityToken = "123123123" } }, new Player() { Email = "*****@*****.**", ID = 3, Nickname = "Wicko", Password = "******", PlayerRank = PlayerRank.GM, PlayerRoomStatus = PlayerRoomStatus.Ready, PrimaryMobile = MobileType.Dragon, SecondaryMobile = MobileType.Knight, PlayerTeam = PlayerTeam.Blue, Guild = new Guild() { GuildMembers = new List <Player>(), ID = 1, Name = "Zica", Tag = "zicamasters" }, PlayerStatus = PlayerStatus.Normal, SecurityToken = new SecurityToken() { DateTime = DateTime.Now, Token = "123123123", UnifiedSecurityToken = "123123123" } }, new Player() { Email = "*****@*****.**", ID = 4, Nickname = "WickoWicko", Password = "******", PlayerRank = PlayerRank.DGoldenAxe2, PlayerRoomStatus = PlayerRoomStatus.Ready, PrimaryMobile = MobileType.Dragon, SecondaryMobile = MobileType.Knight, PlayerTeam = PlayerTeam.Blue, Guild = new Guild() { GuildMembers = new List <Player>(), ID = 1, Name = "Zica", Tag = "zicamasters" }, PlayerStatus = PlayerStatus.Normal, SecurityToken = new SecurityToken() { DateTime = DateTime.Now, Token = "123123123", UnifiedSecurityToken = "123123123" } }, new Player() { Email = "*****@*****.**", ID = 5, Nickname = "Ordinary World", Password = "******", PlayerRank = PlayerRank.Chick, PlayerRoomStatus = PlayerRoomStatus.Ready, PrimaryMobile = MobileType.Turtle, SecondaryMobile = MobileType.Knight, PlayerTeam = PlayerTeam.Blue, Guild = new Guild() { GuildMembers = new List <Player>(), ID = 1, Name = "Zica", Tag = "zicamasters" }, PlayerStatus = PlayerStatus.Normal, SecurityToken = new SecurityToken() { DateTime = DateTime.Now, Token = "123123123", UnifiedSecurityToken = "123123123" } }, new Player() { Email = "*****@*****.**", ID = 6, Nickname = "KonoDioDa", Password = "******", PlayerRank = PlayerRank.Champion1, PlayerRoomStatus = PlayerRoomStatus.Ready, PrimaryMobile = MobileType.Dragon, SecondaryMobile = MobileType.Knight, PlayerTeam = PlayerTeam.Red, Guild = new Guild() { GuildMembers = new List <Player>(), ID = 1, Name = "Zica", Tag = "zicamasters" }, PlayerStatus = PlayerStatus.Normal, SecurityToken = new SecurityToken() { DateTime = DateTime.Now, Token = "123123123", UnifiedSecurityToken = "123123123" } }, new Player() { Gender = Gender.Female, Email = "*****@*****.**", ID = 7, Nickname = "JosephJoestar", Password = "******", PlayerRank = PlayerRank.Axe1, PlayerRoomStatus = PlayerRoomStatus.Ready, PrimaryMobile = MobileType.RaonLauncher, SecondaryMobile = MobileType.Knight, PlayerTeam = PlayerTeam.Red, Guild = new Guild() { GuildMembers = new List <Player>(), ID = 1, Name = "Zica", Tag = "zicamasters" }, PlayerStatus = PlayerStatus.Normal, SecurityToken = new SecurityToken() { DateTime = DateTime.Now, Token = "123123123", UnifiedSecurityToken = "123123123" } } }; sMobList = new List <SyncMobile>(); sMobList.Add(new SyncMobile() { CrosshairAngle = 10, Delay = 500, //Facing = Facing.Left, MobileMetadata = MobileMetadata.BuildMobileMetadata(pList[0], MobileType.Lightning), Owner = pList[0], Position = new int[] { 340, 100 }, SelectedShotType = ShotType.SS, SynchronizableActionList = new List <SynchronizableAction>() { SynchronizableAction.LeftMovement, SynchronizableAction.ChargingShot } }); sMobList.Add(new SyncMobile() { CrosshairAngle = 10, Delay = 500, //Facing = Facing.Left, MobileMetadata = MobileMetadata.BuildMobileMetadata(pList[1], MobileType.Knight), Owner = pList[1], Position = new int[] { 1, 0 }, SelectedShotType = ShotType.SS, SynchronizableActionList = new List <SynchronizableAction>() { SynchronizableAction.LeftMovement, SynchronizableAction.ChargingShot } }); sMobList.Add(new SyncMobile() { CrosshairAngle = 10, Delay = 500, //Facing = Facing.Left, MobileMetadata = MobileMetadata.BuildMobileMetadata(pList[2], MobileType.Knight), Owner = pList[2], Position = new int[] { 1, 0 }, SelectedShotType = ShotType.SS, SynchronizableActionList = new List <SynchronizableAction>() { SynchronizableAction.LeftMovement, SynchronizableAction.ChargingShot } }); sMobList.Add(new SyncMobile() { CrosshairAngle = 10, Delay = 500, //Facing = Facing.Left, MobileMetadata = MobileMetadata.BuildMobileMetadata(pList[3], MobileType.Knight), Owner = pList[3], Position = new int[] { 1, 0 }, SelectedShotType = ShotType.SS, SynchronizableActionList = new List <SynchronizableAction>() { SynchronizableAction.LeftMovement, SynchronizableAction.ChargingShot } }); sMobList.Add(new SyncMobile() { CrosshairAngle = 10, Delay = 500, //Facing = Facing.Left, MobileMetadata = MobileMetadata.BuildMobileMetadata(pList[4], MobileType.Knight), Owner = pList[4], Position = new int[] { 1, 0 }, SelectedShotType = ShotType.SS, SynchronizableActionList = new List <SynchronizableAction>() { SynchronizableAction.LeftMovement, SynchronizableAction.ChargingShot } }); sMobList.Add(new SyncMobile() { CrosshairAngle = 10, Delay = 500, //Facing = Facing.Left, MobileMetadata = MobileMetadata.BuildMobileMetadata(pList[5], MobileType.Knight), Owner = pList[5], Position = new int[] { 1, 0 }, SelectedShotType = ShotType.SS, SynchronizableActionList = new List <SynchronizableAction>() { SynchronizableAction.LeftMovement, SynchronizableAction.ChargingShot } }); sMobList.Add(new SyncMobile() { CrosshairAngle = 10, Delay = 500, //Facing = Facing.Left, MobileMetadata = MobileMetadata.BuildMobileMetadata(pList[6], MobileType.Knight), Owner = pList[6], Position = new int[] { 1, 0 }, SelectedShotType = ShotType.SS, SynchronizableActionList = new List <SynchronizableAction>() { SynchronizableAction.LeftMovement, SynchronizableAction.ChargingShot } }); sMobList.Add(new SyncMobile() { CrosshairAngle = 10, Delay = 500, //Facing = Facing.Left, MobileMetadata = MobileMetadata.BuildMobileMetadata(pList[7], MobileType.Knight), Owner = pList[7], Position = new int[] { 1, 0 }, SelectedShotType = ShotType.SS, SynchronizableActionList = new List <SynchronizableAction>() { SynchronizableAction.LeftMovement, SynchronizableAction.ChargingShot } }); #endregion //delayboard = new Delayboard(mobList, new Vector2(0, 0) /* Parameter.ScreenCenter */); GameInformation.Instance.RoomMetadata = new RoomMetadata(GameMode.Score, TurnsToSuddenDeath.Turn40, MatchSuddenDeathType.DoubleDeath, RoomSize.FourVsFour, sMobList[0].Owner, 1, "123", "123") { SpawnPositions = new Dictionary <int, int[]>() { { 0, new int[] { 1150, 700 } }, { 1, new int[] { 300, 700 } }, { 2, new int[] { 700, 700 } }, { 3, new int[] { 400, 700 } }, { 4, new int[] { 800, 700 } }, { 5, new int[] { 500, 700 } }, { 6, new int[] { 900, 700 } }, { 7, new int[] { 600, 700 } }, { 8, new int[] { 1000, 700 } }, }, TeamA = new List <Player>() { sMobList[0].Owner, sMobList[1].Owner, sMobList[2].Owner, sMobList[3].Owner }, TeamB = new List <Player>() { sMobList[4].Owner, sMobList[5].Owner, sMobList[6].Owner, sMobList[7].Owner }, }; GameInformation.Instance.RoomMetadata.Map = Map.GetMap(GameMapType.B, GameMap.Metamine); }