private void GameEvents_onCharacterPushed(UserPush data)
 {
     if (!_activePlayers.ContainsKey(data.TargetId))
     {
         return;
     }
     _activePlayers[data.TargetId].PushEventReceived(data);
 }
 public void PushEventReceived(UserPush data)
 {
     _view.Animator.SetBool("stumble", true);
     Observable.Timer(TimeSpan.FromMilliseconds(_settings.AnimationSetting.StumbleAnimationTime)).Subscribe(_ => { _view.Animator.SetBool("stumble", false); });
     if (UserData.Instance.User.Id.Equals(data.TargetId))
     {
         _movement.Push(data.Direction);
     }
 }
Example #3
0
 private void NetworkEvents_onCharacterPush(UserPush data)
 {
     _manager.Socket.Emit("push_character", data);
 }
 public static void CharacterPushed(UserPush data)
 {
     onCharacterPushed.Invoke(data);
 }
Example #5
0
 public static void CharacterPush(UserPush userPush)
 {
     onCharacterPush?.Invoke(userPush);
 }