public override void OnPlayAnimation(animatorController theAnimatorController, float x, float y) { if (theAnimatorController) { theAnimatorController.setValue(x, y); } }
void Start() { TheAgent = this.GetComponent <NavMeshAgent> (); headingAim = this.transform.rotation; theAnimatorController = this.GetComponent <animatorController> (); theMoveController = this.GetComponent <CharacterController> (); theMoveModeNow = new runMoveMode(); }
void Start() { myTrans = this.transform; myAnim = this.gameObject.GetComponent <Animator> (); playercont = FindObjectOfType <PlayerController> (); restartOn = FindObjectOfType <mainmenu> (); instance = this; sansScaleCache = myTrans.localScale; playerdie = false; }
void Start() { Init(); theMoveController = thePlayer.GetComponent <CharacterController> (); theAnimatorController = thePlayer.GetComponent <animatorController> (); moveOBJ = thePlayer.GetComponent <move> (); if (!theMoveController) { Destroy(this); } this.enabled = false; }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "sword") { GameObject obj = GameObject.Find("bodyWithSword"); animatorControllerObj = obj.GetComponent <animatorController>(); if (animatorControllerObj.isAttack) { timeStop = 0.2; hp--; } } }
// WIDHI ================================= void Start() { pause1 = FindObjectOfType <PauseMenu> (); myCools = this.GetComponents <Collider2D> (); myBody = this.GetComponent <Rigidbody2D> (); myTrans = this.transform; //tagGround = GameObject.Find (this.name + "/tag_Ground" ).transform; myAnim = animatorController.instance; instance = this; gameOver1 = FindObjectOfType <gameOver> (); curHealth = maxHealth; playerJump = GetComponent <AudioSource> (); }
void Start() { Init(); theAnimatorController = thePlayer.GetComponent <animatorController> (); InvokeRepeating("makeStepFlash", 0f, 1f); }
void Awake() { instance = this; }
// Use this for initialization void Start() { jump = FindObjectOfType <PlayerController> (); blink = animatorController.instance; }
//动画播放 public virtual void OnPlayAnimation(animatorController theAnimatorController, float x, float y) { }