1234567891011121314151617181920212223242526272829303132 |
- using System.Collections.Generic;
- using System.Text.Json;
- namespace BubbleSocketCore.Input
- {
- public class PlayerInput
- {
- public int type;
- public int value;
- public PlayerInput(int type, int value)
- {
- this.type = type;
- this.value = value;
- }
- override public string ToString()
- {
- return JsonSerializer.Serialize(Serialize());
- }
- public List<string> Serialize()
- {
- return new List<string> { $"{type}", $"{value}" };
- }
- internal PlayerInput Clone()
- {
- return new PlayerInput(this.type, this.value);
- }
- }
- }
|