Example #1
0
    // Sets the animation to the specified animation clip name
    public void SetActiveAnimation(string animation_name, bool already_active_check = false)
    {
        if (already_active_check)
        {
            if (active_animation_name == animation_name)
            {
                return;
            }
        }

        active_animation_name = animation_name;
        creature_manager.SetAutoBlending(false);

        bool can_set = creature_manager.SetActiveAnimationName(active_animation_name);

        if (!can_set)
        {
            creature_manager.SetActiveAnimationName(creature_manager.GetAnimationNames()[0]);
            active_animation_name  = creature_manager.GetActiveAnimationName();
            animation_choice_index = 0;
        }


        local_time = creature_manager.animations [creature_manager.GetActiveAnimationName()].start_time;

        if (game_controller)
        {
            game_controller.AnimClipChangeEvent();
        }
    }
Example #2
0
    // Sets the animation to the specified animation clip name
    public void SetActiveAnimation(string animation_name, bool already_active_check = false)
    {
        if (already_active_check)
        {
            if (active_animation_name == animation_name)
            {
                return;
            }
        }

        active_animation_name = animation_name;

        bool can_set = creature_manager.SetActiveAnimationName(active_animation_name);

        if (!can_set)
        {
            creature_manager.SetActiveAnimationName(creature_manager.GetAnimationNames()[0]);
            active_animation_name  = creature_manager.GetActiveAnimationName();
            animation_choice_index = 0;
        }


        local_time = creature_manager.animations [creature_manager.GetActiveAnimationName()].start_time;
    }