コード例 #1
0
 void Awake()
 {
     rpgCharacterMovementController = GetComponent <RPGCharacterMovementControllerFREE>();
     rpgCharacterWeaponController   = GetComponent <RPGCharacterWeaponControllerFREE>();
     rpgCharacterInputController    = GetComponent <RPGCharacterInputControllerFREE>();
     animator = GetComponentInChildren <Animator>();
     if (animator == null)
     {
         Debug.LogError("ERROR: There is no animator for character.");
         Destroy(this);
     }
     if (target == null)
     {
         Debug.LogError("ERROR: There is no target set for character.");
         Destroy(this);
     }
     ikHands = GetComponent <IKHandsFREE>();
     //Set for starting Unarmed state.
     weapon = Weapon.UNARMED;
     animator.SetInteger("Weapon", 0);
     animator.SetInteger("WeaponSwitch", -1);
 }
コード例 #2
0
 void Awake()
 {
     animator = GetComponent <Animator>();
     rpgCharacterWeaponController = GetComponent <RPGCharacterWeaponControllerFREE>();
 }