Ejemplo n.º 1
0
        private void OnForced(ForceFlow flow)
        {
            if (flow.IsNewAdd)
            {
                flow.Target.Rigid.velocity = new Vector2(0, 0);
            }

            flow.Target.Rigid.AddForce(flow.Direction * flow.Force, ForceMode2D.Impulse);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
 public static void OnNextForce(ForceFlow ForceFlow)
 {
     _forceSubject.OnNext(ForceFlow);
 }