Example #1
0
        public void Init(Func<bool> shouldPauseCb, ITimeProvider time, WeaponConfig weaponConfig, BaseShip owner, Rect levelBounds )
        {
            base.Init( shouldPauseCb, time);
            WeaponConfig = weaponConfig;
            Owner = owner;
            LevelBounds = levelBounds;

            ProjectileCollider = gameObject.As< BoxCollider >();

            if ( ProjectileCollider == null )
                throw new MissingComponentException("Box collider is not present on Projectile");
        }
Example #2
0
 public void OnGameOver(BaseShip ship)
 {
     if ( ship.Model.Lives == 0 )
     {
         State = LevelState.Done;
         EndLevel( false );
     }
 }
Example #3
0
 private void OnEnemyShipDestroyed(BaseShip ship)
 {
     Player.Model.Score += ship.Model.Score;
     OnEnemyShipLeftBattleField( ship as EnemyShip );
 }
 public void Init( Func<bool> shouldPauseCb, ITimeProvider time, WeaponConfig weaponConfig, int direction, BaseShip owner, Rect levelBounds )
 {
     base.Init( shouldPauseCb, time, weaponConfig, owner, levelBounds);
     Direction = direction;
 }