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,76 +0,0 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace UniRx
|
||||
{
|
||||
public static class Disposable
|
||||
{
|
||||
public static readonly IDisposable Empty = EmptyDisposable.Singleton;
|
||||
|
||||
public static IDisposable Create(Action disposeAction)
|
||||
{
|
||||
return new AnonymousDisposable(disposeAction);
|
||||
}
|
||||
|
||||
public static IDisposable CreateWithState<TState>(TState state, Action<TState> disposeAction)
|
||||
{
|
||||
return new AnonymousDisposable<TState>(state, disposeAction);
|
||||
}
|
||||
|
||||
class EmptyDisposable : IDisposable
|
||||
{
|
||||
public static EmptyDisposable Singleton = new EmptyDisposable();
|
||||
|
||||
private EmptyDisposable()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class AnonymousDisposable : IDisposable
|
||||
{
|
||||
bool isDisposed = false;
|
||||
readonly Action dispose;
|
||||
|
||||
public AnonymousDisposable(Action dispose)
|
||||
{
|
||||
this.dispose = dispose;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (!isDisposed)
|
||||
{
|
||||
isDisposed = true;
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AnonymousDisposable<T> : IDisposable
|
||||
{
|
||||
bool isDisposed = false;
|
||||
readonly T state;
|
||||
readonly Action<T> dispose;
|
||||
|
||||
public AnonymousDisposable(T state, Action<T> dispose)
|
||||
{
|
||||
this.state = state;
|
||||
this.dispose = dispose;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (!isDisposed)
|
||||
{
|
||||
isDisposed = true;
|
||||
dispose(state);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue