|
@ -31,7 +31,7 @@ public abstract class LogicBlock : ScriptableObject |
|
|
#endregion Inspector Fields
|
|
|
#endregion Inspector Fields
|
|
|
|
|
|
|
|
|
#region ReadOnly Variables
|
|
|
#region ReadOnly Variables
|
|
|
public string DisplayName { get {return (string.IsNullOrEmpty(_DisplayName)) ? name : _DisplayName; } } |
|
|
|
|
|
|
|
|
public string DisplayName { get { return (string.IsNullOrEmpty(_DisplayName)) ? name : _DisplayName; } } |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region private variables
|
|
|
#region private variables
|
|
@ -80,7 +80,7 @@ public abstract class LogicBlock : ScriptableObject |
|
|
/// <param name="transform">transform function will be based off</param>
|
|
|
/// <param name="transform">transform function will be based off</param>
|
|
|
/// <param name="layerMask">layers to ignore</param>
|
|
|
/// <param name="layerMask">layers to ignore</param>
|
|
|
/// <returns>block which character will finish on after performing this function </returns>
|
|
|
/// <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>
|
|
|
/// <summary>
|
|
|
/// Resets the block to be ready to used again
|
|
|
/// Resets the block to be ready to used again
|
|
@ -134,6 +134,19 @@ public abstract class LogicBlock : ScriptableObject |
|
|
#endregion Serialisation Functions
|
|
|
#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() |
|
|
public virtual void OnDoubleClick() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
@ -165,8 +178,8 @@ public class BlockToken |
|
|
|
|
|
|
|
|
public LogicBlock ToLogicBlock() |
|
|
public LogicBlock ToLogicBlock() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
LogicBlock retVal = (LogicBlock) ScriptableObject.CreateInstance(blockType); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LogicBlock retVal = (LogicBlock)ScriptableObject.CreateInstance(blockType); |
|
|
Debug.Log("type: " + retVal.GetType()); |
|
|
Debug.Log("type: " + retVal.GetType()); |
|
|
retVal.CopyToken(this); |
|
|
retVal.CopyToken(this); |
|
|
|
|
|
|
|
|