diff options
| author | Ben Beltran <ben@nsovocal.com> | 2013-11-22 06:53:08 -0600 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2013-11-22 06:53:08 -0600 |
| commit | 097781e6ad3f7bb1c13c16ff7b6bb7219764fb29 (patch) | |
| tree | 3ff629e90f2814d886ae2bbe484f64da824dbdf2 /Super Polarity/ActorFactory.cs | |
| parent | 74c155708d85abfc2cf227c08de4f27003015b3f (diff) | |
Stuffffffff
Diffstat (limited to 'Super Polarity/ActorFactory.cs')
| -rw-r--r-- | Super Polarity/ActorFactory.cs | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/Super Polarity/ActorFactory.cs b/Super Polarity/ActorFactory.cs index 3a2dbab..9995707 100644 --- a/Super Polarity/ActorFactory.cs +++ b/Super Polarity/ActorFactory.cs @@ -18,6 +18,7 @@ namespace SuperPolarity mainShip.Initialize(Game.Content.Load<Texture2D>("Graphics\\main-ship"), position); ActorManager.CheckIn(mainShip); + Renderer.CheckIn(mainShip); return mainShip; } @@ -44,6 +45,7 @@ namespace SuperPolarity ship.SetPolarity(polarity); ActorManager.CheckIn(ship); + Renderer.CheckIn(ship); return ship; } @@ -62,8 +64,84 @@ namespace SuperPolarity bullet.Angle = angle; ActorManager.CheckIn(bullet); + Renderer.CheckIn(bullet); return bullet; } + + static public StandardShip CreateScout(Ship.Polarity polarity, Vector2 position) + { + StandardShip ship = new StandardShip(Game); + Texture2D texture; + + if (polarity == Ship.Polarity.Positive) + { + texture = Game.Content.Load<Texture2D>("Graphics\\positive-scout"); + } + else if (polarity == Ship.Polarity.Negative) + { + texture = Game.Content.Load<Texture2D>("Graphics\\negative-scout"); + } + else + { + texture = Game.Content.Load<Texture2D>("Graphics\\neutral-scout"); + } + + ship.BoxDimensions.X = 10; + ship.BoxDimensions.Y = 10; + ship.BoxDimensions.W = 10; + ship.BoxDimensions.Z = 10; + + ship.Initialize(texture, position); + ship.MaxVelocity = 5.5f; + ship.FleeVelocity = 6.5f; + ship.ChargeVelocity = 5.5f; + ship.Value = 3; + ship.HP = 0; + ship.AngleChangeProbability = 20; + ship.SetPolarity(polarity); + + ActorManager.CheckIn(ship); + Renderer.CheckIn(ship); + + return ship; + } + + static public StandardShip CreateCruiser(Ship.Polarity polarity, Vector2 position) + { + StandardShip ship = new StandardShip(Game); + Texture2D texture; + + if (polarity == Ship.Polarity.Positive) + { + texture = Game.Content.Load<Texture2D>("Graphics\\positive-cruiser"); + } + else if (polarity == Ship.Polarity.Negative) + { + texture = Game.Content.Load<Texture2D>("Graphics\\negative-cruiser"); + } + else + { + texture = Game.Content.Load<Texture2D>("Graphics\\neutral-cruiser"); + } + + ship.BoxDimensions.X = 40; + ship.BoxDimensions.Y = 40; + ship.BoxDimensions.W = 40; + ship.BoxDimensions.Z = 40; + + ship.Initialize(texture, position); + ship.MaxVelocity = 0.5f; + ship.FleeVelocity = 5; + ship.ChargeVelocity = 1; + ship.Value = 10; + ship.HP = 9; + ship.SetPolarity(polarity); + + ActorManager.CheckIn(ship); + Renderer.CheckIn(ship); + + return ship; + } } } |