/// <summary> /// 侠客死亡 /// </summary> public void OnPlayDie() { _isControlPause = true; mBatManage.RemoveDieHero(this); PlayAnimation("death"); mHeroBlood.ShowBlood(); SkinnedMeshRenderer render = transform.GetComponentInChildren <SkinnedMeshRenderer>(); if (render == null) { return; } AnimationState state = mAnima["death"]; TweenColor tcol = TweenColor.Begin(render.gameObject, state.clip.length + 0.1f, new Color(120 / 255f, 120 / 255f, 120 / 255f, 0)); tcol.method = UITweener.Method.EaseIn; tcol.style = UITweener.Style.Once; tcol.AddOnFinished(delegate() { GameObject.DestroyObject(gameObject); }); tcol.Play(); }