Пример #1
0
 public override void OnPlayAnimation(animatorController theAnimatorController, float x, float y)
 {
     if (theAnimatorController)
     {
         theAnimatorController.setValue(x, y);
     }
 }
Пример #2
0
 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;
 }
Пример #4
0
 void Start()
 {
     Init();
     theMoveController     = thePlayer.GetComponent <CharacterController> ();
     theAnimatorController = thePlayer.GetComponent <animatorController> ();
     moveOBJ = thePlayer.GetComponent <move> ();
     if (!theMoveController)
     {
         Destroy(this);
     }
     this.enabled = false;
 }
Пример #5
0
 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> ();
    }
Пример #7
0
 void Start()
 {
     Init();
     theAnimatorController = thePlayer.GetComponent <animatorController> ();
     InvokeRepeating("makeStepFlash", 0f, 1f);
 }
 void Awake()
 {
     instance = this;
 }
Пример #9
0
 // Use this for initialization
 void Start()
 {
     jump  = FindObjectOfType <PlayerController> ();
     blink = animatorController.instance;
 }
Пример #10
0
 //动画播放
 public virtual void OnPlayAnimation(animatorController theAnimatorController, float x, float y)
 {
 }