public SetTime ( float trailTime, float timeToTweenTo, float tweenSpeed ) : void | ||
trailTime | float | |
timeToTweenTo | float | |
tweenSpeed | float | |
return | void |
IEnumerator PlayNow() { yield return(null); ani.PlayAnimation(animation["idle"]); //.CrossfadeAnimation (animation["rslash_1"], 0.2f); yield return(new WaitForSeconds(2)); ani.CrossfadeAnimation(animation["rslash_1"], 0.2f); wt.SetTime(1, 0, 1); yield return(new WaitForSeconds(2)); wt.SetTime(0.2f, 0, 1); //trail.SetActive (false); //yield return new WaitForSeconds (2); //wt.SetTime (1, 0, 1); //trail.SetActive (true); while (true) { wt.SetTime(1, 0, 2); yield return(new WaitForSeconds(0.8f)); wt.SetTime(0.2f, 0, 2); yield return(new WaitForSeconds(0.2f)); } }
void Start() { // 默认没有拖尾效果 myTrail.SetTime(0.0f, 0.0f, 1.0f); }
// Start is called before the first frame update public void Start() { isFly = false; isClick = false; launchPos = GameObject.Find("LaunchPos").transform.position; //默认没有拖尾 trail.SetTime(0.0f, 0.0f, 1.0f); }
protected void Start() { animationController.AddTrail(leftSwipe); // Adds the trails to the animationController which will run them animationController.AddTrail(rightSwipe); // Initialise(); // // This is just making him jump at the start... normally you would just hit PlayAnimation(idle)... // thinkTime = 1.5f; animationController.PlayAnimation(animationRespawn); leftSwipe.SetTime(2.1f, 0, 1); rightSwipe.SetTime(2.1f, 0, 1); // }
// Use this for initialization void Start() { ani = GetComponent <AnimationController> (); trail = Instantiate(Resources.Load <GameObject>("particles/newWeaponTrail")) as GameObject; var rightHand = ChuMeng.Util.FindChildRecursive(transform, "Point001"); if (rightHand != null) { trail.transform.parent = rightHand; trail.transform.localPosition = Vector3.zero; trail.transform.localScale = Vector3.one; //X Rotate 90 For New Game Model //模型的挂点的z轴向上 因此需要调整 weaponTrail 的Y轴和模型z轴一致 trail.transform.localRotation = Quaternion.Euler(90, 0, 0); } //GetComponent<AnimationController>().AddTrail(trail.GetComponent<WeaponTrail>()); wt = trail.GetComponent <WeaponTrail>(); wt.SetTime(0, 0, 1); trail.SetActive(true); ani.AddTrail(wt); StartCoroutine(PlayNow()); }
protected void Initialise() { // The Animation Controller feeds on AnimationStates. You've got to assign your animations to variables so that you can call them from the controller // animation["attack01"].speed = 2.0f; animation["attack02"].speed = 2.0f; // // animationAttack01 = animation["attack01"]; // animationAttack02 = animation["attack02"]; animationAttack03 = animation["attack03"]; // animationIdle = animation["idle"]; animationIdle.speed = 0.4f; animationAttack03.speed = 0.8f; // swordSwipe.SetTime(0.0f, 0f, 1.0f); // }
private void ProcessInput() { //idle GameObject.Find("AnimatorController").GetComponent <AnimatorController> ().SetInt("animation,1"); //move if (moveTrigger) { if (inputVector.sqrMagnitude > 0.001f) { movementVector = _mainCameraTransform.TransformDirection(inputVector); movementVector.y = 0f; movementVector.Normalize(); _transform.forward = movementVector; GameObject.Find("AnimatorController").GetComponent <AnimatorController> ().SetInt("animation,2"); } //walk if (inputVector.sqrMagnitude < 0.16f) { _characterController.Move(movementVector * Time.deltaTime * MovementSpeed * 0.2f); Dash(0.2f); } //run else if (inputVector.sqrMagnitude > 0.305f) { _characterController.Move(movementVector * Time.deltaTime * MovementSpeed); Dash(1.0f); } //lerp within walk and run else if (inputVector.sqrMagnitude < 0.305f && inputVector.sqrMagnitude > 0.16f) { Vector3.Normalize(inputVector); _characterController.Move(movementVector * Time.deltaTime * MovementSpeed * Mathf.Lerp(0.2f, 1.0f, inputVector.sqrMagnitude)); } } //jump if (jump) { jumpTrigger = true; GameObject.Find("AnimatorController").GetComponent <AnimatorController> ().SetInt("animation,3"); StartCoroutine(DelaytoInvoke(() => { jumpTrigger = false; }, 1.4f)); } //circle attack if (circleAtk) { GameObject.Find("AnimatorController").GetComponent <AnimatorController> ().SetInt("animation,5"); if (!jumpTrigger) { Katana.SetTime(0.7f, 0, 1); } //Katana.StartTrail (0.15f, 0.1f); } //circle attack long if (circleAtkLong) { GameObject.Find("AnimatorController").GetComponent <AnimatorController> ().SetInt("animation,4"); moveTrigger = false; Katana.SetTime(1.0f, 0, 1); StartCoroutine(DelaytoInvoke(() => { moveTrigger = true; }, 1.4f)); } //triangle attack if (triangleAtk) { GameObject.Find("AnimatorController").GetComponent <AnimatorController> ().SetInt("animation,6"); Katana.SetTime(1.0f, 0, 1); } }
void Start() { myTrail.SetTime(0.0f, 0.0f, 1.0f); }
private void Start() { // 默认没有拖尾效果 myTrail.SetTime(0.0f, 0.0f, 1.0f); }
void Start() { // 默认没有拖尾效果 myTrail.SetTime(0.0f, 0.0f, 1.0f); }
public void ShowTrail() { myTrail.SetTime(2.0f, 0.0f, 1.0f); myTrail.StartTrail(0.5f, 0.4f); }
private void Awake() { myTrail = GetComponent <WeaponTrail>(); myTrail.SetTime(0, 0, 1);//初始的时候不要拖尾 }
protected void Start() { myTrail.SetTime(2.1f, 0, 1); }
void Start() { // 默认没有拖尾效果 currentWeaponTrail.SetTime(0.0f, 0.0f, 1.0f); }
void Start() { animator = GetComponent <Animator>(); // 默认没有拖尾效果 myTrail.SetTime(0.0f, 0.0f, 1.0f); }
private AnimEvent animEvent;//事件接收 void Start() { //先把残影关掉 TrailObj.SetTime(0.0f, 0.0f, 1.0f); initAnimEvent(); }
public void Reset() { weaponTrail.SetTime(0.0f, 0, 1); }
void Start() { // set no trail by default myTrail.SetTime(0.0f, 0.0f, 1.0f); }
void Start() { // 默认没有拖尾效果 trail.SetTime(0.0f, 0.0f, 1.0f); }