Exemplo n.º 1
0
        public static IWeaponBehaviour GetCurrentWeapon(WeaponType type)
        {
            IWeaponBehaviour controller = null;

            switch (type)
            {
                case WeaponType.Laser:
                    controller = new WeaponLaserBehaviour();
                    break;
                case WeaponType.Bomb:
                    controller = new WeaponBombBehaviour();
                    break;
                case WeaponType.Cross:
                    controller = new WeaponCrossBehaviour();
                    break;
            }

            return controller;
        }
Exemplo n.º 2
0
        public static IWeaponBehaviour GetCurrentWeapon(WeaponType type)
        {
            IWeaponBehaviour controller = null;

            switch (type)
            {
            case WeaponType.Laser:
                controller = new WeaponLaserBehaviour();
                break;

            case WeaponType.Bomb:
                controller = new WeaponBombBehaviour();
                break;

            case WeaponType.Cross:
                controller = new WeaponCrossBehaviour();
                break;
            }

            return(controller);
        }