Beispiel #1
0
 protected virtual void InitPersonAttacker()
 {
     _personAnimator               = GetComponent <PersonAnimatorDragonBones>();
     _personParameters             = GetComponent <PersonParameters>();
     _personDamagerHandCollider2D  = _personDamagerHand.InitPersonDamager(_personParameters.DamageHandParameter.Value, this.transform, _personAnimator);
     _personDamagerLegCollider2D   = _personDamagerLeg.InitPersonDamager(_personParameters.DamageLegParameter.Value, this.transform, _personAnimator);
     _personDamagerSuperCollider2D = _personDamagerSuper.InitPersonDamager(_personParameters.DamageSuperParameter.Value, this.transform, _personAnimator);
 }
Beispiel #2
0
 protected virtual void InitPersonParameters()
 {
     _personAnimator = GetComponent <PersonAnimatorDragonBones>();
     _personAnimator.AnimationTimeScale = AnimationTimeScaleParameter.Value;
     HealthParameter.OnChangeValue.AddListener(health =>
     {
         if (health >= HealthParameter.MaxValue)
         {
             health = HealthParameter.MaxValue;
         }
         HpProgressor.SetValue(health);
     });
     HpProgressor.SetMax(HealthParameter.MaxValue);
     HealthParameter.Value = HealthParameter.MaxValue;
 }
 protected virtual void InitPersonMovement()
 {
     _rigidbody2D    = GetComponent <Rigidbody2D>();
     _collider2D     = GetComponent <Collider2D>();
     _personAnimator = GetComponent <PersonAnimatorDragonBones>();
 }