public override bool Act(TimeLinePlayer player) { player.buffer_Remove(this); CircleCollider2D[] ballsList; ballsList = player.GetComponentsInChildren <CircleCollider2D>(); if (checkCondition == condition.BIGGER_THAN) { if (ballsList.Length > numberCheck) { if (if_TRUE.Length == 0) { Debug.LogWarning("TimeLineObject Ball Check Condition doesn't have a 'if_TRUE' object. Condition will be ignored"); } else { player.buffer_Add(if_TRUE.ToArray()); } return(true); } } else if (checkCondition == condition.SMALLER_THAN) { if (ballsList.Length < numberCheck) { if (if_TRUE.Length == 0) { Debug.LogWarning("TimeLineObject Ball Check Condition doesn't have a 'if_TRUE' object. Condition will be ignored"); } else { player.buffer_Add(if_TRUE.ToArray()); } return(true); } } if (if_TRUE.Length == 0) { Debug.LogWarning("TimeLineObject Ball Check Condition doesn't have a 'if_FALSE' object. Condition will be ignored"); } else { player.buffer_Add(if_FALSE.ToArray()); } return(true); }
public override bool Act(TimeLinePlayer player) { player.buffer_Remove(this); if (TimeLine.Length == 0) { Debug.LogError("TimeLineObject Wave does't have any TimeLineObject to play!"); return(true); } player.buffer_Add(TimeLine.ToArray()); return(true); }
public override bool Act(TimeLinePlayer player) { if (ObjectsList.Length == 0) { Debug.LogError("TimeLineObject Random Object doesn't have any object to choose from!"); return(true); } player.buffer_Remove(this); int rng = Random.Range(0, ObjectsList.Length); TimeLine_Object[] list = new TimeLine_Object[1]; list[0] = ObjectsList[rng]; player.buffer_Add(list); return(true); }