Music & SFX
This commit is contained in:
parent
88f4bb4afb
commit
d955c9da2f
50 changed files with 3099 additions and 2646 deletions
|
|
@ -125,6 +125,8 @@ public abstract class Entity
|
|||
public Subject<Unit> HeatstrokeDeath = new Subject<Unit>();
|
||||
public Subject<Unit> HypothermiaRisk = new Subject<Unit>();
|
||||
public Subject<Unit> HypothermiaDeath = new Subject<Unit>();
|
||||
public Subject<Entity> TargetedBy = new Subject<Entity>();
|
||||
public ReactiveProperty<int> TargetedByCount = new ReactiveProperty<int>(0);
|
||||
|
||||
public UniRx.IObservable<EquippedItem> ItemDestroyed;
|
||||
public UniRx.IObservable<int2> HullArmorDepleted;
|
||||
|
|
@ -193,6 +195,13 @@ public abstract class Entity
|
|||
.Merge(HypothermiaDeath.Select(_ => CauseOfDeath.Hypothermia))
|
||||
.Merge(ItemDestroyed.Where(i=>i.GetBehavior<Cockpit>()!=null).Select(_ => CauseOfDeath.CockpitDestroyed));
|
||||
|
||||
Target.Subscribe(entity => entity?.TargetedBy.OnNext(this));
|
||||
TargetedBy.Subscribe(enemy =>
|
||||
{
|
||||
TargetedByCount.Value++;
|
||||
enemy.Target.Where(t => t != this).Take(1).Subscribe(_ => TargetedByCount.Value--);
|
||||
});
|
||||
|
||||
EntityInfoGathered.ObserveReplace().Subscribe(replace =>
|
||||
{
|
||||
if (replace.OldValue < ItemManager.GameplaySettings.TargetDetectionInfoThreshold &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue