Exemplo n.º 1
0
    void Awake()
    {
        if (timer == null)
        {
            timer = FindObjectOfType <LevelTimer>();
        }

        player = GetComponentInChildren <Player>();

        foreach (Transform t in transform)
        {
            if (t.gameObject.CompareTag("Entry"))
            {
                entry = t;
                break;
            }
        }

        rotation = GetComponent <RotateWorld>();

        teleports = GetComponentsInChildren <Teleport>();

        shrinkingTiles = GetComponentsInChildren <ShrinkGrowOverTime>();
    }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes each variable that depend on the lockInteraction, RotateWorld, Interact and Glitch Effect
 /// </summary>
 private void InitilializeReferences()
 {
     interactingwith = GetComponent <InteractCamSwitch>();
     rotate          = GetComponent <RotateWorld>();
     interact        = GetComponent <LockInteract>();
 }