|
|
@ -31,7 +31,7 @@ public abstract class LogicBlock : ScriptableObject |
|
|
|
#endregion Inspector Fields
|
|
|
|
|
|
|
|
#region ReadOnly Variables
|
|
|
|
public string DisplayName { get {return (string.IsNullOrEmpty(_DisplayName)) ? name : _DisplayName; } } |
|
|
|
public string DisplayName { get { return (string.IsNullOrEmpty(_DisplayName)) ? name : _DisplayName; } } |
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region private variables
|
|
|
@ -80,7 +80,7 @@ public abstract class LogicBlock : ScriptableObject |
|
|
|
/// <param name="transform">transform function will be based off</param>
|
|
|
|
/// <param name="layerMask">layers to ignore</param>
|
|
|
|
/// <returns>block which character will finish on after performing this function </returns>
|
|
|
|
public abstract Block GetEndBlock(Block startBlock,Transform transform, LayerMask layerMask); |
|
|
|
public abstract Block GetEndBlock(Block startBlock, Transform transform, LayerMask layerMask); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Resets the block to be ready to used again
|
|
|
@ -134,6 +134,19 @@ public abstract class LogicBlock : ScriptableObject |
|
|
|
#endregion Serialisation Functions
|
|
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object other) |
|
|
|
{ |
|
|
|
if (Object.ReferenceEquals(null, other)) |
|
|
|
return false; |
|
|
|
|
|
|
|
if (Object.ReferenceEquals(other.GetType(), other)) |
|
|
|
return false; |
|
|
|
|
|
|
|
LogicBlock otherLogic = other as LogicBlock; |
|
|
|
return !Object.ReferenceEquals(null, otherLogic) |
|
|
|
&& int.Equals(RepeatCount, otherLogic.RepeatCount); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual void OnDoubleClick() |
|
|
|
{ |
|
|
|
|
|
|
@ -165,8 +178,8 @@ public class BlockToken |
|
|
|
|
|
|
|
public LogicBlock ToLogicBlock() |
|
|
|
{ |
|
|
|
|
|
|
|
LogicBlock retVal = (LogicBlock) ScriptableObject.CreateInstance(blockType); |
|
|
|
|
|
|
|
LogicBlock retVal = (LogicBlock)ScriptableObject.CreateInstance(blockType); |
|
|
|
Debug.Log("type: " + retVal.GetType()); |
|
|
|
retVal.CopyToken(this); |
|
|
|
|
|
|
|