예제 #1
0
    void OnLeverActivated()
    {
        // Called when lever is activated. Set flag to true and play the animation.
        on_lever_animation = true;
        anim_controller    = lever_go.GetComponent <CompAnimation>();
        if (anim_controller != null)
        {
            anim_controller.PlayAnimation(lever_animation_name);
        }

        // Block Walkability
        SetPathWalkable(1, 1);
    }
예제 #2
0
    // -------------------------------------------------------------------------------------



    void OnLeverActivated()
    {
        // Called when lever is activated. Set flag to true and play the animation.
        on_lever_animation = true;
        Debug.Log("Animation called");
        anim_controller = lever_go.GetComponent <CompAnimation>();
        if (anim_controller != null)
        {
            anim_controller.PlayAnimation(lever_animation_name);
            Debug.Log("Animation activated");
        }
        else
        {
            Debug.Log("Animation IS NULL!!");
        }
    }