public void post(string handle, string evt, MrPP.Myth.Yggdrasil.AsgardPose data) { if (isClient) { CmdPostAsgardPose(handle, evt, data); } else { broadcast(handle, evt, (object)data); } }
void Update() { if (_model.controler) { if (this.target.hasChanged) { MrPP.Myth.Yggdrasil.AsgardPose pose = MrPP.Myth.Yggdrasil.Instance.GetAsgardPose(this.target); _model.update(pose); this.target.hasChanged = false; } } }
void Update() { if (this.controler) { if (this.target.hasChanged) { MrPP.Myth.Yggdrasil.AsgardPose pose = MrPP.Myth.Yggdrasil.Instance.GetAsgardPose(this.target); if (Bridge.Instance != null) { Debug.Log(this.handle); Bridge.Instance.post(this.handle, "pose_", pose); } this.target.hasChanged = false; } } }
private void doPose(MrPP.Myth.Yggdrasil.AsgardPose oldValue, MrPP.Myth.Yggdrasil.AsgardPose newValue) { if (!this.controler) { Yggdrasil.WorldPose world = Yggdrasil.Instance.getWorldPose(newValue); if (Vector3.Distance(world.position, target.position) < 0.3f) { TweenTransformData.Begin(target.gameObject, 0.03f, new TransformData(world.position, Quaternion.LookRotation(world.forward, world.up), world.scale)); } else { target.position = world.position; target.rotation = Quaternion.LookRotation(world.forward, world.up); target.setGlobalScale(world.scale); } } }
private void CmdPostAsgardPose(string handle, string evt, MrPP.Myth.Yggdrasil.AsgardPose data) { broadcast(handle, evt, (object)data); }
private void doPose(MrPP.Myth.Yggdrasil.AsgardPose oldValue, MrPP.Myth.Yggdrasil.AsgardPose newValue) { _target.onPose(oldValue, newValue); //_binding.onPose?.Invoke(newValue); }
private void poseChange(MrPP.Myth.Yggdrasil.AsgardPose oldValue, MrPP.Myth.Yggdrasil.AsgardPose newValue) { _binding.onPose?.Invoke(newValue); }