Esempio n. 1
0
        public void CheckCollide(Entities.PlayerShip ship)
        {
            var collb = ship.Collider.Collide(ship.X, ship.Y, (int)Global.HIT_TYPES.PICKUP);

            if (collb != null)
            {
                Entities.Pickup b = (Entities.Pickup)collb.Entity;
                b.OnPickup(ship);
                this.Pickups.Remove(b);
            }
        }
Esempio n. 2
0
        public void SpawnRandomUpgrade(float x, float y, object instance = null)
        {
            /*switch(rand.Next(1, PickupManager.UpgradeCount))
             * {
             *  case (Int16)PICKUPTYPES.UPGRADE_WEAPON_PRIMARY:
             *
             *      break;
             * }*/
            Int32 type = rand.Next(1, PickupManager.UpgradeCount);

            Entities.Pickup pickup = new Entities.Pickup(x, y, (Int16)type);
            this.Pickups.Add(pickup);
            Game.Instance.Scene.Add(pickup);
        }