Пример #1
0
    private void InitWeapon()
    {
        weapons[NORMAL] = new NormalWeapon(shotPosTrans, true);
        weapons[DOUBLE] = new DoubleCannon(shotPosTrans, true);
        weapons[LASER]  = new Laser(shotPosTrans, true);

        missile = new Missile(shotPosTrans, true);

        currentWeaponIdx = 0;
        currentWeapon    = weapons[currentWeaponIdx];
    }
Пример #2
0
        public Weapon(Game game, Vector2 position)
        {
            WeaponState = WeaponState.Normal;
            Position    = position;

            RocketWeapon   = new RocketWeapon(game, Position);
            LaserWeapon    = new LaserWeapon(game, Position);
            NormalWeapon   = new NormalWeapon(game, Position);
            _currentWeapon = NormalWeapon;
            _font          = AssetsManager.Tahoma;
        }
Пример #3
0
    private void InitWeapon()
    {
        //weapons[0] = new GuidedWeapon(shotPosTrans, "Enemy");
        weapons[0] = new NormalWeapon(shotPosTrans, true);
        weapons[1] = new DoubleCannon(shotPosTrans, true);
        weapons[2] = new Laser(shotPosTrans, true);

        missile = new Missile(shotPosTrans, true);

        currentWeaponIdx = 0;

        currentWeapon = weapons[currentWeaponIdx];
    }
Пример #4
0
    protected override void InitWeapon()
    {
        base.InitWeapon();

        weapons[0] = new NormalWeapon(shotPosTrans, true);
        weapons[1] = new DoubleCannon(shotPosTrans, true);
        weapons[2] = new Laser(shotPosTrans, true);

        missile = new Missile(new Transform[] { transform, shotPosTrans[1], shotPosTrans[2] }, true);
        missile.LevelUp();
        currentWeaponIdx = 0;

        currentWeapon = weapons[currentWeaponIdx];

        SetOptionActive(false);
    }
    protected override void InitWeapon()
    {
        ShotPosMarker[] markers = GetComponentsInChildren <ShotPosMarker>();

        if (markers.Length > 0)
        {
            shotPosTrans = new Transform[10];

            for (int i = 0; i < markers.Length; i++)
            {
                shotPosTrans[i] = markers[i].transform;
            }
        }

        weapons[0] = new NormalWeapon(shotPosTrans, true);
        weapons[1] = new DoubleCannon(shotPosTrans, true);
        weapons[2] = new Laser(shotPosTrans, true);

        missile = new Missile(shotPosTrans, true);
        laser   = new BulletDamage();

        currentWeaponIdx = 0;
        currentWeapon    = weapons[currentWeaponIdx];
    }