예제 #1
0
    public void ObjectiveCompleted(GameObject Object)
    {
        GameObject foundObject = PillarsRequired.Find(x => x == Object);

        if (foundObject)
        {
            GameObject foundInPillarsCompleted = PillarsCompleted.Find(x => x == foundObject);
            if (!foundInPillarsCompleted)
            {
                PillarsCompleted.Add(foundObject);
            }
        }

        if (PillarsCompleted.Count == PillarsRequired.Count)
        {
            // Victory!
            myGateController.Unlock();
        }
    }