本文整理汇总了C#中Sequence.Play方法的典型用法代码示例。如果您正苦于以下问题:C# Sequence.Play方法的具体用法?C# Sequence.Play怎么用?C# Sequence.Play使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sequence
的用法示例。
在下文中一共展示了Sequence.Play方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: buttonAnimation
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 ();
}
开发者ID:antronshao001,项目名称:SwipeKey---Swipe-Based-Keyboard-Design-on-Smartwatch,代码行数:29,代码来源:swipeFive.cs
示例2: OnJellyfishDrain
void OnJellyfishDrain()
{
pulse = DOTween.Sequence().Pause().SetLoops(loopCount);
pulse.Append(image.DOColor(toColor, intervalOn).SetEase(easeOn));
pulse.Append(image.DOColor(Color.black, intervalOff).SetEase(easeOff));
pulse.Play();
}
示例3: FixedUpdate
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();
}
}
}
示例4: OnPlayerUpdateEvent
public void OnPlayerUpdateEvent()
{
int maxEnergy = Globals.Instance.Player.GetMaxEnergy();
if (this.mOldStaminaNum != Globals.Instance.Player.Data.Energy || Globals.Instance.Player.Data.Energy == 0)
{
this.mKeysValue.text = string.Format("{0}/{1}", Globals.Instance.Player.Data.Energy, maxEnergy);
if (this.mOldStaminaNum != 0)
{
Sequence sequence = new Sequence();
sequence.Append(HOTween.To(this.mKeysValue.gameObject.transform, 0.15f, new TweenParms().Prop("localScale", new Vector3(1.5f, 1.5f, 1.5f))));
sequence.Append(HOTween.To(this.mKeysValue.gameObject.transform, 0.15f, new TweenParms().Prop("localScale", Vector3.one)));
sequence.Play();
}
this.mOldStaminaNum = Globals.Instance.Player.Data.Energy;
}
int maxStamina = Globals.Instance.Player.GetMaxStamina();
if (this.mOldJingliNum != Globals.Instance.Player.Data.Stamina || Globals.Instance.Player.Data.Stamina == 0)
{
this.mJingliValue.text = string.Format("{0}/{1}", Globals.Instance.Player.Data.Stamina, maxStamina);
if (this.mOldJingliNum != 0)
{
Sequence sequence2 = new Sequence();
sequence2.Append(HOTween.To(this.mJingliValue.gameObject.transform, 0.15f, new TweenParms().Prop("localScale", new Vector3(1.5f, 1.5f, 1.5f))));
sequence2.Append(HOTween.To(this.mJingliValue.gameObject.transform, 0.15f, new TweenParms().Prop("localScale", Vector3.one)));
sequence2.Play();
}
this.mOldJingliNum = Globals.Instance.Player.Data.Stamina;
}
this.Refresh();
}
示例5: OnPostLoadGUI
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();
}
示例6: AimAnim
void AimAnim(){
Vector3 v1 = new Vector3 (0,0,179);
Vector3 v2 = new Vector3 (0,0,-179);
Sequence AimAnim = new Sequence(new SequenceParms().Loops(-1,LoopType.Restart));
AimAnim.Prepend(HOTween.To(WorkSpaceComponent [0].transform, 1, new TweenParms().Prop("rotation", v1)));
AimAnim.Append(HOTween.To(WorkSpaceComponent [0].transform, 1, new TweenParms().Prop("rotation", v2)));
AimAnim.Play ();//旋转瞄准镜动画
}
示例7: OnEmotionClick
private void OnEmotionClick(GameObject go)
{
Globals.Instance.EffectSoundMgr.Play("ui/ui_001");
Sequence sequence = new Sequence();
sequence.Append(HOTween.To(base.transform, 0.1f, new TweenParms().Prop("localScale", new Vector3(0.9f, 0.9f, 0.9f))));
sequence.Append(HOTween.To(base.transform, 0.1f, new TweenParms().Prop("localScale", Vector3.one)));
sequence.Play();
this.mBaseLayer.AppendChatMsg(this.EmotionTag);
}
示例8: gunAnimation
void gunAnimation()
{
if(sequence!=null)sequence.Kill();
//transform.localRotation
sequence = new Sequence(new SequenceParms());
sequence.Append(HOTween.To(transform, pushBackTime, new TweenParms().Prop("localRotation", new Vector3(fireAngle, 0, 0),false).Ease(EaseType.EaseInQuart)));
sequence.Append(HOTween.To(transform, recoveryTime, new TweenParms().Prop("localRotation", new Vector3(0, 0, 0),false).Ease(EaseType.EaseInQuart)));
sequence.Play();
}
示例9: buttonMove
void buttonMove(int dir)
{
theBoard.zoomIn = true;
Sequence keySequence = new Sequence ();
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);
}
开发者ID:antronshao001,项目名称:SwipeKey---Swipe-Based-Keyboard-Design-on-Smartwatch,代码行数:10,代码来源:SwiperKey.cs
示例10: ShowMe
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();
}
示例11: Start
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();
}
}
示例12: Start
// Use this for initialization
void Start()
{
seq = DOTween.Sequence();
seq.Prepend(transform.DOLocalMove(new Vector3(0.0f,0.0f,8.0f),0.8f).SetEase(Ease.OutSine)); //中心点を経由
seq.Join(transform.DOLocalRotate(Vector3.zero, 0.8f).SetEase(Ease.Linear));
seq.Append(transform.DOLocalMove(new Vector3(10.0f, -24.0f,8.0f), 0.8f).SetEase(Ease.InSine));
seq.Join(transform.DOLocalRotate(new Vector3(0.0f,0.0f,-179.0f), 0.8f).SetEase(Ease.Linear));
//終了地点
seq.Play();
}
示例13: Start
//摄像机初始时播放镜头推进放大动画
void Start () {
GuardBody = transform.parent.transform.parent.gameObject.transform;
if (isPrefab == 0) {
//一般情况下a型号警卫的运动方式
Guard_a_Movement = new Sequence (new SequenceParms ().Loops (-1, LoopType.Restart));
Guard_a_Movement.Prepend (HOTween.To (GuardBody, time, new TweenParms ().Prop ("position", new Vector3 (GuardBody.position [0] - x, GuardBody.position [1], GuardBody.position [2]))));
Guard_a_Movement.Append (HOTween.To (transform.parent.gameObject.transform, 2, new TweenParms ().Prop ("rotation", new Vector3 (0, 0, 108)).Ease (EaseType.EaseOutQuart)));
Guard_a_Movement.Append (HOTween.To (GuardBody, time, new TweenParms ().Prop ("position", new Vector3 (GuardBody.position [0], GuardBody.position [1], GuardBody.position [2]))));
Guard_a_Movement.Append (HOTween.To (transform.parent.gameObject.transform, 2, new TweenParms ().Prop ("rotation", new Vector3 (0, 0, 0)).Ease (EaseType.EaseOutQuart)));
Guard_a_Movement.Play ();
}
}
示例14: ChangeMusic
public void ChangeMusic(AudioClip audio)
{
currentSong = audio;
Sequence sequence = new Sequence ();
sequence.Append ( HOTween.To ( Camera.main.audio, 0.5f, new TweenParms ()
.Prop ( "volume", 0f )
.Ease ( EaseType.Linear )
.OnComplete( SetMusic )
));
sequence.Append ( HOTween.To ( Camera.main.audio, 0.5f, new TweenParms ()
.Prop ( "volume", 1f )
.Ease ( EaseType.Linear )
));
sequence.Play ();
}
示例15: Refresh
public void Refresh(bool isInit)
{
GuildWarClient mGWEnterData = Globals.Instance.Player.GuildSystem.mGWEnterData;
if (mGWEnterData != null)
{
EGuildWarTeamId selfTeamFlag = Globals.Instance.Player.GuildSystem.GetSelfTeamFlag();
this.mRedName.text = mGWEnterData.Red.GuildName;
if (selfTeamFlag == EGuildWarTeamId.EGWTI_Red)
{
this.mRedName.color = Color.green;
}
else
{
this.mRedName.color = Color.white;
}
string text = mGWEnterData.Red.Score.ToString();
if (!isInit && !this.mRedScore.text.Equals(text))
{
Sequence sequence = new Sequence();
sequence.Append(HOTween.To(this.mRedScore.gameObject.transform, 0.2f, new TweenParms().Prop("localScale", new Vector3(1.8f, 1.8f, 1.8f))));
sequence.Append(HOTween.To(this.mRedScore.gameObject.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one)));
sequence.Play();
}
this.mRedScore.text = text;
this.mRedScore.color = this.GetScoreColor(mGWEnterData.Red.Score);
this.mRedBgScore.text = string.Format("/{0}", GameConst.GetInt32(220));
this.mBlueName.text = mGWEnterData.Blue.GuildName;
if (selfTeamFlag == EGuildWarTeamId.EGWTI_Blue)
{
this.mBlueName.color = Color.green;
}
else
{
this.mBlueName.color = Color.white;
}
string text2 = mGWEnterData.Blue.Score.ToString();
if (!isInit && !this.mBlueScore.text.Equals(text2))
{
Sequence sequence2 = new Sequence();
sequence2.Append(HOTween.To(this.mBlueScore.gameObject.transform, 0.2f, new TweenParms().Prop("localScale", new Vector3(1.8f, 1.8f, 1.8f))));
sequence2.Append(HOTween.To(this.mBlueScore.gameObject.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one)));
sequence2.Play();
}
this.mBlueScore.text = text2;
this.mBlueScore.color = this.GetScoreColor(mGWEnterData.Blue.Score);
this.mBlueBgScore.text = string.Format("/{0}", GameConst.GetInt32(220));
}
}