Example #1
0
        private void SyncStatusRPC(int targetViewID, int fixAtk)
        {
            var target = PhotonView.Find(targetViewID).gameObject.GetComponent <IStatus>();

            Assert.IsNotNull(target);

            var flow = new StatusFlow(target, fixAtk);

            SkillStream.OnNextStatus(flow);
        }
Example #2
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);
        }
Example #3
0
        private void SyncForceRPC(int targetViewID, float force, Vector2 direction, bool isNewAdd)
        {
            var target = PhotonView.Find(targetViewID).gameObject.GetComponent <IOnForced>();

            Assert.IsNotNull(target);

            var flow = new ForceFlow(target, force, direction, isNewAdd);

            SkillStream.OnNextForce(flow);
        }
Example #4
0
        private void SyncDebuffRPC(int targetViewID, DebuffType debuffType, float duration)
        {
            var target = PhotonView.Find(targetViewID).gameObject.GetComponent <IOnDebuffed>();

            Assert.IsNotNull(target);

            var flow = new DebuffFlow(target, debuffType, duration);

            SkillStream.OnNextDebuff(flow);
        }
Example #5
0
        private void SyncAttackRPC(int attackerViewID, int targetViewID, int damage, bool isCritical, HitEffectType hitEffectType)
        {
            var attacker = PhotonView.Find(attackerViewID).gameObject.GetComponent <IAttacker>();
            var target   = PhotonView.Find(targetViewID).gameObject.GetComponent <IOnAttacked>();

            Assert.IsNotNull(attacker);
            Assert.IsNotNull(target);

            var flow = new AttackFlow(attacker, target, damage, isCritical, hitEffectType);

            SkillStream.OnNextAttack(flow);
        }