Esempio n. 1
0
    void OnTriggerEnter(Collider other)
    {
        Debug.Log("ENTERED: " + other.gameObject.name);
        if (CheckEnteredObject(other.gameObject.name))
        {
            if (!actionHelper.PlacedObjects.Contains(other.gameObject))
            {
                actionHelper.PlacedObjects.Add(other.gameObject);
                Debug.Log("placing: " + other.gameObject.name);
                Debug.Log("number of objects placed: " + actionHelper.PlacedObjects.Count.ToString());
                actionHelper.RunPlacingCutscene();
            }
        }

        if (other.gameObject.name.Equals("Eidolon"))
        {
            if (actionHelper.HasObjectInHand && actionHelper.PlacedObjects.Count == 0)
            {
                actionHelper.RightPlaceCS.Interact();
            }
        }

        if (other.gameObject.name.Equals("Christopher"))
        {
            if (actionHelper.PlacedObjects.Count > 3)
            {
                actionHelper.canvas.GetComponent <CanvasControlLevel1>().EnableCreditsSlot();
            }
        }
    }