/// <summary>
 /// Grabs various components and inits stuff
 /// </summary>
 public virtual void Setup()
 {
     // filler if the WeaponAttachment has not been set
     if (WeaponAttachment == null)
     {
         WeaponAttachment = transform;
     }
     if (_animator != null)
     {
         _weaponIK = _animator.GetComponent <WeaponIK> ();
     }
     // we set the initial weapon
     if (InitialWeapon != null)
     {
         ChangeWeapon(InitialWeapon, null);
     }
     _character        = gameObject.GetComponentNoAlloc <Character> ();
     CharacterAnimator = _animator;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Grabs various components and inits stuff
 /// </summary>
 public virtual void Setup()
 {
     // filler if the WeaponAttachment has not been set
     if (WeaponAttachment == null)
     {
         WeaponAttachment = transform;
     }
     if (_animator != null)
     {
         _weaponIK = _animator.GetComponent <WeaponIK> ();
     }
     // we set the initial weapon
     if (InitialMeleeWeapon != null && (superPlasmaBladeObtained == false))
     {
         ChangeWeapon(InitialMeleeWeapon, null);
     }
     if (superPlasmaBladeObtained == true)
     {
         ChangeWeapon(UpgradedPlasmaBlade, null);
     }
     _character = gameObject.GetComponentNoAlloc <Character> ();
     _characterHorizontalMovement = GetComponent <CharacterHorizontalMovement>();
 }