Exemplo n.º 1
0
        public void LoadContent(ContentManager Content)
        {
            storm = new Storm(Content);
            destructibles = new List<Destructible>();
            debris = new List<Debris>();

            MediumBuilding medbdg1 = new MediumBuilding(Content, new Vector2(300, 300));
            MediumBuilding medbdg2 = new MediumBuilding(Content, new Vector2(450, 300));
            MediumBuilding medbdg3 = new MediumBuilding(Content, new Vector2(370, 300));
            MediumBuilding medbdg5 = new MediumBuilding(Content, new Vector2(400, 100));
            MediumBuilding medbdg4 = new MediumBuilding(Content, new Vector2(220, 100));
            MediumBuilding medbdg6 = new MediumBuilding(Content, new Vector2(300, 100));
            destructibles.Add(medbdg1);
            destructibles.Add(medbdg2);
            destructibles.Add(medbdg3);
            destructibles.Add(medbdg4);
            destructibles.Add(medbdg5);
            destructibles.Add(medbdg6);

            StartingDebris = new LargeDebris();
            StartingDebris.Position = new Vector2(250, 100);
            debris.Add(StartingDebris);
            StartingDebris.StartOrbiting();

            Debris d1 = new LargeDebris();
            d1.Position = new Vector2(200, 400);
            debris.Add(d1);

            //Debris d2 = new LargeDebris();
            //d2.Position = new Vector2(300, 300);
            ////debris.Add(d2);
        }
Exemplo n.º 2
0
        public InventoryManager(Storm storm)
        {
            smDebriBoxTexture = Globals.Content.Load<Texture2D>("smDebrisBox");
            lgDebriBoxTexture = Globals.Content.Load<Texture2D>("lgDebrisBox");
            this.storm = storm;
            Position = new Vector2(50);

            satalliteList = new List<Item>();

            maxSpecial = 3;
            maxNormal = 10;
        }
Exemplo n.º 3
0
        public override DrawableObject onDeath(Storm storm)
        {
            isAlive = false;
            Collidable = false;

            Item item = GetRandomItem();
            if (item != null)
            {
                item.DropOnGround(Position);
                //if (item.Type == ItemType.Debris)
                //    item.Eject(item.Position);
            }

            return item;
        }
Exemplo n.º 4
0
        public void Draw(SpriteBatch spriteBatch, DrawableObjectCollection drawableObjects, Storm storm)
        {
            drawableObjects.SortList();
            spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, _camera.GetViewMatrix(Parallax));

            foreach (DrawableObject sprite in Sprites)
                sprite.Draw();

            foreach (DrawableObject dObj in drawableObjects)
            {
                dObj.Draw();
            }

            storm.Draw();

            spriteBatch.End();
        }
Exemplo n.º 5
0
 public virtual void onPickup(Storm storm)
 {
     onGround = false;
     pickupBlocked = true;
 }
Exemplo n.º 6
0
 public override void onPickup(Storm storm)
 {
     base.onPickup(storm);
 }
Exemplo n.º 7
0
 public abstract DrawableObject onDeath(Storm storm);
Exemplo n.º 8
0
        public void Update(GameTime gameTime, Storm storm)
        {
            if (isOrbiting)
            {
                time += (float)gameTime.ElapsedGameTime.TotalSeconds;
                Speed += WindAcceleration;
                RotationAngle = (RotationAngle + -0.02f) % (MathHelper.Pi * 2);
                UpdateDamage();

                if (!CooldownReady && time > Cooldown)
                {
                    CooldownReady = true;
                }
                theta = (theta + Speed) % 360;
                BoundingBox = new Rectangle((int)Position.X, (int)Position.Y, BoundingBox.Width, BoundingBox.Height);
            }
            else
            {
                storm.AttachNearbyDebris(this);
            }
        }
Exemplo n.º 9
0
 public Debris(Storm storm)
 {
     this.storm = storm;
     Initialize();
      _debugLine = new Texture2D(Globals.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
 }
Exemplo n.º 10
0
 public virtual void UpdateAI(Storm storm)
 {
 }
Exemplo n.º 11
0
        public virtual void Update(Storm storm)
        {
            if (isOrbiting)
            {
                time += (float)Globals.GameTime.ElapsedGameTime.TotalSeconds;
                Rotation = (Rotation + -0.02f) % (MathHelper.Pi * 2);
                UpdateDamage();

                if (!CooldownReady && time > Cooldown)
                {
                    CooldownReady = true;
                }
            }
            else if(isEjecting)
            {
                pickUpDelay += (float)Globals.GameTime.ElapsedGameTime.TotalSeconds;
                if (pickUpDelay >= pickUpDelayTimer)
                {
                    isEjecting = false;
                    pickUpDelay = 0.0f;
                    Velocity *= AIRDRAG;
                }
            }
            else
            {
                Velocity *= AIRDRAG;
                UpdateAI(storm);
            }
        }
Exemplo n.º 12
0
        public void ResetManagers()
        {
            dataObjects = new List<string>();
            drawableObjects = new DrawableObjectCollection();

            LoadLevelFile(levelFileName);
            storm = new Storm(startingLocation);
            stormFront = new StormFront(new Vector2(0, Height /2));
            drawableObjects.Add(stormFront);
            clickImage = new AnimatedObject("ClickAnimation", Vector2.Zero, Vector2.One, 0, 0.1f, 500);
            clickImage.Collidable = false;
            UpdateCamera();
        }
Exemplo n.º 13
0
 public override DrawableObject onDeath(Storm storm)
 {
     return null;
 }