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

            Assert.IsNotNull(target);

            var flow = new HealFlow(target, quantity);

            SkillStream.OnNextHeal(flow);
        }
        private void OnHealed(HealFlow flow)
        {
            bool isAlreadyDead = flow.Target.Hp.Cur.Value == flow.Target.Hp.Min.Value;

            if (isAlreadyDead)
            {
                return;
            }

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

            if (flow.Target is IPhotonBehaviour photonTarget)
            {
                HitEffectPopupEnvironment.Instance.PopupHitEffect(HitEffectType.Heal, photonTarget);
                NumberPopupEnvironment.Instance.PopupHeal(flow.Quantity, photonTarget);
            }
        }
Exemple #3
0
 public static void OnNextHeal(HealFlow HealFlow)
 {
     _healSubject.OnNext(HealFlow);
 }