Beispiel #1
0
 public Animation CreateAnimation()
 {
     Animation tmp = new Animation(Renderer.Singleton.Game);
     tmp.LoadTex(Renderer.Singleton.Content.Load<Texture2D>(TextureName));
     tmp.SetProperties(FrameSize, TimePerFrame, NoFrames);
     return tmp;
 }
 public Weapon_GaussCannonB50(Game game)
     : base(game)
 {
     WeaponMode = Mode.Cursor;
     Tex = Renderer.Singleton.GaussCannonB50;
     Bullets = new List<Bullet>();
     Name = "Gauss B50 Cannon";
     MaxHeat = 4000;
     CoolingPerSecond = 200;
     HeatPerShoot = 20;
     ShootAnim = new Animation(game);
     ShootAnim.Frames = Renderer.Singleton.Content.Load<Texture2D>("GaussCannonB50Animation");
     ShootAnim.SetProperties(new Vector2(135, 30), 0.04f, 7);
     ShootColddown = 200;
     Damage = 2;
 }
Beispiel #3
0
 public void CreateAnimation(string name, Vector2 FrameSize, float TimePerFrame, int NoFrames, Texture2D Tex)
 {
     Animation a = new Animation(Game);
     a.LoadTex(Tex);
     a.SetProperties(FrameSize, TimePerFrame, NoFrames);
     Animations.Add(name, a);
 }
Beispiel #4
0
        public void LoadContent()
        {
            Blank = Content.Load<Texture2D>("Blank");
            ConnectionTex = Content.Load<Texture2D>("Connection");
            Background1 = Content.Load<Texture2D>("BackgroundVertex");
            Background2 = Content.Load<Texture2D>("hud");
            PlayerIndicator = Content.Load<Texture2D>("PlayerIndicator");
            Background = Content.Load<Texture2D>("SpaceBackground1");
            ShipIndicator = Content.Load<Texture2D>("ShipIndicator");
            FromVertexToLevelGUI = Content.Load<Texture2D>("view system gui");
            TextBackground = Content.Load<Texture2D>("TextBackground");
            CursorTex = Content.Load<Texture2D>("Cursor");
            VertexMenuBackground = Content.Load<Texture2D>("VertexMenu");
            ViewVertexButton = Content.Load<Texture2D>("ViewButtonVertex");
            FlyToVertexButton = Content.Load<Texture2D>("FlyToButtonVertex");
            ProjectButton = Content.Load<Texture2D>("ProjectButton");
            ProjectGUI = Content.Load<Texture2D>("ProjectGUI");
            ProjectViewBackground = Content.Load<Texture2D>("ProjectViewBackground");
            SlotBackground = Content.Load<Texture2D>("SlotBackground");
            SelectedBackground = Content.Load<Texture2D>("SelectionBackground");
            SpaceStationMenuBG = Content.Load<Texture2D>("SpaceStationMenu");
            MinimapOverlay = Content.Load<Texture2D>("MinimapOverlay");
            IndicatorRed = Content.Load<Texture2D>("IndicatorRed");
            IndicatorGreen = Content.Load<Texture2D>("IndicatorGreen");
            MinimapBackground = Content.Load<Texture2D>("MinimapBackground");
            MoneyBackground = Content.Load<Texture2D>("MoneyBackground");
            GaussCannonB50 = Content.Load<Texture2D>("GaussCannonB50");
            GaussBullet = Content.Load<Texture2D>("GaussBullet");
            WeaponsMenu = Content.Load<Texture2D>("WeaponMenu");
            CheckBoxOff = Content.Load<Texture2D>("CheckBoxOff");
            CheckBoxOn = Content.Load<Texture2D>("CheckBoxOn");
            HeatGradient = Content.Load<Texture2D>("HeatGradient");
            ProgressBackground = Content.Load<Texture2D>("ProgressBackground");
            ProgressOverlay = Content.Load<Texture2D>("ProgressOverlay");
            Asteroid1 = Content.Load<Texture2D>("Asteroid1");
            MiningBeam = Content.Load<Texture2D>("MiningBeam");
            MiningLaser = Content.Load<Texture2D>("MiningLaser");
            LaserBeam = Content.Load<Texture2D>("LaserBeam");
            InventoryButton = Content.Load<Texture2D>("InventoryButton");
            InventoryBackground = Content.Load<Texture2D>("InventoryBackground");

            LoadTex("Hydrogen");
            LoadTex("Plutonium");
            LoadTex("Tungsten");
            LoadTex("BackButton");
            LoadTex("TradeComponents");
            LoadTex("TradeMaterials");
            LoadTex("BuyButton");
            LoadTex("SellButton");
            LoadTex("Background_Clouds_1");
            LoadTex("Background_Clouds_2");
            LoadTex("Particle_Engine");
            LoadTex("SmokeParticle");
            LoadTex("ShipInfo");
            LoadTex("Cerberus_B24_Destroyed");

            Animation ShipSelector = new Animation(Game);
            ShipSelector.Frames = Renderer.Singleton.Content.Load<Texture2D>("ShipSelector");
            ShipSelector.SetProperties(new Vector2(220, 220), 0.05f, 24);
            Animations.Add("ShipSelector", ShipSelector);

            Fonts.Add("Coalition", Content.Load<SpriteFont>("Font"));
            Fonts.Add("Visitor", Content.Load<SpriteFont>("Visitor_Texture"));
        }
Beispiel #5
0
        public override void Initialize()
        {
            OutsideView = Hull.OutsideView.CreateAnimation();
            InsideView = Hull.InsideView.CreateAnimation();

            EngineSound = Renderer.Singleton.Content.Load<SoundEffect>("Engines").CreateInstance();
            EngineSound.IsLooped = true;
            EngineSound.Play();

            if (Hull.OutsideColor != null)
            {
                OutsideColor = Hull.OutsideColor.CreateAnimation();
            }

            base.Initialize();

            HitPoints = (int)Hull.BasicHull;

            PresentationParameters pp = GraphicsDevice.PresentationParameters;
            Target = new RenderTarget2D(GraphicsDevice, Hull.SizeX, Hull.SizeY, 1, SurfaceFormat.Color, pp.MultiSampleType, pp.MultiSampleQuality);
        }