using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[CreateAssetMenu(menuName = "Major Project/Combined Block")]
|
|
public class CombinedBlock : LogicBlock
|
|
{
|
|
#region Inspector Variables
|
|
[SerializeField]
|
|
[Tooltip("Blocks this will run through")]
|
|
protected BlockReader blockReader;
|
|
#endregion Inspector Variables
|
|
|
|
#region Private Variables
|
|
|
|
#endregion Private Variables
|
|
|
|
|
|
public override bool Run(Character player)
|
|
{
|
|
BlockLogic(player);
|
|
|
|
if (blockReader.Finished)
|
|
{
|
|
blockReader.Reset();
|
|
RepeatCount++;
|
|
}
|
|
|
|
return isFinished();
|
|
}
|
|
|
|
protected override void BlockLogic(Character player)
|
|
{
|
|
blockReader.Read(player);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Resets the block to be ready to used again
|
|
/// </summary>
|
|
public override void Reset()
|
|
{
|
|
base.Reset();
|
|
blockReader.Reset();
|
|
}
|
|
|
|
}
|