public override void Load() { gunner1 = new Gunner { PadIndex = PlayerIndex.One, Color = Color.Red, Location = new Vector2(200, 0), Speed = 0.5f }; gunner2 = new Gunner { PadIndex = PlayerIndex.Two, Color = Color.Blue, Location = new Vector2(400, 0), Speed = 0.5f }; powerGenerator1 = new PowerGenerator(); powerGenerator2 = new PowerGenerator(); players.Add (gunner1); players.Add (gunner2); Size screenSize = new Size (Moxy.ScreenWidth, Moxy.ScreenHeight); camera = new DynamicCamera (); //camera.Targets.AddRange (new Player[] {gunner1, gunner2}); }
public TrishotEffect(Gunner Target) { this.Target = Target; Duration = new TimeSpan(0, 0, 20); SkillID = 1; }
private void LoadPlayers() { float gunnerSpeed = 0.2f;//0.1f; float enchanterSpeed = 0.3f; PlayerIndex invalidPlayerIndex = (PlayerIndex)5; if (characterSelectState.Gunner1 != invalidPlayerIndex || characterSelectState.PowerGenerator1 != invalidPlayerIndex) { gunner1 = new Gunner { PadIndex = characterSelectState.Gunner1, Color = Color.White, Location = new Vector2 (700, 700), Speed = gunnerSpeed, Light = new Light (Color.White, lightTexture) { Scale = 1.5f }, Team = Team.Red, FireballEmitter = FireballEmitter, AIControlled = characterSelectState.Gunner1 == invalidPlayerIndex, }; // Gunner 1 is controlled by AI if (gunner1.PadIndex == invalidPlayerIndex) { gunner1.PadIndex = GenerateAIIndex(); gunner1.AIControlled = true; } powerGenerator1 = new PowerGenerator { PadIndex = characterSelectState.PowerGenerator1, Color = Color.White, Location = new Vector2 (780, 700), Speed = enchanterSpeed, Light = new Light (Color.White, lightTexture) { Scale = 1.5f }, Team = Team.Red, Gunner = gunner1, AIControlled = characterSelectState.PowerGenerator1 == invalidPlayerIndex, }; // Power gen 1 is controlled by AI if (powerGenerator1.PadIndex == invalidPlayerIndex) { powerGenerator1.PadIndex = GenerateAIIndex (); powerGenerator1.AIControlled = true; } gunner1.OnMovement += (Player_OnMovement); powerGenerator1.OnMovement += (Player_OnMovement); gunner1.OnDeath += (Player_OnDeath); gunner1.Generator = powerGenerator1; redPacketEmitter.Target = gunner1; redPacketEmitter.Source = powerGenerator1; lights.Add (gunner1.Light); lights.Add (powerGenerator1.Light); players.Add (gunner1); players.Add (powerGenerator1); camera.ViewTargets.Add (gunner1); camera.ViewTargets.Add (powerGenerator1); } if (characterSelectState.Gunner2 != invalidPlayerIndex || characterSelectState.PowerGenerator2 != invalidPlayerIndex) { gunner2 = new Gunner { PadIndex = characterSelectState.Gunner2, Color = Color.White, Location = new Vector2 (200, 0), Speed = gunnerSpeed, Light = new Light (Color.White, lightTexture), Team = Team.Red, FireballEmitter = FireballEmitter }; powerGenerator2 = new PowerGenerator { PadIndex = characterSelectState.PowerGenerator2, Color = Color.White, Location = new Vector2 (400, 0), Speed = enchanterSpeed, Light = new Light (Color.White, lightTexture), Team = Team.Red, Gunner = gunner2, }; gunner2.Generator = powerGenerator2; redPacketEmitter.Target = gunner2; redPacketEmitter.Source = powerGenerator2; lights.Add (gunner2.Light); lights.Add (powerGenerator2.Light); players.Add (gunner2); players.Add (powerGenerator2); camera.ViewTargets.Add (gunner2); camera.ViewTargets.Add (powerGenerator2); } uiOverlay.ActivePlayers = players; }