X-Git-Url: https://git.r.bdr.sh/rbdr/super-polarity/blobdiff_plain/6fceaa7b34f4d6efc497cda51679b37e530a61aa..d7a43ae2d3d4702bd199fa5d8ca84c7c6e78ed36:/SuperPolarityMac/ActorFactory.cs diff --git a/SuperPolarityMac/ActorFactory.cs b/SuperPolarityMac/ActorFactory.cs deleted file mode 100644 index f9c7697..0000000 --- a/SuperPolarityMac/ActorFactory.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Content; - -namespace SuperPolarity -{ - static class ActorFactory - { - static internal SuperPolarity Game; - - static public MainShip CreateMainShip(Vector2 position) - { - MainShip mainShip = new MainShip(Game); - mainShip.Initialize(Game.Content.Load("Graphics\\main-ship"), position); - - ActorManager.CheckIn(mainShip); - - return mainShip; - } - - static public StandardShip CreateShip(Ship.Polarity polarity, Vector2 position) - { - StandardShip ship = new StandardShip(Game); - Texture2D texture; - - if (polarity == Ship.Polarity.Positive) - { - texture = Game.Content.Load("Graphics\\positive-ship"); - } - else if (polarity == Ship.Polarity.Negative) - { - texture = Game.Content.Load("Graphics\\negative-ship"); - } - else - { - texture = Game.Content.Load("Graphics\\neutral-ship"); - } - - ship.Initialize(texture, position); - ship.SetPolarity(polarity); - - ActorManager.CheckIn(ship); - - return ship; - } - - internal static void SetGame(SuperPolarity game) - { - ActorFactory.Game = game; - } - - internal static Bullet CreateBullet(Vector2 position, float angle) - { - Bullet bullet = new Bullet(Game); - - bullet.Initialize(Game.Content.Load("Graphics\\square"), position); - - bullet.Angle = angle; - - ActorManager.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("Graphics\\positive-scout"); - } - else if (polarity == Ship.Polarity.Negative) - { - texture = Game.Content.Load("Graphics\\negative-scout"); - } - else - { - texture = Game.Content.Load("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.2f; - ship.FleeVelocity = 6.5f; - ship.ChargeVelocity = 5.5f; - ship.Value = 3; - ship.HP = 0; - ship.AngleChangeProbability = 20; - ship.SetPolarity(polarity); - - ActorManager.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("Graphics\\positive-cruiser"); - } - else if (polarity == Ship.Polarity.Negative) - { - texture = Game.Content.Load("Graphics\\negative-cruiser"); - } - else - { - texture = Game.Content.Load("Graphics\\neutral-cruiser"); - } - - ship.BoxDimensions.X = 40; - ship.BoxDimensions.Y = 40; - ship.BoxDimensions.W = 40; - ship.BoxDimensions.Z = 40; - - ship.Initialize(texture, position); - ship.MagneticRadius = 1000; - ship.RepelRadius = 200; - ship.MaxVelocity = 0.5f; - ship.FleeVelocity = 5; - ship.ChargeVelocity = 1; - ship.Value = 10; - ship.HP = 29; - ship.SetPolarity(polarity); - - ActorManager.CheckIn(ship); - - return ship; - } - } -}