// Use this for initialization
    void Start()
    {
        // Get the rigid body component for later use
        rb = GetComponent <Rigidbody>();

        // Get the player collider
        coll = GetComponent <Collider>();

        // Refresh the HUD
        hud.Refresh();
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        //rigid body of moving platform. drag and drop in unity
        MovPlat = MovPlat.GetComponent <Rigidbody>();

        //get the rigid body component for later use
        rb = GetComponent <Rigidbody>();

        //get the player collider
        coll = GetComponent <Collider>();

        //refresh the HUD
        hud.Refresh();
    }