• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SkeletonAnimation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SkeletonAnimation的典型用法代码示例。如果您正苦于以下问题:C# SkeletonAnimation类的具体用法?C# SkeletonAnimation怎么用?C# SkeletonAnimation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SkeletonAnimation类属于命名空间,在下文中一共展示了SkeletonAnimation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Start

	void Start () 
    {                
        gmc = GameObject.FindGameObjectWithTag("GameController").GetComponent<Spawner>();
        print(gmc.sprites[gmc.num]);
		/*anim = GameObject.FindGameObjectsWithTag("animation");
		anim.SetActive(false);*/
		skeletonAnimation = GameObject.FindGameObjectWithTag("animation").GetComponent<SkeletonAnimation>();
		skeletonAnimation.enabled = true;
		gmv = GameObject.FindGameObjectWithTag("GameOver");
		cnt = GameObject.FindGameObjectWithTag("animation");
		//gmv.SetActive(false);
		gameOv =GameObject.FindGameObjectWithTag("GameOver").GetComponent<SkeletonAnimation>();
		if(this.gameObject.GetComponent<TapCounter>().enabled){
			skeletonAnimation.state.SetAnimation(0, "tap_amount_in", false);
			skeletonAnimation.state.AddAnimation(0, "tap_amount_loop", true, 0.3f);
		}
		gmv.SetActive(false);
		cnt.SetActive(true);

		/*gmv = GameObject.FindGameObjectWithTag("GameOver");
		cnt = GameObject.FindGameObjectWithTag("animation");
		gmv.SetActive(false);*/
        AudioSource[] sources = GetComponents<AudioSource>();
        tap = sources[0];
        bad = sources[1];
        good = sources[2];

		spw = GameObject.FindGameObjectWithTag("GameController").GetComponent<Spawner>();
		sc = GameObject.FindGameObjectWithTag("Score").GetComponent<ScoreController>();
		scoreCounter.text = "";

	}
开发者ID:Ankharia,项目名称:SpeedRun,代码行数:32,代码来源:TapCounter.cs


示例2: Start

 void Start()
 {
     m_anim = GetComponent< SkeletonAnimation > ();
     m_anim.state.Event += HandleEvent;
     m_anim.state.End += EndEvent;
     SetAnimation (PLAYER_IDLE_ANIN, true);
 }
开发者ID:yanzuzu,项目名称:GreekBasketball,代码行数:7,代码来源:PlayerController.cs


示例3: Start

 // Use this for initialization
 void Start()
 {
     tweenOrthoSize = GetComponent<TweenOrthoSize>();
     tweenPosition = GetComponent<TweenPosition>();
     TouchUI = GameObject.Find("TouchUI");
     skeletonAnimation = GameObject.Find("title").GetComponent<SkeletonAnimation>();
 }
开发者ID:dev-celvin,项目名称:DK,代码行数:8,代码来源:StartScene.cs


示例4: Start

	// Use this for initialization
	void Start () {
		skeletonAnimation = GameObject.FindGameObjectWithTag("animation").GetComponent<SkeletonAnimation>();
		//Invoke("BeginUI", 0);
		//Invoke("UImenu", 0.4f);
		skeletonAnimation.state.SetAnimation(0, "menu_in", false);
		skeletonAnimation.state.AddAnimation(0, "menu_loop", true, 0);
	}
开发者ID:Ankharia,项目名称:SpeedRun,代码行数:8,代码来源:UIController.cs


示例5: Start

 void Start()
 {
     skeletonAnimation = GetComponent<SkeletonAnimation>();
     ColiderScript cs = GetComponentInChildren<ColiderScript>();
     cs.TriggerEnter += OnTriggerEnter;
     cs.CollisionEnter += OnCollisionEnter;
 }
开发者ID:supermax143,项目名称:unity-projects,代码行数:7,代码来源:DragonControllerScript.cs


示例6: Start

    void Start()
    {
        Anim = GetComponent<SkeletonAnimation>();

        Anim.state.SetAnimation(0, "boywalk", true);
        transform.DOMove(endPositon, timeMove).OnComplete(turnOffAnim);
    }
开发者ID:quangdai02031994,项目名称:Come-Back-Home,代码行数:7,代码来源:PlayerController.cs


示例7: Start

    public void Start()
    {
        skeletonAnimation = GetComponent<SkeletonAnimation>();
        skeletonAnimation.state.SetAnimation(0, "walk", true);

        skeletonAnimation.state.Event += new EventHandler<EventTriggeredArgs>(Event);
    }
开发者ID:reneretz,项目名称:spine-runtimes,代码行数:7,代码来源:Spineboy.cs


示例8: Start

	void Start () 
	{
		originalPosition = transform.position;
		originalScale = transform.localScale;

		audioSource = GetComponent<AudioSource>();
		spine = GetComponent<SkeletonAnimation>();
	}
开发者ID:ClazzX1,项目名称:BussStopOCD,代码行数:8,代码来源:Character.cs


示例9: Start

 // Use this for initialization
 void Start()
 {
     m_transform = this.transform;
     m_animation = this.GetComponent<SkeletonAnimation>();
     m_animation.timeScale = Random.Range(0.8f, 1.2f);
     m_animation.state.Event += state_Event;
     m_animation.state.End += state_End;
 }
开发者ID:Venbb,项目名称:Games,代码行数:9,代码来源:CrowMove.cs


示例10: Start

    void Start()
    {
        mama_Anim = mama.GetComponent<SkeletonAnimation>();

        Mama_ChangeAnimaton(AnimationNames.lv_finish_mama_walk, true);
        house_door.transform.DOMove(endCua.position, 1).OnComplete(change_isMove);
        Inst = this;
    }
开发者ID:quangdai02031994,项目名称:Come-Back-Home,代码行数:8,代码来源:BackGroundController.cs


示例11: Start

	void Start () {
		// Make sure you get these AnimationState and Skeleton references in Start or Later. Getting and using them in Awake is not guaranteed by default execution order.
		skeletonAnimation = GetComponent<SkeletonAnimation>();
		spineAnimationState = skeletonAnimation.state;
		skeleton = skeletonAnimation.skeleton;

		StartCoroutine(DoDemoRoutine());
	}
开发者ID:X-Ray-Jin,项目名称:spine-runtimes,代码行数:8,代码来源:SpineBeginnerTwo.cs


示例12: Start

 void Start()
 {
     transform.parent = null;
     controller = GetComponent<Controller2D>();
     gravity = -(2 * jumpHeight) / Mathf.Pow(timeToJumpApex, 2);
     jumpVelocity = Mathf.Abs(gravity) * timeToJumpApex;
     spineAnim = GetComponent<SkeletonAnimation>();
     randomMeow = Random.Range (1.5f, 3f);
 }
开发者ID:elrod,项目名称:Aegyptia,代码行数:9,代码来源:Cat.cs


示例13: Start

	void Start() {
		if (speedReference == null)
			speedReference = transform;

		skeletonAnimation = GetComponent<SkeletonAnimation>();
		bone = SpineBone.GetBone(boneName, skeletonAnimation);
		skeletonAnimation.UpdateLocal += UpdateLocal;
		lastPosition = speedReference.position;
	}
开发者ID:Lucius0,项目名称:spine-runtimes,代码行数:9,代码来源:DynamicSpineBone.cs


示例14: Awake

    void Awake()
    {
        _equipment = GetComponent<EquipmentComponent>();
        _movement = GetComponent<MovementComponent>();
        _health = GetComponent<HealthComponent>();
        _skelAnim = GetComponent<SkeletonAnimation>();

        _health.armorValue = _equipment.GetArmor();
    }
开发者ID:SergeiKotov,项目名称:FightAgain-,代码行数:9,代码来源:PlayerMovement.cs


示例15: Start

	void Start() {
		// Get the SkeletonAnimation component for the GameObject this script is attached to.
		skeletonAnimation = GetComponent<SkeletonAnimation>();
		// Call our method any time an animation fires an event.
		skeletonAnimation.state.Event += Event;
		// Queue jump to be played on track 0 two seconds after the starting animation.
		skeletonAnimation.state.AddAnimation(0, "jump", false, 2);
		// Queue walk to be looped on track 0 after the jump animation.
		skeletonAnimation.state.AddAnimation(0, "run", true, 0);
	}
开发者ID:Bee-Cave-Games,项目名称:spine-runtimes,代码行数:10,代码来源:Spineboy.cs


示例16: Start

 // Use this for initialization
 void Start()
 {
     sktAnimator = GetComponent<SkeletonAnimator>();
     if (sktAnimator == null)
     {
         Debug.LogError("sktAnimator == null");
     }
     else
     {
         sktAnimator.GetSkeleton().flipX = true;
         sktAnimator.GetSkeleton().SetColor(new Color(1.0f, 0.0f, 0.0f));
     }
     sktAnimation = GetComponent<SkeletonAnimation>();
     if (sktAnimation == null)
     {
         Debug.LogError("sktAnimation == null");
     }
     else
     {
         Debug.Log("animation : " + sktAnimation.state.GetCurrent(0));
     }
     animator = GetComponent<Animator>();
     if (animator == null)
     {
         Debug.LogError("animator == null");
     }
     else
     {
         AnimatorClipInfo[] items = animator.GetCurrentAnimatorClipInfo(0);
         Debug.Log("items length : " + items.Length);
         foreach (AnimatorClipInfo item in items)
         {
             Debug.Log("" + item.clip.name);
         }
         Debug.Log("ok");
         //  Debug.Log ("animator : " + animator.GetComponent<UnityEngine.Animation>().name);
     }
     sktUtility = GetComponent<SkeletonUtility>();
     if (sktUtility == null)
     {
         Debug.LogError ("sktUtility == null");
     }
     else
     {
         Debug.Log ("123123" + sktUtility.skeletonAnimation.Skeleton.Slots);
         //  foreach (Slot item in sktUtility.skeletonAnimation.Skeleton.Slots)
         //  {
         //      Debug.Log ("item : " + item.ToString());
         //      if (item.ToString().Equals("front_bracer"))
         //      {
         //          item.SetColor(new Color(0.0f, 1.0f, 0.0f));
         //      }
         //  }
     }
 }
开发者ID:schellrom,项目名称:freeevening,代码行数:56,代码来源:SpineTest.cs


示例17: Start

	void Start(){
		controller = GetComponent<Controller2D>();
		velocity = new Vector3();

		gravity = -2 * jumpHeight / Mathf.Pow(timeToJumpApex, 2);
		jumpVelocity = Mathf.Abs(gravity) * timeToJumpApex;
		print ("gravity: " + gravity + " jump velocity:" + jumpVelocity + " deltaTime:" + Time.deltaTime);

		//Spine Stuff
		skeletonAnimation = GetComponent<SkeletonAnimation>();
	}
开发者ID:TheMightyPenguin,项目名称:Unity2D-LightDemo,代码行数:11,代码来源:Player.cs


示例18: Start

    // Use this for initialization
    void Start()
    {
        m_tansform = this.transform;
        m_animation = this.GetComponent<SkeletonAnimation>();
        playerObj = GameObject.Find("Hero");
        m_playerScript = playerObj.GetComponent<PlayerActions>();

        //m_animation.state.Event += state_Event;
        m_animation.state.End += state_End;

        m_audioManager = GameObject.Find("Audios").GetComponent<AudioManager>();
    }
开发者ID:Venbb,项目名称:Games,代码行数:13,代码来源:ArcherManager.cs


示例19: Start

    // Use this for initialization
    void Start()
    {
        m_camera = this.GetComponent<Camera>();
        origSize = m_camera.orthographicSize;
        m_camera.orthographicSize = origSize * largeRatio;
        //UIObj = GameObject.Find("UI");
        //UIChangeScript = UIObj.GetComponent<UIchange>();

        bgAnimationObj = GameObject.Find("bgAnimation");
        bgAnimationScript = bgAnimationObj.GetComponent<SkeletonAnimation>();

        bgAnimationScript.state.End += state_End;
    }
开发者ID:Venbb,项目名称:Games,代码行数:14,代码来源:CameraChangeInterface.cs


示例20: Start

 void Start()
 {
     clock = GetComponent<SkeletonAnimation>();
     clockState = clock.state;
     clockState.TimeScale = 1.0f;
     clockState.SetAnimation(0, "loop", true);
     armLong = clock.skeleton.FindBone ("arm-long");
     armShort = clock.skeleton.FindBone ("arm-short");
     needle = clock.skeleton.FindBone ("needle");
     Debug.Log (armLong);
     Debug.Log (armShort);
     Debug.Log (needle);
 }
开发者ID:harayoki,项目名称:m_clock,代码行数:13,代码来源:Clock.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SkeletonData类代码示例发布时间:2022-05-24
下一篇:
C# Skeleton类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap