Пример #1
0
    public static void FinishTrigger()
    {
        StackLevel currentStackLevel = GetCurrentLevel();
        Trigger    currentTrigger    = currentStackLevel.GetCurrentTrigger();

        if (DebugManager.DebugTriggers)
        {
            Debug.Log("Trigger is finished: " + currentTrigger.Name);
        }

        currentStackLevel.RemoveTrigger(currentTrigger);
        currentStackLevel.IsActive = false;

        ResolveTriggers(currentTrigger.TriggerType);
    }
Пример #2
0
    public static void FinishTrigger()
    {
        StackLevel currentStackLevel = GetCurrentLevel();

        if (currentStackLevel == null || currentStackLevel.GetTrigersList() == null || currentStackLevel.GetTrigersList().Count == 0)
        {
            Debug.Log("Ooops! You want to finish trigger, but it is already finished");
        }

        Trigger currentTrigger = currentStackLevel.GetCurrentTrigger();

        Console.Write(currentTrigger.Name + " is finished", LogTypes.Triggers);

        currentStackLevel.RemoveTrigger(currentTrigger);
        currentStackLevel.IsActive = false;

        ResolveTriggers(currentTrigger.TriggerType);
    }
Пример #3
0
    public static void FinishTrigger()
    {
        StackLevel currentStackLevel = GetCurrentLevel();

        if (currentStackLevel.GetTrigersList().Count == 0)
        {
            Debug.Log("Ooops, you want to finish trigger, but new empty level of stack was created!");
        }

        Trigger currentTrigger = currentStackLevel.GetCurrentTrigger();

        Console.Write(currentTrigger.Name + " is finished", LogTypes.Triggers);

        currentStackLevel.RemoveTrigger(currentTrigger);
        currentStackLevel.IsActive = false;

        ResolveTriggers(currentTrigger.TriggerType);
    }