public OCAnimation(OCAnimation anim) { FadeLength = anim.FadeLength; Target = anim.Target; AnimationState_ = anim.AnimationState_; m_iTweenParams = anim.m_iTweenParams; }
public void Initialize() { HasAnimation = true; Animation = new OCAnimation();//ScriptableObject.CreateInstance<OCAnimation>(); Animation.Initialize(gameObject, animation["idle"]); Animation.AnimationState_.wrapMode = WrapMode.Once; Animation.AnimationState_.layer = -1; Animation.OnStart = "IdleStart"; Animation.OnEnd = "IdleEnd"; DontDestroyOnLoad(this); }