private void Start()
    {
        dimentionShift = GameObject.Find("Dimention Swapper").GetComponent <DimentionShift>();

        if (objectIs3D)
        {
            followObject3D = followObject.transform.GetChild(0).gameObject;
            followObject2D = followObject.transform.GetChild(1).gameObject;
        }
    }
    private void Start()
    {
        dimentionShift = GameObject.Find("Dimention Swapper").GetComponent <DimentionShift>();

        player3D = transform.GetChild(0).gameObject;
        player2D = transform.GetChild(1).gameObject;

        distToGround3D = player3D.GetComponent <Collider>().bounds.extents.y;   // Get the distance from the player to the ground
        distToGround2D = player2D.GetComponent <Collider2D>().bounds.extents.y; // The same for 2D space
    }
Ejemplo n.º 3
0
 private void Start()
 {
     dimentionShift = GameObject.Find("Dimention Swapper").GetComponent <DimentionShift>();
 }