public override void Fire(BaseWeaponViewModel baseWeapon)
 {
     base.Fire(baseWeapon);
     var laser = LaserBoltController.CreateLaserBolt();
     baseWeapon.Projectiles.Add(laser);
     laser.Hit.Subscribe(_ => { baseWeapon.ParentPlayerShip.AsteroidsDestroyed++; }).DisposeWith(laser);
     laser.Destroy.Subscribe(_ => { baseWeapon.Projectiles.Remove(laser); }).DisposeWith(laser);
     baseWeapon.ParentPlayerShip.IsAliveProperty.Where(isAlive => !isAlive).Subscribe(_ => { laser.Destroy.Execute(null); }).DisposeWith(baseWeapon);
 }
예제 #2
0
    public override void Fire(BaseWeaponViewModel baseWeapon)
    {
        base.Fire(baseWeapon);
        var laser = LaserBoltController.CreateLaserBolt();

        baseWeapon.Projectiles.Add(laser);
        laser.Hit.Subscribe(_ => { baseWeapon.ParentPlayerShip.AsteroidsDestroyed++; }).DisposeWith(laser);
        laser.Destroy.Subscribe(_ => { baseWeapon.Projectiles.Remove(laser); }).DisposeWith(laser);
        baseWeapon.ParentPlayerShip.IsAliveProperty.Where(isAlive => !isAlive).Subscribe(_ => { laser.Destroy.Execute(null); }).DisposeWith(baseWeapon);
    }
 public abstract void InitializeBaseWeapon(BaseWeaponViewModel baseWeapon);
 public virtual void Fire(BaseWeaponViewModel baseWeapon)
 {
 }
예제 #5
0
 public virtual void Fire(BaseWeaponViewModel baseWeapon)
 {
 }
예제 #6
0
 public abstract void InitializeBaseWeapon(BaseWeaponViewModel baseWeapon);
    protected override void InitializeViewModel(ViewModel viewModel)
    {
        BaseWeaponViewModel baseWeapon = ((BaseWeaponViewModel)(viewModel));

        baseWeapon.FireRate = this._FireRate;
    }
예제 #8
0
 public override void InitializeBaseWeapon(BaseWeaponViewModel baseWeapon)
 {
 }
 public override void InitializeBaseWeapon(BaseWeaponViewModel baseWeapon)
 {
 }