-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathAnimationClipOverrides.cs
More file actions
33 lines (31 loc) · 909 Bytes
/
Copy pathAnimationClipOverrides.cs
File metadata and controls
33 lines (31 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace ValheimLegends
{
public class AnimationClipOverrides : List<KeyValuePair<AnimationClip, AnimationClip>>
{
public AnimationClip this[string name]
{
get
{
return Find((KeyValuePair<AnimationClip, AnimationClip> x) => x.Key.name == name).Value;
}
set
{
int num = FindIndex((KeyValuePair<AnimationClip, AnimationClip> x) => x.Key.name == name);
if (num != -1)
{
base[num] = new KeyValuePair<AnimationClip, AnimationClip>(base[num].Key, value);
}
}
}
public AnimationClipOverrides(int capacity)
: base(capacity)
{
}
}
}