Ejemplo n.º 1
0
    void FillAnimationNames()
    {
        CreatureAsset   creature_asset   = (CreatureAsset)target;
        CreatureManager creature_manager = creature_asset.GetCreatureManager();

        if (creature_manager == null)
        {
            return;
        }

        Dictionary <string, CreatureModule.CreatureAnimation> all_animations
            = creature_manager.animations;

        animation_names.Clear();
        foreach (string cur_name in all_animations.Keys)
        {
            animation_names.Add(cur_name);
        }

        animation_clip_overrides = creature_asset.animation_clip_overides;
        if (animation_clip_overrides.Count == 0)
        {
            foreach (string cur_name in all_animations.Keys)
            {
                var cur_animation = all_animations[cur_name];
                animation_clip_overrides.Add(cur_name,
                                             new CreatureAnimationAssetData((int)cur_animation.start_time,
                                                                            (int)cur_animation.end_time));
            }
        }
    }
    void FillAnimationNames()
    {
        CreatureAsset creature_asset = (CreatureAsset)target;
        CreatureManager creature_manager = creature_asset.GetCreatureManager ();
        if (creature_manager == null) {
            return;
        }

        Dictionary<string, CreatureModule.CreatureAnimation> all_animations
            = creature_manager.animations;

        animation_names.Clear();
        foreach (string cur_name in all_animations.Keys) {
            animation_names.Add(cur_name);
        }

        animation_clip_overrides = creature_asset.animation_clip_overides;
        if (animation_clip_overrides.Count == 0) {
            foreach (string cur_name in all_animations.Keys) {
                var cur_animation = all_animations[cur_name];
                animation_clip_overrides.Add(cur_name,
                                             new CreatureAnimationAssetData((int)cur_animation.start_time,
                                               								(int)cur_animation.end_time));
            }
        }
    }