Esempio n. 1
0
        private void SyncHealRPC(int targetViewID, int quantity)
        {
            var target = PhotonView.Find(targetViewID).gameObject.GetComponent <IOnAttacked>();

            Assert.IsNotNull(target);

            var flowEntity = new HealFlowEntity(target, quantity);

            SkillStream.OnNextHeal(flowEntity);
        }
Esempio n. 2
0
        private void OnHealed(HealFlowEntity entity)
        {
            bool isAlreadyDead = entity.Target.Hp.Cur.Value == entity.Target.Hp.Min.Value;

            if (isAlreadyDead)
            {
                return;
            }

            entity.Target.Hp.Add(entity.Quantity);

            if (entity.Target is IPhotonBehaviour)
            {
                HitEffectPopupEnvironment.Instance.PopupHitEffect(HitEffectType.Heal, (IPhotonBehaviour)entity.Target);
                NumberPopupEnvironment.Instance.PopupHeal(entity.Quantity, (IPhotonBehaviour)entity.Target);
            }
        }
Esempio n. 3
0
 public static void OnNextHeal(HealFlowEntity healFlowEntity)
 {
     _healSubject.OnNext(healFlowEntity);
 }