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 Start() { animationController.AddTrail(swordSwipe); // Adds the trails to the animationController which will run them Initialise(); // // This is just making him jump at the start... normally you would just hit PlayAnimation(idle)... // swordSwipe.SetTime (2.1f, 0, 1); // }
// Use this for initialization void Start() { animator = gameObject.GetComponent <Animator> (); animationController.AddTrail(Katana); Katana.ClearTrail(); }