Weapos Rejiggered
Modified weapon scripts to eliminate specialized projectile behavior - allows charged weapons to have projectiles and modify weapon stats when charged Added machine gun weapon & VFX Moved third party code to Plugins folder to improve compile times
This commit is contained in:
parent
2a0fe34611
commit
dbc522a224
2105 changed files with 7033 additions and 1141 deletions
|
|
@ -1,46 +0,0 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace UniRx
|
||||
{
|
||||
public sealed class ScheduledDisposable : ICancelable
|
||||
{
|
||||
private readonly IScheduler scheduler;
|
||||
private volatile IDisposable disposable;
|
||||
private int isDisposed = 0;
|
||||
|
||||
public ScheduledDisposable(IScheduler scheduler, IDisposable disposable)
|
||||
{
|
||||
this.scheduler = scheduler;
|
||||
this.disposable = disposable;
|
||||
}
|
||||
|
||||
public IScheduler Scheduler
|
||||
{
|
||||
get { return scheduler; }
|
||||
}
|
||||
|
||||
public IDisposable Disposable
|
||||
{
|
||||
get { return disposable; }
|
||||
}
|
||||
|
||||
public bool IsDisposed
|
||||
{
|
||||
get { return isDisposed != 0; }
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Scheduler.Schedule(DisposeInner);
|
||||
}
|
||||
|
||||
private void DisposeInner()
|
||||
{
|
||||
if (Interlocked.Increment(ref isDisposed) == 1)
|
||||
{
|
||||
disposable.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue