void InitZNCM() { AudioAction.ExecuteScript("RemoveAudio,JieShuo.wav"); AudioAction.ExecuteScript("PlayAudio,caimeiji.wav,0.3,0"); AudioAction.ExecuteScript("PlayAudio,posuiji.wav,0.3,0"); AudioAction.ExecuteScript("PlayAudio,biandianzhan.wav,0.3,0"); m_Time = 0; IniMineWall(); IniCutterBra(); float[] sketor = new float[54]; for (int i = 0; i < sketor.Length; i++) { sketor[i] = 0.5f; } ZhengScripts.InitilizeSketator(new Vector2(0, 53), sketor); ZhengScripts.InitilizeSketator(new Vector2(0, 17), new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.5f, 0.5f, 0.5f }); ZhuAnimation.PlayAnimation(new Vector2(0, 17), 0.1f, new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0.05f, 0.1f, 0.15f, 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.45f, 0.5f }, ZhuAnimation.ZhuAnimationMode.Mode3); curStep = typeofStep.None; CMJGo.transform.position = CMJGoPos;//BanChildList[2].transform.position curIndex = 2; KeyFrameAnimation.SSLLJ = true; //斜切入刀 CastTransfrom.singleton.InitilizeAnimation(); if (Cutter2DAnimation.singleton.playing) { CastTransfrom.singleton.CutKnife(); CastTransfrom.singleton.ToLeft(); } }
public void Play(AnimationStateForZMJ[] states) { //BracketAniControlManager.singleton.Play(new Vector2(20, 30), 4f, new List<float>(new float[] { 0.51f, 0.55f, 0.6f, 0.65f, 0.7f, 0.75f, 0.8f, 0.85f, 0.9f, 0.95f, 1f })); //BracketAniControlManager.singleton.Play(new Vector2(20, 30), 4f, new List<float>(new float[] { 0.51f, 0.55f, 0.6f, 0.65f, 0.7f, 0.75f, 0.8f, 0.85f, 0.9f, 0.95f, 1f }), "UpArm"); // AddParticle(); DestroyWall.singleton.control1 = false; DestroyWall.singleton.control2 = false; DestroyWall.singleton.height = 0.9f; CutMineAnimation.singleton.speed = 0.52f; playin = true; firstplay = true; firstplaytime = 20; firstplaysatrttime = Time.time; firstcutterplay = true; firstcutterplaytime = 5; firstcutterplaystarttime = Time.time; rember = states; identification = 0; SlanimationFirst = true; allAnimationOvew = false; zmjZhijiaend = false; result = false; allstop1 = false; pauseAction = null; call1 = false; call2 = false; animationQueue = new Queue <AnimationStateForZMJ>(); for (int i = 0; i < states.Length; i++) { animationQueue.Enqueue(states[i]); } float[] sketor = new float[54]; float[] bracket = new float[54]; float[] uparm = new float[54]; for (int i = 0; i < sketor.Length; i++) { sketor[i] = 0.5f; bracket[i] = 0.5f; uparm[i] = 1; } ZhengScripts.InitilizeBracketAll(new Vector2(0, 53), bracket); ZhengScripts.InitilizeUpArm(new Vector2(0, 53), uparm); ZhengScripts.InitilizeSketator(new Vector2(0, 53), sketor); ZhengScripts.InitilizeBracketAll(new Vector2(0, 11), new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0.1f, 0.2f, 0.3f, 0.4f }); ZhengScripts.InitilizeUpArm(new Vector2(0, 11), new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0.2f, 0.4f, 0.6f, 0.8f }); ZhengScripts.InitilizeSketator(new Vector2(0, 16), new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.5f, 0.5f }); ZhuAnimation.PlayAnimation(new Vector2(0, 16), 0.1f, new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0.05f, 0.1f, 0.15f, 0.2f, 0.3f, 0.4f, 0.5f, 0.5f, 0.5f }, ZhuAnimation.ZhuAnimationMode.Mode3); // if (identification == 1) // { // } }
void Update() { try { if (playing) { if (isPositive) { PlayPositive(); } else { PlayInverse(); } if (!onceSmallest) { if (Time.time - startTimeS > time) { if (action != null) { action(); action = null; } } if (Time.time - startTimeS > alltime) { if (!isPositive) { // print("00000000000fdsgfdsgfd "+alltime); // if (AnimationManager.identification != 4) ZhengScripts.Initilize(index); } //PlayAnimationWhenMax(); playing = false; } } } } catch (Exception e) { // Debug.LogError("播放单个支架动画时报错:" + e.StackTrace); } }
public static void Binding() { for (int i = 0; i < Fuzhi.mounts; i++) { BindingZhengMachineMAX("Max1" + i, "Max2" + i, "Max3" + i, "MMove" + i); BindingZhengMachineSSMALLEST("SSmallest1" + i, "SSmallest2" + i, "SSmallest3" + i, "SSMove" + i); BindingZhengMachineSMALLEST("Smallest1" + i, "Smallest2" + i, "Smallest3" + i, "SMove" + i); BindingZhengMachineSkateboard("Ban" + i, "Ban" + (i + 1)); } // Animation a; if (initialize) { SaveXML(); } ZhengScripts.InitilizeSketatorAnimation(); ZhengScripts.InitilizeZhiJiaAnimation(); AnimationManager.singion.playing = false; }
void Play() { try { zmj = animationQueue.Dequeue(); identification++; Play(zmj.time, zmj.step, zmj.distance, zmj.targetIndex, zmj.width, zmj.actionPertime); // zmj = new AnimationStateForZMJ(zmj.time, zmj.step, zmj.distance, zmj.targetIndex, zmj.width, zmj.actionPertime, zmj.stopTime); zmj.startTime = Time.time; //CutMineAnimation.singleton.PlayCutterAnimation(); if (identification == 5) { BracketAniControlManager.singleton.Play(new Vector2(37, 46), 2f, new List <float>(new float[] { 1, 1, 1, 1, 1, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f })); BracketAniControlManager.singleton.Play(new Vector2(37, 46), 2f, new List <float>(new float[] { 1, 1, 1, 1, 1, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f }), "UpArm"); } } catch (System.Exception e) { MonoBehaviour.print("AnimationManager Over " + e.StackTrace); //for (int i = 0; i < Fuzhi.mounts; i++) //{ // ZhengScripts.Initilize(i); //} // Machine.singleton.Inistint(); ZhengScripts.Binding(); AnimationManager.singion.playing = true; allstope1timme = Time.time; allAnimationOvew = true; allstop1 = true; Cutter2DAnimation.singleton.SwitchScenceInitilize(); // CastTransfrom.singleton.InitilizeAnimation(); // Play(rember); } }