当前位置: 首页>>代码示例>>C#>>正文


C# Spine.GetCurrent方法代码示例

本文整理汇总了C#中Spine.GetCurrent方法的典型用法代码示例。如果您正苦于以下问题:C# Spine.GetCurrent方法的具体用法?C# Spine.GetCurrent怎么用?C# Spine.GetCurrent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Spine的用法示例。


在下文中一共展示了Spine.GetCurrent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: state_End

 void state_End(Spine.AnimationState state, int trackIndex)
 {
     if (state.GetCurrent(trackIndex) + "" == "animation") {
         changeAniamtion = true;
     }
     if (state.GetCurrent(trackIndex) + "" == "animation3") {
         Destroy(this.gameObject);
     }
 }
开发者ID:Venbb,项目名称:Games,代码行数:9,代码来源:CloudEffectManager.cs

示例2: state_End

 void state_End(Spine.AnimationState state, int trackIndex)
 {
     if (state.GetCurrent(trackIndex) + "" == "zoom_out2")
     {
         bgAnimationScript.state.SetAnimation(5, "stay", false);
     }
     if (state.GetCurrent(trackIndex) + "" == "stay")
     {
         Application.LoadLevel("fighting");
     }
 }
开发者ID:Venbb,项目名称:Games,代码行数:11,代码来源:CameraChangeInterface.cs

示例3: state_End

 void state_End(Spine.AnimationState state, int trackIndex)
 {
     if (state.GetCurrent(trackIndex) + "" == "stay") {
         m_a.state.SetAnimation(1, "zoom_in", false);
     }
     if (state.GetCurrent(trackIndex) + "" == "zoom_in")
     {
         m_a.state.SetAnimation(2, "zoom_out", false);
     }
     if (state.GetCurrent(trackIndex) + "" == "zoom_out")
     {
         m_a.state.SetAnimation(3, "stay", false);
     }
 }
开发者ID:Venbb,项目名称:Games,代码行数:14,代码来源:BgTest.cs

示例4: state_End

 //void state_Event(Spine.AnimationState state, int trackIndex, Spine.Event e)
 //{
 //    if (e + "" == "zhongjian")
 //    {
 //        Debug.Log("zhongjian!");
 //        Instantiate(m_arrowArea, new Vector2(0, 0), Quaternion.Euler(0, 0, 0));
 //        return;
 //    }
 //    if (e + "" == "tankai" )
 //    {
 //        isCheckBlock = true;
 //        checkTime = 0.05f;
 //        //try
 //        //{
 //        //    m_hit = Physics2D.Linecast(this.transform.position, playerObj.transform.position, 1 << LayerMask.NameToLayer("Block"));
 //        //    if (m_hit)
 //        //    {
 //        //        Debug.Log("block my arrow");
 //        //        beenBlock();
 //        //    }
 //        //}
 //        //catch {
 //        //    // exception
 //        //}
 //    }
 //}
 void state_End(Spine.AnimationState state, int trackIndex)
 {
     if (state.GetCurrent(trackIndex) + "" == "animation") {
         Instantiate(m_arrowStand, new Vector2(4.2f , 4.7f), Quaternion.Euler(0, 0, 0));
         m_audioManager.archerkill();
         Destroy(this.gameObject);
     }
 }
开发者ID:Venbb,项目名称:Games,代码行数:34,代码来源:ArcherManager.cs

示例5: state_End

 void state_End(Spine.AnimationState state, int trackIndex)
 {
     if (state.GetCurrent(trackIndex) + "" == "zoom_out2")
     {
         bgAnimationScript.state.SetAnimation(5, "stay", false);
         GameObject.Find("EnemyCreator").GetComponent<EnemyManager>().isPause = false;
         m_TouchController.setTouchState("fight");
     }
 }
开发者ID:Venbb,项目名称:Games,代码行数:9,代码来源:CameraChange.cs

示例6: AnimationStartListener

 // call when Spine animation START
 void AnimationStartListener(Spine.AnimationState state, int trackIndex)
 {
     // DEBUG animation name
     debug_AniName.text = state.GetCurrent(0).ToString();
     drawTimelineHeight = (drawTimelineHeight == 10) ? 1:10;
     switch (state.GetCurrent(0).ToString()) {
     case "jump" :
         animTimelineColor = Color.green;
         break;
     case "fall" :
         animTimelineColor = Color.red;
         break;
     case "forward" :
         animTimelineColor = Color.blue;
         break;
     case "dashBackward" :
         animTimelineColor = Color.black;
         break;
     default :
         animTimelineColor = Color.white;
         break;
     }
 }
开发者ID:VQZX,项目名称:TAG,代码行数:24,代码来源:TransformDebug.cs

示例7: AnimationStartListener

    // call when Spine animation START
    void AnimationStartListener(Spine.AnimationState state, int trackIndex)
    {
        // DEBUG animation name
        debug_AniName.text = state.GetCurrent(0).ToString();

        // get current animation
        currentAnimation = state.GetCurrent(trackIndex).ToString();
        cancelable = false;
        nonCancelableTime = Time.time + state.GetCurrent(trackIndex).time;
    }
开发者ID:VQZX,项目名称:TAG,代码行数:11,代码来源:BattleInputController.cs

示例8: state_End

    void state_End(Spine.AnimationState state, int trackIndex)
    {
        if(state.GetCurrent(trackIndex) + "" == "skill_touch" && isLaunchSkill){
            actionNumber = 6;
            attackAudioScript.skillLanding();
        }

        if (state.GetCurrent(trackIndex) + "" == "block2") {
            actionNumber = 7;
        }

        if (state.GetCurrent(trackIndex) + "" == "chongsheng")
        {
            animationTest.loop = true;
            actionNumber = 0;
            playerState = "stand";
            GameObject.FindGameObjectWithTag("EnemyManager").GetComponent<EnemyManager>().isPause = false;
        }
    }
开发者ID:Venbb,项目名称:Games,代码行数:19,代码来源:PlayerActions.cs

示例9: End

	//Animation Finished
	public void End(Spine.AnimationState state, int trackIndex) {
		overridePlaying = true;
		Finish(state.GetCurrent(trackIndex).ToString());
	}
开发者ID:schellrom,项目名称:freeevening,代码行数:5,代码来源:Monster.cs

示例10: state_End

 void state_End(Spine.AnimationState state, int trackIndex)
 {
     if (state.GetCurrent(trackIndex) + "" == "tankai") {
         Destroy(this.gameObject);
     }
 }
开发者ID:Venbb,项目名称:Games,代码行数:6,代码来源:ArrowsManager.cs

示例11: HandleStart

    void HandleStart(Spine.AnimationState state, int trackIndex)
    {
        //must use first track for now
        if(trackIndex != 0)
            return;

        rootMotionCurve = null;
        rootMotionCurveY = null;

        // get current animation
        Spine.Animation anim = state.GetCurrent(trackIndex).Animation;

        //find the root bone's translate curve
        foreach(Timeline t in anim.Timelines){
            if(t.GetType() != typeof(TranslateTimeline))
                continue;

            TranslateTimeline tt = (TranslateTimeline)t;
            if(tt.boneIndex == rootBoneIndex){

                //sample the root curve's X value
                //TODO:  cache this data?  Maybe implement RootMotionTimeline instead and keep it in SkeletonData
                rootMotionCurve = new AnimationCurve();
                rootMotionCurveY = new AnimationCurve();

                float time = 0;
                float increment = 1f/30f;
                int frameCount = Mathf.FloorToInt(anim.Duration / increment);

                for(int i = 0; i <= frameCount; i++){
                    Vector2 v = GetXYAtTime(tt, time);
                    rootMotionCurve.AddKey(time, v.x);
                    rootMotionCurveY.AddKey(time, v.y);
                    time += increment;
                }

                break;
            }
        }
    }
开发者ID:VQZX,项目名称:TAG,代码行数:40,代码来源:SkeletonRootMotion.cs

示例12: state_End

 void state_End(Spine.AnimationState state, int trackIndex)
 {
     if (state.GetCurrent(trackIndex) + "" == "daojishi") {
         countDownAnimation.state.SetAnimation(2, "bao", false);
     }
     //if (state.GetCurrent(trackIndex) + "" == "bao")
     //{
     //    GameObject.Find("Canvas").GetComponent<CreatUISence>().ReviveTimeOut();
     //}
 }
开发者ID:Venbb,项目名称:Games,代码行数:10,代码来源:ReviveManager.cs

示例13: AnimationStartListener

    // call when Spine animation START
    void AnimationStartListener(Spine.AnimationState state, int trackIndex)
    {
        // GET CURRENT ANIMATION
        currentAnimation = state.GetCurrent(trackIndex).ToString();
        cancelable = false;

        // SET GRAVITY SCALE TO ZERO FOR JUMP ACTIONS
        if (currentAnimation == "jump" || currentAnimation == "airJump") {
            Debug.Log("GRAVITY = 0");
            rigibody.gravityScale = 0;
        }
    }
开发者ID:VQZX,项目名称:TAG,代码行数:13,代码来源:SpineController1.cs

示例14: AnimationStartListener

    // call when Spine animation START
    void AnimationStartListener(Spine.AnimationState state, int trackIndex)
    {
        //Debug.Log ("[Start]: " + state);
        // GET CURRENT ANIMATION
        currentAnimation = state.GetCurrent(trackIndex).ToString();
        cancelable = false;

        queueable = false;
        queueableTime = Time.time + state.GetCurrent(trackIndex).endTime - queueDuration;

        // SET isKinematic TO TRUE, SO CHARACTER WILL NOT EFFECT BY GRAVITY
        if (currentAnimation == "jump" || currentAnimation == "airJump") {
            rigibody.isKinematic = true;
            jumpCount += 1;
            if (jumpCount > 1 ) {
                jumpFinish = true;
            }
        }
    }
开发者ID:VQZX,项目名称:TAG,代码行数:20,代码来源:SpineController2.cs

示例15: AnimationCompleteListener

 // call when Spine animation COMPLETE
 void AnimationCompleteListener(Spine.AnimationState state, int trackIndex , int loopCount)
 {
     lastAnimation = state.GetCurrent(trackIndex).ToString();
     cancelable = true;
     if (currentAnimation == "ready" || currentAnimation == "forward")
         return;
     //Debug.Log ("[COMPLETE]: " + state);
     //Debug.Log (stateQueue.Count);
     // IF NEXT STATE IS NOT EXISTS, SET TO READY STATE
     if (stateQueue.Count == 0 ) {
         //Debug.Log("RESET STATE TO READY WHEN ANIMATION OVER.");
         if (grounded) {
             ResetAnimation();
         } else {
             m_state = AnimState.Fall;
             SetAnimation(0, "fall", true);
         }
     }
 }
开发者ID:VQZX,项目名称:TAG,代码行数:20,代码来源:SpineController2.cs


注:本文中的Spine.GetCurrent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。