public void SendSubscribeToServer(CheckboxEvent e, SubscribeCheckboxNode checkbox, [JoinAll] UserNode user, [JoinAll] Optional <SingleNode <RegistrationScreenComponent> > registration)
        {
            bool isChecked = e.IsChecked;

            if (!registration.IsPresent() && (user.userSubscribe.Subscribed != isChecked))
            {
                SubscribeChangeEvent eventInstance = new SubscribeChangeEvent {
                    Subscribed = isChecked
                };
                base.ScheduleEvent(eventInstance, user.Entity);
            }
        }
예제 #2
0
 public void CheckboxEventTrigger()
 {
     CheckboxEvent?.Invoke(this, Checked);
     CheckedReference.Value = Checked;
 }
예제 #3
0
 public void CheckboxEventTrigger()
 {
     CheckboxEvent?.Invoke(this, Checked);
 }
 public void ChangeMovementControlSettings(CheckboxEvent e, InvertMovementControlsCheckboxNode checkboxNode, [JoinAll] SingleNode <GameTankSettingsComponent> settings)
 {
     settings.component.MovementControlsInverted = checkboxNode.checkbox.IsChecked;
     base.ScheduleEvent(new SettingsChangedEvent <GameTankSettingsComponent>(settings.component), settings);
 }
 public void ChangeTargetFocusSettings(CheckboxEvent e, TargetFocusEnabledCheckboxNode checkboxNode, [JoinAll] SingleNode <TargetFocusSettingsComponent> settings)
 {
     settings.component.Enabled = checkboxNode.checkbox.IsChecked;
     base.ScheduleEvent(new SettingsChangedEvent <TargetFocusSettingsComponent>(settings.component), settings);
 }
 public void ChangeMouseVerticalInvertedSettings(CheckboxEvent e, MouseVerticalInvertedCheckboxNode checkboxNode, [JoinAll] SingleNode <GameMouseSettingsComponent> settings)
 {
     settings.component.MouseVerticalInverted = checkboxNode.checkbox.IsChecked;
     base.ScheduleEvent(new SettingsChangedEvent <GameMouseSettingsComponent>(settings.component), settings);
 }
 public void ChangeMouseControlAllowedSettings(CheckboxEvent e, MouseControlAllowedCheckboxNode checkboxNode, [JoinAll] SingleNode <GameMouseSettingsComponent> settings, [JoinAll] MouseVerticalInvertedCheckboxNode MouseVerticalInvertedCheckbox)
 {
     settings.component.MouseControlAllowed = checkboxNode.checkbox.IsChecked;
     MouseVerticalInvertedCheckbox.dependentInteractivity.SetInteractable(settings.component.MouseControlAllowed);
     base.ScheduleEvent(new SettingsChangedEvent <GameMouseSettingsComponent>(settings.component), settings);
 }
 public void ChangeHealthFeedbackSettings(CheckboxEvent e, HealthFeedbackEnabledCheckboxNode checkboxNode, [JoinAll] SingleNode <GameTankSettingsComponent> settings)
 {
     settings.component.HealthFeedbackEnabled = checkboxNode.checkbox.IsChecked;
     base.ScheduleEvent(new SettingsChangedEvent <GameTankSettingsComponent>(settings.component), settings);
 }
 public void ChangeDamageInfoEnabledSettings(CheckboxEvent e, DamageInfoSettingsNode checkboxNode, [JoinAll] SingleNode <GameTankSettingsComponent> settings)
 {
     settings.component.DamageInfoEnabled = checkboxNode.checkbox.IsChecked;
     base.ScheduleEvent(new SettingsChangedEvent <GameTankSettingsComponent>(settings.component), settings);
 }
 public void ChangeCameraShakerSettings(CheckboxEvent e, CameraShakerEnabledCheckboxNode checkboxNode, [JoinAll] SingleNode <GameCameraShakerSettingsComponent> settings)
 {
     settings.component.Enabled = checkboxNode.checkbox.IsChecked;
     base.ScheduleEvent(new SettingsChangedEvent <GameCameraShakerSettingsComponent>(settings.component), settings);
 }