Exemple #1
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     weaponSystem = GameObject.Find("weaponsystem");
     Hand[] hand = weaponSystem.GetComponentsInChildren <Hand>();
     Sword1     = hand[0].weaponObject;
     Sword2     = hand[1].weaponObject;
     isShield1  = Sword1.GetComponent <Sword>().isShield;
     isShield2  = Sword2.GetComponent <Sword>().isShield;
     attackDefZ = 0.6f;
     dirx       = 0.25f; diry = 1.3f;
 }
Exemple #2
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        attackTIme   = 1.0f;//changed by 성격
        waitTime     = 0.0f;
        weaponSystem = GameObject.Find("weaponsystem");
        Hand[] hand = weaponSystem.GetComponentsInChildren <Hand>();
        Sword1     = hand[0].weaponObject;
        Sword2     = hand[1].weaponObject;
        isShield1  = Sword1.GetComponent <Sword>().isShield;
        isShield2  = Sword2.GetComponent <Sword>().isShield;
        attackDefZ = 0.6f;
        dirx       = 0.25f; diry = 1.3f;

        animator.SetBool("idle", true);
    }