示例#1
0
        void Awake()
        {
            var solidity = new Solidity(100, 0);
            var weapons  = new WeaponInfo[WeaponIDs.Length];

            _blockedWeapons = new Dictionary <string, bool>();
            for (var i = 0; i < WeaponIDs.Length; i++)
            {
                weapons[i] = WeaponLoader.LoadWeapon(WeaponIDs[i]);
                _blockedWeapons.Add(weapons[i].Id, false);
            }

            _shellFactory = new ShellFactory();
            var battleStats = new PlayerBattleStats(solidity, 100, 1, weapons);

            BattleController = new PlayerBattleController(battleStats, this, this);

            StartCoroutine(Regenerate());
            StartCoroutine(Oscillate());
        }
 public PlayerBattleController(PlayerBattleStats stats, IShooter shooter, IWeaponSpeedController speedController)
 {
     battleStats            = stats;
     _shooter               = shooter;
     _weaponSpeedController = speedController;
 }