mirror of
https://github.com/Dongyifengs/AssetStudio-Genshin-MoYi.git
synced 2025-04-22 04:29:18 +08:00
36 lines
991 B
C#
36 lines
991 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace AssetStudio
|
|
{
|
|
public sealed class Animation : Behaviour
|
|
{
|
|
public PPtr<AnimationClip>[] m_Animations;
|
|
|
|
public Animation(ObjectReader reader) : base(reader)
|
|
{
|
|
var m_Animation = new PPtr<AnimationClip>(reader);
|
|
int numAnimations = reader.ReadInt32();
|
|
m_Animations = new PPtr<AnimationClip>[numAnimations];
|
|
for (int i = 0; i < numAnimations; i++)
|
|
{
|
|
m_Animations[i] = new PPtr<AnimationClip>(reader);
|
|
}
|
|
}
|
|
|
|
public bool IsContainsAnimationClip(AnimationClip clip)
|
|
{
|
|
foreach (PPtr<AnimationClip> ptr in m_Animations)
|
|
{
|
|
if (ptr.TryGet(out var animationClip) && animationClip.Equals(clip))
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|