Beispiel #1
0
    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);
    }
Beispiel #2
0
    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);
    }
Beispiel #3
0
    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);
    }