void FixedUpdate(){ if (GameController.GetInstance().intoRobot == true && GameController.GetInstance().CurrentPlayer == BallRobot) { if( GameController.GetInstance().ObjectTriggerID.GetComponent<RobotGameOver>().isAvail == true && BallRobot.GetComponent<PlayerControl>().isAvail == true && GameController.GetInstance().BallToRobot == true && GameController.GetInstance().IsRobot == false){ GameController.GetInstance().moveRight[0] = 0; GameController.GetInstance().moveLeft[0] = 0; //当前操作对象变更为小球接触到的有效机器人 GameController.GetInstance().CurrentPlayer = GameController.GetInstance().ObjectID; //被操作的机器人(玩家机器人)半透明状态还原 GameController.GetInstance().ObjectID.gameObject.GetComponent<tk2dSprite>().color = new Color(1f, 1f, 1f, 1.0f); //当前操作对象变的触发更为小球接触到的有效机器人的触发 GameController.GetInstance().CurrentPlayerTrigger = GameController.GetInstance().ObjectTriggerID; CurrentPlayerString = GameController.GetInstance().CurrentPlayer.name.Substring (start - 1, length); //小球不再接触到有效机器人 GameController.GetInstance().PlayerIsTriggered = false; MissingBall = Instantiate(MissingBallPlayer, BallRobot.gameObject.transform.position, Quaternion.identity) as GameObject; //小球被灭活,就消失了 BallRobot.gameObject.SetActive(false); //摄像机位置调整 Sequence BallAnim = new Sequence (new SequenceParms().OnComplete(ChangeRole)); if(GameController.GetInstance().CurrentPlayer.transform.position [0] > GameController.GetInstance().FollowedLeftLine && GameController.GetInstance().CurrentPlayer.transform.position [0] < GameController.GetInstance().FollowedRightLine){ BallAnim.Prepend(HOTween.To (GameObject.Find("Camera01").gameObject.transform, 0.3f,new TweenParms().Prop("position",new Vector3( GameController.GetInstance().CurrentPlayer.transform.position[0], GameController.GetInstance().CurrentPlayer.transform.position[1],-21.3f)))); }else if(GameController.GetInstance().CurrentPlayer.transform.position [0] < GameController.GetInstance().FollowedLeftLine){ BallAnim.Prepend(HOTween.To (GameObject.Find("Camera01").gameObject.transform, 0.3f,new TweenParms().Prop("position",new Vector3( GameController.GetInstance().FollowedLeftLine, GameController.GetInstance().CurrentPlayer.transform.position[1],-21.3f)))); }else if(GameController.GetInstance().CurrentPlayer.transform.position [0] > GameController.GetInstance().FollowedRightLine){ BallAnim.Prepend(HOTween.To (GameObject.Find("Camera01").gameObject.transform, 0.3f,new TweenParms().Prop("position",new Vector3( GameController.GetInstance().FollowedRightLine, GameController.GetInstance().CurrentPlayer.transform.position[1],-21.3f)))); } //小球附身时本体消失的动画 BallAnim.Insert(0,HOTween.To (MissingBall.gameObject.transform, 0.15f,new TweenParms().Prop("localScale", new Vector3(0.1f,1.5f,1f)))); BallAnim.Insert(0.1f,HOTween.To (MissingBall.gameObject.transform, 0.2f,new TweenParms().Prop("position", new Vector3(MissingBall.gameObject.transform.position[0],MissingBall.gameObject.transform.position[1]+2.3f,MissingBall.gameObject.transform.position[2])))); BallAnim.Insert(0.2f,HOTween.To (MissingBall.gameObject.GetComponent<tk2dSprite>(), 0.1f,new TweenParms().Prop("color", new Color(1,1,1,0)))); BallAnim.Play(); } } }
protected override void OnPostLoadGUI() { if (GameUIPopupManager.GetInstance().GetCurrentPopup() != null) { GameUIPopupManager.GetInstance().PopState(true, null); } GUIChatWindowV2.TryCloseMe(); GameUIManager.mInstance.DestroyGameUIOptionPopUp(); this.mEffectGo = base.transform.Find("endBackground/ui04").gameObject; NGUITools.SetActive(this.mEffectGo, false); this.mBg = base.transform.Find("endBackground/BackGround").GetComponent<UISprite>(); this.mVictorySp = base.transform.Find("endBackground/Sprite").GetComponent<UISprite>(); this.mVictorySp.transform.localScale = new Vector3(6f, 6f, 6f); this.mVictorySp.color = new Color(this.mVictorySp.color.r, this.mVictorySp.color.g, this.mVictorySp.color.b, 0.3f); Sequence sequence = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate)); sequence.Append(HOTween.To(this.mVictorySp.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutSine))); sequence.Insert(0f, HOTween.To(this.mVictorySp, 0.2f, new TweenParms().Prop("color", new Color(this.mVictorySp.color.r, this.mVictorySp.color.g, this.mVictorySp.color.b, 1f)))); sequence.AppendCallback(new TweenDelegate.TweenCallback(this.ShowEffectGo)); sequence.AppendInterval(1.5f); sequence.Append(HOTween.To(this.mBg, 1f, new TweenParms().Prop("color", new Color(this.mBg.color.r, this.mBg.color.g, this.mBg.color.b, 0f)))); sequence.Insert(2f, HOTween.To(this.mVictorySp, 1f, new TweenParms().Prop("color", new Color(this.mVictorySp.color.r, this.mVictorySp.color.g, this.mVictorySp.color.b, 0f)))); sequence.Play(); this.isPvp = GameUIManager.mInstance.uiState.IsPvp; if (!this.isPvp) { base.Invoke("ReservedReadyProcess", 1.5f); } Globals.Instance.BackgroundMusicMgr.PlayGameClearSound(); Globals.Instance.BackgroundMusicMgr.StopWarmingSound(); Globals.Instance.BackgroundMusicMgr.ClearGameBGM(); }
private int WorkNow = 0;//0是行走,1是边走边向右工作,2是只工作,3是边走边向左工作 //load界面的动画加载 // Use this for initialization void Start () { if (Global.GetInstance ().loadName == "Screen0101" && Application.loadedLevelName == "DemoLoading") { Aim01.SetActive (true); Goods01.GetComponent<GoodsInstantiate>().InstantiateGoods = true; G_01 = new Sequence (new SequenceParms ().Loops (-1, LoopType.Restart)); G_01.Prepend (HOTween.To (g_01.gameObject.transform.parent.gameObject.transform, 2, new TweenParms ().Prop ("rotation", new Vector3 (0, 0, 108)).Ease (EaseType.EaseOutQuart))); G_01.Insert (2,HOTween.To (g_01.gameObject.transform.parent.gameObject.transform, 2, new TweenParms ().Prop ("rotation", new Vector3 (0, 0, 0)).Ease (EaseType.EaseOutQuart))); G_01.Insert (2,HOTween.To (gameObject.transform, 0, new TweenParms ().Prop ("localScale", gameObject.transform.localScale).Ease (EaseType.EaseOutQuart))); G_01.Play(); } }
void buttonAnimation(int dir,string note) { Vector3 oScale = transform.localScale; Vector3 oPosition = transform.position; Sequence buttonSequence = new Sequence (); buttonSequence.Append(HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("localScale", oScale * tweenScale))); buttonSequence.Append(HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("localScale", oScale))); switch(dir){ case 0: buttonSequence.Insert(0,HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("position", new Vector3(oPosition.x+offset,oPosition.y,oPosition.z)))); buttonSequence.Insert(tweenDuration,HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("position", oPosition))); break; case 1: buttonSequence.Insert(0,HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("position", new Vector3(oPosition.x-offset,oPosition.y,oPosition.z)))); buttonSequence.Insert(tweenDuration,HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("position", oPosition))); break; case 2: buttonSequence.Insert(0,HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("position", new Vector3(oPosition.x,oPosition.y+offset,oPosition.z)))); buttonSequence.Insert(tweenDuration,HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("position", oPosition))); break; case 3: buttonSequence.Insert(0,HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("position", new Vector3(oPosition.x,oPosition.y-offset,oPosition.z)))); buttonSequence.Insert(tweenDuration,HOTween.To (transform, tweenDuration, new TweenParms ().Prop ("position", oPosition))); break; default: break; } buttonSequence.Play (); }
void buttonMove(int dir) { theBoard.zoomIn = true; Sequence keySequence = new Sequence (); if (dir == 1) { keySequence.Append (HOTween.To (theBoard.buttonList [dir].transform, animationDuration, new TweenParms ().Prop ("localScale", new Vector3 (4.0f, 3.0f, 1.0f)))); keySequence.Insert(0,HOTween.To (theBoard.buttonList [dir].transform, animationDuration, new TweenParms ().Prop ("position", new Vector3 (-0.65f, -1.2f, -2.0f)))); } else { keySequence.Append (HOTween.To (theBoard.buttonList [dir].transform, animationDuration, new TweenParms ().Prop ("localScale", new Vector3 (5.3f, 3.0f, 1.0f)))); keySequence.Insert(0,HOTween.To (theBoard.buttonList [dir].transform, animationDuration, new TweenParms ().Prop ("position", new Vector3 (0.0f, -1.2f, -2.0f)))); } keySequence.Play (); transform.position = new Vector3 (transform.position.x, transform.position.y, 10); }
public override void buildSequenceStart(Sequence s, int frameRate) { //need to add activate game object on start to 'reset' properly during reverse if(keys.Count > 0 && keys[0].frame > 0) { s.Insert(0.0f, HOTween.To(obj, ((float)keys[0].frame) / ((float)frameRate), new TweenParms().Prop("active", new AMPlugGOActive(startActive)).Ease(EaseType.Linear))); } }
void DelayedStart() { CopyCamParams(); introCamera.gameObject.SetActive( true ); float time = 0; Sequence seq = new Sequence( new SequenceParms().OnComplete( ActivateFinalAnim ).UpdateType(UpdateType.TimeScaleIndependentUpdate)); for( int i = 0 ; i < keyframes.Length ; i++ ) { seq.Insert( time , HOTween.To(_introCamTF,keyframes[i].duration,new TweenParms().Prop("rotation",keyframes[i].keyframe.rotation).UpdateType(UpdateType.TimeScaleIndependentUpdate))); seq.Insert( time , HOTween.To(_introCamTF,keyframes[i].duration,new TweenParms().Prop("position",keyframes[i].keyframe.position).UpdateType(UpdateType.TimeScaleIndependentUpdate))); time += ( keyframes[i].duration + keyframes[i].waitTime ); } seq.Play(); }
public void ShowMe(int curLvl) { this.Refresh(curLvl); Sequence sequence = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate).OnComplete(new TweenDelegate.TweenCallback(this.OnAnimEnd))); sequence.Append(HOTween.To(this.mWinBgSp, 0.25f, new TweenParms().Prop("color", new Color(this.mWinBgSp.color.r, this.mWinBgSp.color.g, this.mWinBgSp.color.b, 1f)))); sequence.Insert(0f, HOTween.To(this.mWinBg, 0.25f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutBack))); sequence.AppendInterval(3f); sequence.Append(HOTween.To(this.mWinBgSp, 0.25f, new TweenParms().Prop("color", new Color(this.mWinBgSp.color.r, this.mWinBgSp.color.g, this.mWinBgSp.color.b, 0f)))); sequence.Play(); }
public void checkSwipe(int checkID) { if (start && waitSwipe) { //Debug.Log("checkID="+checkID+" inputID="+inputID); if(checkID == inputID){ swipeNum+=1; correctSwipe+=1; } else{ swipeNum += 1; Sequence warning = new Sequence(); warning.Append(HOTween.To (watchBG,0.05f,new TweenParms().Prop("color",Color.red))); warning.Insert(0.05f,HOTween.To (watchBG,0.05f,new TweenParms().Prop("color",Color.white))); warning.Play(); } swiper theSwiper = swiperList [swiperID]; theSwiper.arrow [inputID - (swiperID * inputPerBut)].GetComponentInChildren<Renderer> ().material.color = regular; Vector3 tempPosition = theSwiper.arrow [inputID - (swiperID * inputPerBut)].GetComponentInChildren<Transform> ().position; tempPosition.z += 1; theSwiper.arrow [inputID - (swiperID * inputPerBut)].GetComponentInChildren<Transform> ().position = tempPosition; } waitSwipe = false; }
public void AddOneRecord(D2MData data) { this.mGUID2MRecordTable.AddData(new GUID2MRecordData(data)); if (data.Crit > 1) { this.mD2MCriticalLayer.Refresh(data.Crit); this.mD2MCriticalLayer.PlayD2MCriticalAnim(); } this.mGold.SetActive(true); this.mGoldTxt.text = data.Money.ToString(); Sequence sequence = new Sequence(); sequence.Append(HOTween.To(this.mGold.transform, 0f, new TweenParms().Prop("localPosition", Vector3.zero))); sequence.Insert(0f, HOTween.To(this.mGold.transform, 0.01f, new TweenParms().Prop("localScale", new Vector3(3f, 3f, 3f)))); sequence.Append(HOTween.To(this.mGold.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseInBack))); sequence.AppendInterval(0.5f); sequence.Append(HOTween.To(this.mGold.transform, 0.5f, new TweenParms().Prop("localPosition", new Vector3(0f, 120f, 0f)).Ease(EaseType.EaseOutQuad))); sequence.Append(HOTween.To(this.mGold.transform, 0f, new TweenParms().Prop("localScale", Vector3.zero))); sequence.Play(); this.mGUID2MRecordTable.Reposition(true); if (this.mGUID2MRecordTable.mDatas.Count >= 3) { base.StartCoroutine(this.UpdateScrollBar()); } }
// =================================================================================== // UNITY METHODS --------------------------------------------------------------------- void Start() { // HOTWEEN INITIALIZATION // Must be done only once, before the creation of your first tween // (you can skip this if you want, and HOTween will be initialized automatically // when you create your first tween - using default values) HOTween.Init(true, true, true); // TWEEN CREATION // With each one is shown a different way you can create a tween, // so that in the end you can choose what you prefer // Tween the first transform using fast writing mode, // and applying an animation that will last 4 seconds HOTween.To(CubeTrans1, 4, "position", new Vector3(-3, 6, 0)); // Tween the second transform using full mode with parameters and linebreaks, // applying a yoyo loop with custom ease, // and assigning an onStepComplete callback // which will be fired each time a loop iteration is complete. // Also note that we are tweening 2 proporties of the same target // (a transform, in this case) HOTween.To(CubeTrans2, 3, new TweenParms() .Prop("position", new Vector3(0, 6, 0), true) // Position tween (set as relative) .Prop("rotation", new Vector3(0, 1024, 0), true) // Relative rotation tween (this way rotations higher than 360 can be applied) .Loops(-1, LoopType.Yoyo) // Infinite yoyo loops .Ease(EaseType.EaseInOutQuad) // Ease .OnStepComplete(Cube2StepComplete) // OnComplete callback ); // Tween the sample string using full mode with parameters and without linebreaks. // The result will be shown using OnGUI HOTween.To(this, 3, new TweenParms().Prop("SampleString", "Hello I'm a sample tweened string").Ease(EaseType.Linear).Loops(-1, LoopType.Yoyo)); // Tween the sample floating point number while creating TweenParms first, // and then assigning it to HOTween. TweenParms tweenParms = new TweenParms().Prop("SampleFloat", 27.5f).Ease(EaseType.Linear).Loops(-1, LoopType.Yoyo); HOTween.To(this, 3, tweenParms); // SEQUENCE CREATION // Here you'll see how to create a Sequence, // which stores your tweens in a timeline-like way // Create a Sequence with cube3, which will rotate it, // then move it upwards, the rotate it again, // all the while changing the alpha of its material's color // (which can be done since the cube uses a transparent material). // The Sequence will also be set to loop. // Note that Sequences don't start automatically, so you'll have to call Play(). Color colorTo = CubeTrans3.GetComponent<Renderer>().material.color; colorTo.a = 0; Sequence sequence = new Sequence(new SequenceParms().Loops(-1, LoopType.Yoyo)); // "Append" will add a tween after the previous one/s have completed sequence.Append(HOTween.To(CubeTrans3, 1, new TweenParms().Prop("rotation", new Vector3(360, 0, 0)))); sequence.Append(HOTween.To(CubeTrans3, 1, new TweenParms().Prop("position", new Vector3(0, 6, 0), true))); sequence.Append(HOTween.To(CubeTrans3, 1, new TweenParms().Prop("rotation", new Vector3(0, 360, 0)))); // "Insert" lets you insert a tween where you want // (in this case we're having it start at half the sequence and last until the end) sequence.Insert(sequence.duration * 0.5f, HOTween.To(CubeTrans3.GetComponent<Renderer>().material, sequence.duration * 0.5f, new TweenParms().Prop("color", colorTo))); // Start the sequence animation sequence.Play(); }
void FingerLeft() { if(isLeft == 0 && isRight == 2){ isLeft = 1; Circle02.SetActive (true); TextAim.GetComponent<UILabel>().text = "按住左键向左移动"; LeftFingerTap = new Sequence (new SequenceParms().Loops(-1,LoopType.Restart)); LeftFingerTap.Prepend(HOTween.To (Circle02.transform, 1.2f, new TweenParms ().Prop ("localScale", new Vector3(1.2f,1.2f,0f)).Ease (EaseType.EaseInOutQuint))); LeftFingerTap.Insert (0,HOTween.To (Circle02.GetComponent<UISprite>(), 1.2f, new TweenParms ().Prop ("color", new Color(0.6f,0.6f,0.6f,0f)).Ease (EaseType.EaseInOutQuint))); LeftFingerTap.Play (); } if(GameController.GetInstance().moveLeft[0] == 1 && isLeft == 1){ isLeft = 2; LeftFingerTap.Kill(); Circle02.SetActive(false); } }
public void Build(string goName, bool autoKill, UpdateType updateType) { if(mSequence != null) { HOTween.Kill(mSequence); mInsertActionTrack = null; mActionTween = null; } mSequence = new Sequence( new SequenceParms() .Id(string.Format("{0}:{1}", goName, mTake.name)) .UpdateType(updateType) .AutoKill(autoKill) .Loops(mTake.numLoop, mTake.loopMode) .OnComplete(OnSequenceComplete)); mTake.maintainCaches(mTarget); float minWaitTime = float.MaxValue; List<List<AMActionData>> trackValueSets = null; foreach(AMTrack track in mTake.trackValues) { Object tgt = null; if((tgt = track.GetTarget(mTarget)) != null) { track.buildSequenceStart(this); int keyMax = track.keys.Count; if(keyMax > 0) { for(int keyInd = 0; keyInd < keyMax; keyInd++) { AMKey key = track.keys[keyInd]; key.build(this, track, keyInd, tgt); } float waitTime = track.keys[0].getWaitTime(mTake.frameRate, 0.0f); if(waitTime < minWaitTime) minWaitTime = waitTime; } //check to see if we have value sets for this track if(mInsertActionTrack != null) { if(trackValueSets == null) trackValueSets = new List<List<AMActionData>>(); trackValueSets.Add(mInsertActionTrack); mInsertActionTrack = null; } } } //build the value track mInsertActionTrack = null; if(trackValueSets != null && trackValueSets.Count > 0) { mActionTween = new AMActionTween(trackValueSets); mSequence.Insert(mActionTween.startTime, HOTween.To(this, mActionTween.duration, new TweenParms().Prop("id", mActionTween))); } //prepend delay at the beginning if(minWaitTime > 0.0f) mSequence.PrependInterval(minWaitTime); }
void SetupLevelSelectTween() { levelSelectTween = new Sequence(new SequenceParms().AutoKill(false)); for (int i = 0; i < levelSelectButtons.Length; i++) { var button = levelSelectButtons[i]; button.GetComponent<tk2dUIItem>().OnClickUIItem += levelSelected; button.SetWorldAndLevel(0,i); levelSelectTween.Insert(0, HOTween.From(button.transform, 0.5f, new TweenParms() .Prop("position", new Vector3(280,button.transform.position.y, 0)) .Ease(EaseType.EaseOutBack) )); } levelSelectTween.Insert(0, HOTween.From(levelSelectTitle.transform, 0.5f, new TweenParms() .Prop("position", new Vector3(levelSelectTitle.transform.position.x, 180, 0)) .Ease(EaseType.EaseOutQuad) )); }
void SetupWorldSelectTween() { worldSelectTween = new Sequence(new SequenceParms().AutoKill(false)); for (int i = 0; i < worldSelectButtons.Length; i++) { var button = worldSelectButtons[i]; // button.GetComponent<tk2dUIUpDownDisableButton>().Disabled = i > 0; button.GetComponent<tk2dUIItem>().OnClickUIItem += WorldSelected; worldSelectTween.Insert(1, HOTween.From(button.transform, 0.5f, new TweenParms() .Prop("position", new Vector3(button.transform.position.x, i % 2 == 0 ? 235 : -75, 0)) .Ease(EaseType.EaseOutBack) )); } worldSelectTween.Insert(1, HOTween.From(worldSelectTitle.transform, 0.5f, new TweenParms() .Prop("position", new Vector3(worldSelectTitle.transform.position.x, 180, 0)) .Ease(EaseType.EaseOutQuad) )); worldSelectTween.InsertCallback(1, PlayTransitionSound); }
void Ball02Solve(){ if (isSolve == true && GameController.GetInstance ().PlayerIsTriggered == false && GameController.GetInstance ().AutoOpenDoor02 == false) { TextAim.GetComponent<UILabel>().text = "因此我们需要使用间谍小球的特殊技能:机械附着。"; BallRobot02.GetComponent<Rigidbody> ().AddForce (-GameController.GetInstance ().MovePower, 0, 0); Camera01.transform.position = new Vector3 (BallRobot02.transform.position [0], BallRobot02.transform.position [1], -21.3f); } else if (GameController.GetInstance ().AutoOpenDoor02 == true && GameController.GetInstance ().IsOnce == true) { GameController.GetInstance ().IsOnce = false; BallRobot02.GetComponent<Rigidbody> ().Sleep (); Door02.GetComponent<tk2dSpriteAnimator> ().Play ("DoorOpen"); StartCoroutine (WaitDoor (1.2f)); } else if (GameController.GetInstance ().PlayerIsTriggered == true && GameController.GetInstance ().ObjectID.name == "Robot_a1-Body-2-SP") { TextAim.GetComponent<UILabel>().text = "试着手指向上滑屏,附着进这个机器人体内!"; GameController.GetInstance ().CurrentPlayer = BallRobot02; isUpSwiped = true; isSolve = false; BallRobot02.GetComponent<Rigidbody> ().Sleep (); if (GameController.GetInstance ().intoRobot == true) { BallRobot02.gameObject.SetActive (false); MissingBall = Instantiate (MissingBallPlayer, BallRobot02.gameObject.transform.position, Quaternion.identity) as GameObject; Sequence BallAnim = new Sequence (new SequenceParms ()); BallAnim.Prepend (HOTween.To (Camera01.gameObject.transform, 0.3f, new TweenParms ().Prop ("position", new Vector3 (Robot01.transform.position [0], Robot01.transform.position [1], -21.3f)))); BallAnim.Insert (0, HOTween.To (MissingBall.gameObject.transform, 0.15f, new TweenParms ().Prop ("localScale", new Vector3 (0.1f, 1.5f, 1f)))); BallAnim.Insert (0.1f, HOTween.To (MissingBall.gameObject.transform, 0.2f, new TweenParms ().Prop ("position", new Vector3 (MissingBall.gameObject.transform.position [0], MissingBall.gameObject.transform.position [1] + 2.3f, MissingBall.gameObject.transform.position [2])))); BallAnim.Insert (0.2f, HOTween.To (MissingBall.gameObject.GetComponent<tk2dSprite> (), 0.1f, new TweenParms ().Prop ("color", new Color (1, 1, 1, 0)))); BallAnim.Play (); //被操作的机器人(玩家机器人)半透明状态还原 GameController.GetInstance().ObjectID.gameObject.GetComponent<tk2dSprite>().color = new Color(1f, 1f, 1f, 1.0f); TweenParms Action05 = new TweenParms (); Action05.Prop ("position", new Vector3 (Robot01.transform.position [0], Robot01.transform.position [1], -21.3f)); Action05.Ease (EaseType.EaseOutQuart); HOTween.To (Camera01.transform, 0.3f, Action05); GameController.GetInstance ().CurrentPlayerTrigger = Robot01Trigger; GameController.GetInstance ().CurrentPlayerTrigger.GetComponent<WorkSpaceController>().isWorkSpacePlay = true; if( GameController.GetInstance().CurrentPlayerTrigger.GetComponent<WorkSpaceController>().isWorkSpacePlay == true){ GameController.GetInstance().CurrentPlayerTrigger.GetComponent<WorkSpaceController>().isWorkSpacePlay = false; GameController.GetInstance().CurrentPlayerTrigger.GetComponent<WorkSpaceController>().WorkSpaceControl(); } StartCoroutine (WaitRobot(0.8f)); } } }
void Start(){ BG1 = GameObject.Find("BG1").gameObject.GetComponent<Rigidbody>(); BG2 = GameObject.Find("BG2").gameObject.GetComponent<Rigidbody>(); switch (Application.loadedLevelName) { case "DemoTech": GameController.GetInstance().CameraSizeFollowed = 7.1f;//摄像机跟随时的画面深度 GameController.GetInstance().CameraSizeAll = 12.95f;//摄像机在观察者模式时的画面深度 GameController.GetInstance().ViewerLeftLine = -23.70f;//摄像机在观察者模式时的左极限 GameController.GetInstance().ViewerRightLine = 51.00f;//摄像机在观察者模式时的右极限 GameController.GetInstance().ViewerUpLine = 7.00f;//摄像机在观察者模式时的上极限 GameController.GetInstance().ViewerDownLine = 6.80f;//摄像机在观察者模式时的下极限 GameController.GetInstance().FollowedLeftLine = -33.50f;//摄像机跟随时的左极限 GameController.GetInstance().FollowedRightLine = 60.00f;//摄像机跟随时的右极限 break; case "Screen0101": GameController.GetInstance().CameraSizeFollowed = 7.1f;//摄像机跟随时的画面深度 GameController.GetInstance().CameraSizeAll = 12.95f;//摄像机在观察者模式时的画面深度 GameController.GetInstance().ViewerLeftLine = -23.40f;//摄像机在观察者模式时的左极限 GameController.GetInstance().ViewerRightLine = 50.00f;//摄像机在观察者模式时的右极限 GameController.GetInstance().ViewerUpLine = 7.00f;//摄像机在观察者模式时的上极限 GameController.GetInstance().ViewerDownLine = 6.80f;//摄像机在观察者模式时的下极限 GameController.GetInstance().FollowedLeftLine = -33.50f;//摄像机跟随时的左极限 GameController.GetInstance().FollowedRightLine = 60.00f;//摄像机跟随时的右极限 break; case "Screen0102": GameController.GetInstance().CameraSizeFollowed = 7.1f;//摄像机跟随时的画面深度 GameController.GetInstance().CameraSizeAll = 12.95f;//摄像机在观察者模式时的画面深度 GameController.GetInstance().ViewerLeftLine = -23.60f;//摄像机在观察者模式时的左极限 GameController.GetInstance().ViewerRightLine = 34.70f;//摄像机在观察者模式时的右极限 GameController.GetInstance().ViewerUpLine = 14.00f;//摄像机在观察者模式时的上极限 GameController.GetInstance().ViewerDownLine = 6.80f;//摄像机在观察者模式时的下极限 GameController.GetInstance().FollowedLeftLine = -33.50f;//摄像机跟随时的左极限 GameController.GetInstance().FollowedRightLine = 60.00f;//摄像机跟随时的右极限 break; case "Screen0103": GameController.GetInstance().CameraSizeFollowed = 7.1f;//摄像机跟随时的画面深度 GameController.GetInstance().CameraSizeAll = 12.95f;//摄像机在观察者模式时的画面深度 GameController.GetInstance().ViewerLeftLine = -23.60f;//摄像机在观察者模式时的左极限 GameController.GetInstance().ViewerRightLine = 42.72f;//摄像机在观察者模式时的右极限 GameController.GetInstance().ViewerUpLine = 14.00f;//摄像机在观察者模式时的上极限 GameController.GetInstance().ViewerDownLine = 7.71f;//摄像机在观察者模式时的下极限 GameController.GetInstance().FollowedLeftLine = -33.50f;//摄像机跟随时的左极限 GameController.GetInstance().FollowedRightLine = 60.00f;//摄像机跟随时的右极限 break; case "Screen0104": GameController.GetInstance().CameraSizeFollowed = 7.1f;//摄像机跟随时的画面深度 GameController.GetInstance().CameraSizeAll = 12.95f;//摄像机在观察者模式时的画面深度 GameController.GetInstance().ViewerLeftLine = -23.60f;//摄像机在观察者模式时的左极限 GameController.GetInstance().ViewerRightLine = 42.72f;//摄像机在观察者模式时的右极限 GameController.GetInstance().ViewerUpLine = 14.00f;//摄像机在观察者模式时的上极限 GameController.GetInstance().ViewerDownLine = 7.79f;//摄像机在观察者模式时的下极限 GameController.GetInstance().FollowedLeftLine = -33.50f;//摄像机跟随时的左极限 GameController.GetInstance().FollowedRightLine = 60.00f;//摄像机跟随时的右极限 break; case "Screen0105": GameController.GetInstance().CameraSizeFollowed = 7.1f;//摄像机跟随时的画面深度 GameController.GetInstance().CameraSizeAll = 12.95f;//摄像机在观察者模式时的画面深度 GameController.GetInstance().ViewerLeftLine = -23.3f;//摄像机在观察者模式时的左极限 GameController.GetInstance().ViewerRightLine = 49.60f;//摄像机在观察者模式时的右极限 GameController.GetInstance().ViewerUpLine = 14.60f;//摄像机在观察者模式时的上极限 GameController.GetInstance().ViewerDownLine = -15.30f;//摄像机在观察者模式时的下极限 GameController.GetInstance().FollowedLeftLine = -33.50f;//摄像机跟随时的左极限 GameController.GetInstance().FollowedRightLine = 60.00f;//摄像机跟随时的右极限 break; case "Screen0201": GameController.GetInstance().CameraSizeFollowed = 7.1f;//摄像机跟随时的画面深度 GameController.GetInstance().CameraSizeAll = 12.95f;//摄像机在观察者模式时的画面深度 GameController.GetInstance().ViewerLeftLine = -23.3f;//摄像机在观察者模式时的左极限 GameController.GetInstance().ViewerRightLine = 43.21f;//摄像机在观察者模式时的右极限 GameController.GetInstance().ViewerUpLine = 6.44f;//摄像机在观察者模式时的上极限 GameController.GetInstance().ViewerDownLine = 7.510f;//摄像机在观察者模式时的下极限 GameController.GetInstance().FollowedLeftLine = -33.50f;//摄像机跟随时的左极限 GameController.GetInstance().FollowedRightLine = 60.00f;//摄像机跟随时的右极限 break; } Sequence CameraInitialization = new Sequence (); CameraInitialization.Prepend (HOTween.To (Camera01, 2, new TweenParms ().Prop ("orthographicSize", GameController.GetInstance().CameraSizeFollowed).Ease (EaseType.EaseOutQuart))); CameraInitialization.Insert (0, HOTween.To (Camera01.transform, 2, new TweenParms ().Prop ("position", new Vector3(WinTag.transform.position[0], WinTag.transform.position[1], Camera01.transform.position[2])).Ease (EaseType.EaseOutQuart))); if(GameController.GetInstance().ViewerLeftLine - 3.0f <= GameController.GetInstance().CurrentPlayer.transform.position[0]){ CameraInitialization.Insert (3, HOTween.To (Camera01.transform, 2, new TweenParms ().Prop ("position", new Vector3(GameController.GetInstance().CurrentPlayer.transform.position[0], GameController.GetInstance().CurrentPlayer.transform.position[1], Camera01.transform.position[2])).Ease (EaseType.EaseOutQuart).OnComplete(CameraInitializationBack))); }else{ CameraInitialization.Insert (3, HOTween.To (Camera01.transform, 2, new TweenParms ().Prop ("position", new Vector3(GameController.GetInstance().FollowedLeftLine, GameController.GetInstance().CurrentPlayer.transform.position[1], Camera01.transform.position[2])).Ease (EaseType.EaseOutQuart).OnComplete(CameraInitializationBack))); } CameraInitialization.Play (); }
void Update(){ if(GameController.GetInstance().CameraInitializationState == true){ if(GameController.GetInstance().FilmMode == false){ if (GameController.GetInstance().intoViewMode == true && GameController.GetInstance().isCameraFollowed == true) { GameController.GetInstance().isCameraFollowed = false; Sequence AllView = new Sequence (); AllView.Prepend (HOTween.To (Camera01, 1, new TweenParms ().Prop ("orthographicSize", GameController.GetInstance().CameraSizeAll).Ease (EaseType.EaseOutQuart))); if(GameController.GetInstance().CurrentPlayer.transform.position [0] < GameController.GetInstance().ViewerLeftLine){ AllView.Insert (0, HOTween.To (Camera01.transform, 1, new TweenParms ().Prop ("position", new Vector3(GameController.GetInstance().ViewerLeftLine+0.13f, 6.9f, Camera01.transform.position[2])).Ease (EaseType.EaseOutQuart))); }else if(GameController.GetInstance().CurrentPlayer.transform.position [0] > GameController.GetInstance().ViewerRightLine) { AllView.Insert (0, HOTween.To (Camera01.transform, 1, new TweenParms ().Prop ("position", new Vector3(GameController.GetInstance().ViewerRightLine-1f, 6.9f, Camera01.transform.position[2])).Ease (EaseType.EaseOutQuart))); }else{ AllView.Insert (0, HOTween.To (Camera01.transform, 1, new TweenParms ().Prop ("position", new Vector3(GameController.GetInstance().CurrentPlayer.transform.position[0], 6.9f, Camera01.transform.position[2])).Ease (EaseType.EaseOutQuart))); } AllView.Play (); } else if(GameController.GetInstance().outViewMode == true && GameController.GetInstance().isCameraFollowed == false){ GameController.GetInstance().isCameraFollowed = true; Sequence CameraInitialization = new Sequence (); CameraInitialization.Prepend (HOTween.To (Camera01, 1, new TweenParms ().Prop ("orthographicSize", GameController.GetInstance().CameraSizeFollowed).Ease (EaseType.EaseOutQuart))); if(GameController.GetInstance().CurrentPlayer.transform.position [0] < GameController.GetInstance().ViewerLeftLine){ CameraInitialization.Insert (0, HOTween.To (Camera01.transform, 1, new TweenParms ().Prop ("position", new Vector3(GameController.GetInstance().ViewerLeftLine+0.13f, GameController.GetInstance().CurrentPlayer.gameObject.transform.position[1], Camera01.transform.position[2])).Ease (EaseType.EaseOutQuart))); }else if(GameController.GetInstance().CurrentPlayer.transform.position [0] > GameController.GetInstance().ViewerRightLine) { CameraInitialization.Insert (0, HOTween.To (Camera01.transform, 1, new TweenParms ().Prop ("position", new Vector3(GameController.GetInstance().ViewerRightLine-1f, GameController.GetInstance().CurrentPlayer.gameObject.transform.position[1], Camera01.transform.position[2])).Ease (EaseType.EaseOutQuart))); }else{ CameraInitialization.Insert (0, HOTween.To (Camera01.transform, 1, new TweenParms ().Prop ("position", new Vector3(GameController.GetInstance().CurrentPlayer.gameObject.transform.position[0], GameController.GetInstance().CurrentPlayer.gameObject.transform.position[1], Camera01.transform.position[2])).Ease (EaseType.EaseOutQuart))); } CameraInitialization.Play (); GameController.GetInstance().isCameraFollowed = true; } if(GameController.GetInstance().isCameraFollowed == false){ if(transform.position[0] > GameController.GetInstance().ViewerLeftLine && transform.position[0] < GameController.GetInstance().ViewerRightLine){ transform.position = new Vector3(transform.position[0]-GameController.GetInstance().deltaMove[0]*0.02f,transform.position[1],-21.3f); } if(transform.position[1] < GameController.GetInstance().ViewerUpLine && transform.position[1] > GameController.GetInstance().ViewerDownLine){ transform.position = new Vector3(transform.position[0],transform.position[1]-GameController.GetInstance().deltaMove[1]*0.02f,-21.3f); } if(transform.position[0] < GameController.GetInstance().ViewerLeftLine && GameController.GetInstance().deltaMove[0] < 0){ transform.position = new Vector3(transform.position[0]-GameController.GetInstance().deltaMove[0]*0.02f,transform.position[1],-21.3f); } if(transform.position[0] > GameController.GetInstance().ViewerRightLine && GameController.GetInstance().deltaMove[0] > 0){ transform.position = new Vector3(transform.position[0]-GameController.GetInstance().deltaMove[0]*0.02f,transform.position[1],-21.3f); } if(transform.position[1] < GameController.GetInstance().ViewerDownLine && GameController.GetInstance().deltaMove[1] < 0){ transform.position = new Vector3(transform.position[0],transform.position[1]-GameController.GetInstance().deltaMove[1]*0.02f,-21.3f); } if(transform.position[1] > GameController.GetInstance().ViewerUpLine && GameController.GetInstance().deltaMove[1] > 0){ transform.position = new Vector3(transform.position[0],transform.position[1]-GameController.GetInstance().deltaMove[1]*0.02f,-21.3f); } } } BG1.velocity = new Vector3(Camera01.velocity[0]/4,Camera01.velocity[1]/20,0); BG2.velocity = new Vector3(Camera01.velocity[0]/6,Camera01.velocity[1]/20,0); } }
public void TaskRotationZ() { ClearSequence(); CubeObject.gameObject.SetActive(true); sequence = new Sequence(); sequence.Insert(Delay,HOTween.To(CubeObject, RotationTime, new TweenParms().Prop("rotation", new Vector3(0, 0, RotationAngleZ),false))); sequence.Insert(RotationTime+Delay*2,HOTween.To(CubeObject, RotationTime*2, new TweenParms().Prop("rotation", new Vector3(0, 0, -RotationAngleZ),false))); sequence.Insert(RotationTime*3+Delay*3,HOTween.To(CubeObject, RotationTime, new TweenParms().Prop("rotation", new Vector3(0, 0, 0),false).OnStepComplete(Done))); sequence.Play(); }
void ViewerModeOut(){ if(isOutView == 0 && isView == 2){ TextAim.GetComponent<UILabel>().text = "点击此处的鹰眼开关,关闭鹰眼。"; OutViewTap = new Sequence (new SequenceParms().Loops(-1,LoopType.Restart)); isOutView = 1; Circle05.SetActive (true); OutViewTap.Prepend(HOTween.To (Circle05.transform, 1.2f, new TweenParms ().Prop ("localScale", new Vector3(1.2f,1.2f,0f)).Ease (EaseType.EaseInOutQuint))); OutViewTap.Insert (0,HOTween.To (Circle05.GetComponent<UISprite>(), 1.2f, new TweenParms ().Prop ("color", new Color(0.6f,0.6f,0.6f,0f)).Ease (EaseType.EaseInOutQuint))); OutViewTap.Play (); } if(GameController.GetInstance().outViewMode == true && isOutView == 1){ isOutView = 2; OutViewTap.Kill(); Circle05.SetActive(false); StartCoroutine(WaitFinal(2f)); } }
void ViewerMode(){ if(isView == 0 && isIntoView == 2){ TextAim.GetComponent<UILabel>().text = "手指在屏幕上拖动,来切换视野。"; isView = 1; Arrow03.SetActive (true); Arrow04.SetActive (true); ViewTap = new Sequence (new SequenceParms().Loops(-1,LoopType.Restart)); ViewTap.Prepend(HOTween.To (Arrow03.GetComponent<UISprite>(), 0.01f, new TweenParms ().Prop ("color", new Color(1f,1f,1f,1f)).Ease (EaseType.EaseInOutQuint))); ViewTap.Insert(0.01f,HOTween.To (Arrow03.GetComponent<UISprite>(), 1.2f, new TweenParms ().Prop ("color", new Color(1f,1f,1f,0f)).Ease (EaseType.EaseInOutQuint))); ViewTap.Insert(0.01f,HOTween.To (Arrow03.transform, 1.2f, new TweenParms ().Prop ("position", new Vector3(Arrow03.transform.position[0]-48f, Arrow03.transform.position[1], Arrow03.transform.position[2])).Ease (EaseType.EaseInOutQuint))); ViewTap.Insert(1.21f,HOTween.To (Arrow04.GetComponent<UISprite>(), 0.01f, new TweenParms ().Prop ("color", new Color(1f,1f,1f,1f)).Ease (EaseType.EaseInOutQuint))); ViewTap.Insert(1.22f,HOTween.To (Arrow04.GetComponent<UISprite>(), 1.2f, new TweenParms ().Prop ("color", new Color(1f,1f,1f,0f)).Ease (EaseType.EaseInOutQuint))); ViewTap.Insert(1.22f,HOTween.To (Arrow04.transform, 1.2f, new TweenParms ().Prop ("position", new Vector3(Arrow03.transform.position[0]+48f, Arrow04.transform.position[1], Arrow04.transform.position[2])).Ease (EaseType.EaseInOutQuint))); ViewTap.Play (); StartCoroutine(OutViewer(5f)); } }
void FingerDownSwipe(){ if(isDownSwiped == true && isDownOnce == false){ isDownOnce = true; isDownSwiped = false; Arrow02.SetActive (true); DownFingerSwipe = new Sequence (new SequenceParms().Loops(-1,LoopType.Restart)); DownFingerSwipe.Prepend(HOTween.To (Arrow02.GetComponent<UISprite>(), 0.01f, new TweenParms ().Prop ("color", new Color(1f,1f,1f,1f)).Ease (EaseType.EaseInOutQuint))); DownFingerSwipe.Insert(0.01f,HOTween.To (Arrow02.GetComponent<UISprite>(), 1.2f, new TweenParms ().Prop ("color", new Color(1f,1f,1f,0f)).Ease (EaseType.EaseInOutQuint))); DownFingerSwipe.Insert(0.01f,HOTween.To (Arrow02.transform, 1.2f, new TweenParms ().Prop ("position", new Vector3(Arrow02.transform.position[0], Arrow02.transform.position[1]-30f, Arrow02.transform.position[2])).Ease (EaseType.EaseInOutQuint))); DownFingerSwipe.Play (); } }
private void Refresh() { int num = 0; int num2 = 0; int num3 = 0; if (GameUIManager.mInstance.uiState.TrailCurLvl < Globals.Instance.Player.Data.TrialWave) { for (int i = GameUIManager.mInstance.uiState.TrailCurLvl + 1; i <= Globals.Instance.Player.Data.TrialWave; i++) { TrialInfo info = Globals.Instance.AttDB.TrialDict.GetInfo(i); if (info != null) { num += info.Value; num2 += info.Money; for (int j = 0; j < info.RewardType.Count; j++) { int num4 = info.RewardType[j]; if (num4 != 0) { if (num4 == 3) { if (j < info.RewardValue1.Count && j < info.RewardValue2.Count) { int num5 = info.RewardValue1[j]; if (num5 != 0) { ItemInfo info2 = Globals.Instance.AttDB.ItemDict.GetInfo(num5); if (info2 != null) { this.mGUITrialRewardItemTable.AddData(new GUITrialRewardItemData(ERewardType.EReward_Item, info2, info.RewardValue2[j], 0)); num3++; } } } } else if (num4 == 15) { if (j < info.RewardValue1.Count) { this.mGUITrialRewardItemTable.AddData(new GUITrialRewardItemData(ERewardType.EReward_Item, null, 0, info.RewardValue1[j])); } } else if (num4 == 17 && j < info.RewardValue1.Count) { this.mGUITrialRewardItemTable.AddData(new GUITrialRewardItemData(ERewardType.EReward_LopetSoul, null, 0, info.RewardValue1[j])); } } } } } } ActivityValueData valueMod = Globals.Instance.Player.ActivitySystem.GetValueMod(4); if (valueMod != null) { num *= valueMod.Value1 / 100; } Sequence sequence = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate)); sequence.Append(HOTween.To(this, 1f, new TweenParms().Prop("mMaxRecordNum", Globals.Instance.Player.Data.TrialMaxWave).OnUpdate(new TweenDelegate.TweenCallback(this.OnMaxRecordNumUpdate)))); sequence.Insert(0f, HOTween.To(this, 1f, new TweenParms().Prop("mWaveNum", Globals.Instance.Player.Data.TrialWave).OnUpdate(new TweenDelegate.TweenCallback(this.OnWaveNumUpdate)))); sequence.Insert(0f, HOTween.To(this, 1f, new TweenParms().Prop("mMoJingNum", num).OnUpdate(new TweenDelegate.TweenCallback(this.OnMoJingNumUpdate)))); sequence.Insert(0f, HOTween.To(this, 1f, new TweenParms().Prop("mMoneyNum", num2).OnUpdate(new TweenDelegate.TweenCallback(this.OnMoneyNumUpdate)))); Sequence sequence2 = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate)); sequence2.AppendInterval(0.2f); sequence2.Append(HOTween.To(this.mTitle.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutBack))); sequence2.AppendInterval(0.2f); sequence2.Append(HOTween.To(this.mMidBg.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutBack))); sequence2.AppendInterval(0.2f); sequence2.Append(sequence); if (num3 > 0) { sequence2.AppendInterval(0.1f); sequence2.Append(HOTween.To(this.mGUITrialRewardItemTable.transform, 0.15f, new TweenParms().Prop("localScale", Vector3.one))); } if (Globals.Instance.Player.Data.TrialMaxWave > GameUIManager.mInstance.uiState.TrailMaxRecord) { sequence2.AppendInterval(0.2f); sequence2.Append(HOTween.To(this.mMaxRecord.transform, 0.001f, new TweenParms().Prop("localScale", new Vector3(8f, 8f, 8f)))); sequence2.Append(HOTween.To(this.mMaxRecord.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseInCubic))); sequence2.AppendCallback(new TweenDelegate.TweenCallback(this.ShowMaxRecordEffect)); } sequence2.AppendInterval(0.2f); sequence2.Append(HOTween.To(this.mSureBtn.transform, 0.1f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutBack))); sequence2.Play(); }
public void BuildSequence(string goName, bool autoKill, UpdateType updateType, float startFrame = float.PositiveInfinity) { if(mSequence == null) { mSequence = new Sequence( new SequenceParms() .Id(string.Format("{0}:{1}", goName, name)) .UpdateType(updateType) .AutoKill(autoKill) .Loops(numLoop, loopMode) .OnComplete(OnSequenceComplete, null)); maintainCaches(); if(!float.IsInfinity(startFrame)) { if(startFrame > mSequence.duration * frameRate) startFrame /= mSequence.duration * frameRate; previewFrame(startFrame, false, true); } int numTweensAdded = 0; foreach(AMTrack track in trackValues) { track.buildSequenceStart(mSequence, frameRate); foreach(AMKey key in track.keys) { Tweener tween = key.buildTweener(mSequence, frameRate); if(tween != null) { mSequence.Insert(key.getWaitTime(frameRate, 0.0f), tween); numTweensAdded++; } } } if(numTweensAdded == 0) { HOTween.Kill(mSequence); mSequence = null; } } }
public void TaskRotateCamera() { ClearSequence(); foreach (GameObject o in GameObject3DList) { o.SetActive(true); } _camera.orthographic = false; RenderSettings.skybox = skybox; Actor.SetActive(true); sequence = new Sequence(); sequence.Insert(Delay,HOTween.To(CameraRotator.transform, RotationTime*2, new TweenParms().Prop("rotation", new Vector3(45, 0, 0),false))); sequence.Insert(Delay*2+RotationTime*2,HOTween.To(CameraRotator.transform, RotationTime*2, new TweenParms().Prop("rotation", new Vector3(0, 0, 0),false))); sequence.Insert(Delay*3+RotationTime*4,HOTween.To(CameraRotator.transform, RotationTime*2, new TweenParms().Prop("rotation", new Vector3(0, 90, 0),false))); sequence.Insert(Delay*4+RotationTime*6,HOTween.To(CameraRotator.transform, RotationTime*2, new TweenParms().Prop("rotation", new Vector3(0, -90, 0),false))); sequence.Insert(Delay*5+RotationTime*8,HOTween.To(CameraRotator.transform, RotationTime*2, new TweenParms().Prop("rotation", new Vector3(0, 0, 0),false).OnStepComplete(Done))); //sequence.Insert(RotationTime+Delay*2,HOTween.To(CubeObject, RotationTime*2, new TweenParms().Prop("rotation", new Vector3(0, 0, -RotationAngleZ),false))); //sequence.Insert(RotationTime*3+Delay*3,HOTween.To(CubeObject, RotationTime, new TweenParms().Prop("rotation", new Vector3(0, 0, 0),false).OnStepComplete(Done))); sequence.Play (); }
void FingerUp(){ if(isUp == 0 && isLeft == 2){ isUp = 1; Circle03.SetActive (true); TextAim.GetComponent<UILabel>().text = "轻按上键小球向上跳跃"; UpFingerTap = new Sequence (new SequenceParms().Loops(-1,LoopType.Restart)); UpFingerTap.Prepend(HOTween.To (Circle03.transform, 1.2f, new TweenParms ().Prop ("localScale", new Vector3(1.2f,1.2f,0f)).Ease (EaseType.EaseInOutQuint))); UpFingerTap.Insert (0,HOTween.To (Circle03.GetComponent<UISprite>(), 1.2f, new TweenParms ().Prop ("color", new Color(0.6f,0.6f,0.6f,0f)).Ease (EaseType.EaseInOutQuint))); UpFingerTap.Play (); } if(GameController.GetInstance().moveUp[0] == 1 && isUp == 1){ isUp = 2; UpFingerTap.Kill(); DoorOpener01.SetActive(true); Circle03.SetActive(false); TextAim.GetComponent<UILabel>().text = "前进!目标:潜入敌方工厂设施!"; } }