Moved Files from Movement Module
This commit is contained in:
parent
d654544667
commit
fefaf7ab39
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
|
||||
namespace Syntriax.Modules.Movement.State
|
||||
{
|
||||
public interface IToggleState
|
||||
{
|
||||
bool Toggled { get; set; }
|
||||
Action<bool> OnToggleStateChanged { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 174255e0fce0b3a4e8b5e34afa96ffd3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
|
||||
namespace Syntriax.Modules.Movement.State
|
||||
{
|
||||
public class MemberToggleState : IToggleState
|
||||
{
|
||||
private bool _toggled = true;
|
||||
public bool Toggled
|
||||
{
|
||||
get => _toggled;
|
||||
set
|
||||
{
|
||||
bool oldValue = _toggled;
|
||||
|
||||
_toggled = value;
|
||||
|
||||
if (oldValue = !value)
|
||||
OnToggleStateChanged?.Invoke(value);
|
||||
}
|
||||
}
|
||||
|
||||
public Action<bool> OnToggleStateChanged { get; set; } = null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7e03986725a3747459e11540e8915a56
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a21f9cba390715748b464c9228237ed1
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Syntriax.Modules.Movement.State
|
||||
{
|
||||
public class ToggleState : MonoBehaviour, IToggleState
|
||||
{
|
||||
private bool _toggled = true;
|
||||
public bool Toggled
|
||||
{
|
||||
get => _toggled;
|
||||
set
|
||||
{
|
||||
bool oldValue = _toggled;
|
||||
|
||||
_toggled = value;
|
||||
|
||||
if (oldValue = !value)
|
||||
OnToggleStateChanged?.Invoke(value);
|
||||
}
|
||||
}
|
||||
|
||||
public Action<bool> OnToggleStateChanged { get; set; } = null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7ed1257e4c3c70343bdc02d2e01a95d6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue