Ejemplo n.º 1
0
        public MotherShip(EntityID id, EntityType type, int maxHp, bool autoUpdate, int order, params ColliderBase[] colliders) : base(id, type, 0, maxHp, autoUpdate, order, SpriteBank.GetSprite("Boss_1_Damage"), SpriteBank.GetSprite("Boss_1"), null, Vector2.zero, colliders)
        {
            _animWarn = SpriteBank.GetAnimation("Boss Warning");

            _animWon   = SpriteBank.GetAnimation("Won");
            _animWonHI = SpriteBank.GetAnimation("HI-Won");

            _warning = new Entity(EntityID.PROP, EntityType.NONE, 0, 0, false, 99999, null, _animWarn, Vector2.zero);
            _lasers  = new Laser[3]
            {
                new Laser(this, 800),
                new Laser(this, 800),
                new Laser(this, 800),
            };

            _smallBullet = Program.PoolManager.GetPool <BulletPool>("Bullet_NMY");
            Sprite       = _defaultSprite;
        }
Ejemplo n.º 2
0
        public void GetControllableBullets(Entity owner, int damage, int order, float bulletSize, float lifeTime, BulletPool pool, out Bullet[] bullets, out Vector2[] positions, out Vector2[] directions)
        {
            positions  = new Vector2[_bulletCount];
            directions = new Vector2[_bulletCount];

            bullets = new Bullet[_bulletCount];

            bool[] enabled;
            int    ii = 0;

            for (int i = 0; i < _layers; i++)
            {
                enabled = _bulletEnabled[i % _bulletEnabled.Length];
                ref float[] spds = ref _speeds[i];
                ref         Vector2[] poss = ref _positions[i];