Пример #1
0
    private void EnableNextTriggers()
    {
        List <int> triggerID = new List <int>();

        if (nodeConnections.Count > 0)
        {
            foreach (Vector2 con in nodeConnections)
            {
                if (con.x == ID && con.y == ID)
                {
                    Debug.LogWarning("This trigger has itself as a connection.");
                }
                else if (con.x == ID)
                {
                    triggerID.Add((int)con.y);
                }
                else if (con.y == ID)
                {
                    triggerID.Add((int)con.x);
                }
            }
        }

        if (triggerID.Count > 0)
        {
            conManager.EnableTriggers(triggerID);
        }
    }