public override void OnCreate(Unit data) { anim.skeletonDataAsset = data.attacker ? presetAttacker.skeleton : presetDefender.skeleton; anim.Initialize(true); markerAttacker.SetActive(data.attacker == true); markerDefender.SetActive(data.attacker == false); hpBar.SetInitHp(data.maxHp); UpdateHPBar(); }
static StackObject *Initialize_6(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @overwrite = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); Spine.Unity.SkeletonAnimation instance_of_this_method = (Spine.Unity.SkeletonAnimation) typeof(Spine.Unity.SkeletonAnimation).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.Initialize(@overwrite); return(__ret); }
public async void NewAnimation(GameObject Rander, SkillData skillData) { GameObject Animation = Rander.GetChild("Animation", true); Spine.Unity.SkeletonAnimation skeletonAnimation = Animation.AddComponent <Spine.Unity.SkeletonAnimation>(); skeletonAnimation.skeletonDataAsset = await AssetManager.LoadAssetAsync <Spine.Unity.SkeletonDataAsset>(skillData.SkeletonDataAssetPath); var skeletonAnimationRenderer = skeletonAnimation.GetComponent <Renderer>(); skeletonAnimationRenderer.enabled = false; DelayFunc(() => { skeletonAnimationRenderer.enabled = true; }, 0.00001f); skeletonAnimation.initialSkinName = skillData.SkinName; skeletonAnimation.Initialize(true); Spine.TrackEntry TrackEntry = skeletonAnimation.state.SetAnimation(0, skillData.AnimationName, true); Animation.AddComponent <SortRenderer>(); }
public static void LoadSpinAnimSkeleton(Spine.Unity.SkeletonAnimation anim, Qarth.ResLoader loader, string asset) { Spine.Unity.SkeletonDataAsset data = loader.LoadSync(asset) as Spine.Unity.SkeletonDataAsset; anim.skeletonDataAsset = data; anim.Initialize(true); }