Esempio n. 1
0
        protected BulletWeapon(int? bullets, float timeBetweenShots)
        {
            Ensure.True(timeBetweenShots > 0);
            Ensure.IsValid(timeBetweenShots);

            _initialBulletCount = bullets;
            _bulletsRemaining = bullets;
            _bulletTimer = new Timer(timeBetweenShots);
        }
 protected override void Awake()
 {
     _generateNewTargetPositionTimer = new Timer(5 + Global.Random.NextFloat(-1.5f, 1.5f));
     _player = Scene.Find("Player");
     this.GenerateTargetPosition();
 }