public void MotionPlay(ADV.Commands.Base.Motion.Data motion, bool isCrossFade) { if (isCrossFade) { this.scenario.CrossFadeStart(); } if (!motion.pair.HasValue) { if (this._motionOverride.Setting(this.chaCtrl.animBody, motion.assetBundleName, motion.assetName, motion.overrideAssetBundleName, motion.overrideAssetName, motion.stateName, true)) { Info.Anime.Play play = this.scenario.info.anime.play; this._motionOverride.isCrossFade = play.isCrossFade; this._motionOverride.layers = motion.layerNo; this._motionOverride.transitionDuration = play.transitionDuration; this._motionOverride.normalizedTime = play.normalizedTime; this._motionOverride.Play(this.chaCtrl.animBody); } IKMotion ikMotion = this.ikMotion; bool enabled = ((Behaviour)this.data.actor.Animation).get_enabled(); ikMotion.use = !enabled; ikMotion.motionIK.enabled = enabled; ikMotion.Setting(this.chaCtrl, motion.ikAssetBundleName, motion.ikAssetName, motion.stateName, false); this._yureMotion.Setting(this.chaCtrl, motion.shakeAssetBundleName, motion.shakeAssetName, motion.stateName, false); } else { int postureId = motion.pair.Value.postureID; int poseId = motion.pair.Value.poseID; Actor actor = this.data.actor; actor.ActionID = postureId; actor.PoseID = poseId; PlayState autoPlayState = this.GetAutoPlayState(); if (autoPlayState == null) { return; } actor.Animation.StopAllAnimCoroutine(); ActorAnimInfo actorAnimInfo = actor.Animation.LoadActionState(postureId, poseId, autoPlayState); actor.Animation.PlayInAnimation(actorAnimInfo.inEnableBlend, actorAnimInfo.inBlendSec, autoPlayState.MainStateInfo.FadeOutTime, actorAnimInfo.layer); } }
public void Initialize() { this.itemDic = new Dictionary <int, CharaData.CharaItem>(); if (this.motionReserver != null) { if (this.motionReserver.ikMotion != null) { this._ikMotion = this.motionReserver.ikMotion; } if (this.motionReserver.yureMotion != null) { this._yureMotion = this.motionReserver.yureMotion; } if (this.motionReserver.motionOverride != null) { this._motionOverride = this.motionReserver.motionOverride; } } if (this._yureMotion == null) { this._yureMotion = new YureMotion(); this._yureMotion.Create(this.chaCtrl, (YureCtrlEx)null); } if (this.isADVCreateChara) { this.scenario.commandController.LoadingCharaList.Remove(this); this.chaCtrl.SetActiveTop(true); MotionIK motionIK = new MotionIK(this.chaCtrl, false, (MotionIKData)null); if (this._ikMotion == null) { this._ikMotion = new IKMotion(); this._ikMotion.Create(this.chaCtrl, motionIK, (MotionIK[])Array.Empty <MotionIK>()); } } this.initialized = true; }