Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     Application.targetFrameRate = 30;
     rb                   = gameObject.GetComponent <Rigidbody>();
     playerCamera         = GameObject.Find("Player Camera").GetComponent <Transform>();
     Cursor.lockState     = CursorLockMode.Locked;
     cursorLocked         = false;
     dimensionSwapHandler = GameObject.Find("Dimension Swap Handler").GetComponent <DimensionSwap>();
 }
    public IEnumerator SwapDimensionsCoroutine()
    {
        Debug.Log("Trigger coroutine");

        DimensionSwap dimensionSwapHandler = GameObject.Find("Dimension Swap Handler").GetComponent <DimensionSwap>();

        dimensionSwapHandler.DimensionSwapAction();
        yield return(new WaitForSeconds(3.0f));

        dimensionSwapHandler.DimensionSwapAction();
    }
Ejemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        playerHeight     = transform.position;
        Cursor.lockState = CursorLockMode.Locked;
        footfall         = GetComponent <AudioSource>();

        dimensionScript = GameObject.FindWithTag("Player").GetComponent <DimensionSwap>(); //get dimension script
        //lightScript = GameObject.Find("Player").GetComponent<Lights>();
        dimension = 1;                                                                     //we start in the humna dimension

        //load human dimension first
        //load objects
        forHuman = dimensionScript.humanObjects.GetComponentInChildren <Transform>();
        forOther = dimensionScript.otherObjects.GetComponentInChildren <Transform>();

        ActivateDim(forHuman);
        DeactivateDim(forOther);

        //make sure light is right color
        //lightChildren = lightScript.lightParent.GetComponentsInChildren<Light>(true);
        // lightScript.changeToHuman(lightChildren);
    }
 // Start is called before the first frame update
 void Start()
 {
     swapImage            = GameObject.Find("Cursor").GetComponent <Image>();
     dimensionSwapHandler = GameObject.Find("Dimension Swap Handler").GetComponent <DimensionSwap>();
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>();
 }
Ejemplo n.º 5
0
 // Start is called before the first frame update
 void Start()
 {
     dimensionSwaphandler = GameObject.Find("Dimension Swap Handler").GetComponent <DimensionSwap>();
 }