-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStructs.cs
36 lines (33 loc) · 1.13 KB
/
Structs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using UnityEngine;
namespace Scripts.Models
{
/// <summary>
/// Contains the game's individual action descriptions for each key.
/// </summary>
[Serializable]
public struct ActionNames
{
[SerializeField] private string one, two, three, four;
public string One { get => one; }
public string Two { get => two; }
public string Three { get => three; }
public string Four { get => four; }
public string[] All { get => new[] { one, two, three, four }; }
}
/// <summary>
/// Represents a collective structure holding action references a game can use.
/// Makes button remapping kinda indepedant of a global manager.
/// Might be obsolete by a better gobal built-in button map management?
/// </summary>
[Serializable]
public struct KeyMap
{
[SerializeField] private Key one, two, three, four;
public Key One { get => one; }
public Key Two { get => two; }
public Key Three { get => three; }
public Key Four { get => four; }
public Key[] All { get => new[] { one, two, three, four }; }
}
}