示例#1
0
 protected override void OnRemove(GUnit unit)
 {
     _attackServerData.onAttack.OnCompleted();
     _attackServerData.onBeforeDamage.OnCompleted();
     _attackServerData.onDamage.OnCompleted();
     _attackServerData.onAfterDamage.OnCompleted();
     _attackServerData = null;
 }
示例#2
0
 protected override void OnAdd(GUnit unit)
 {
     _attackServerData                = unit.GetData <ObjectAttackServerData>();
     _attackServerData.onAttack       = new Subject <AttackInfo>();
     _attackServerData.onBeforeDamage = new Subject <DamageInfo>();
     _attackServerData.onDamage       = new Subject <DamageInfo>();
     _attackServerData.onAfterDamage  = new Subject <DamageInfo>();
 }