First Flight
Added MPL license headers SectorRenderer renders entities in sector, manages particle systems for ship thrusters Thrusters apply torque based on orientation and position relative to ship center of mass GameManager controls the player ship's thrusters Player can dock with station if they are near
This commit is contained in:
parent
e3f3bd5de5
commit
c4be204cd0
172 changed files with 6753 additions and 779 deletions
|
|
@ -190,7 +190,7 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""path"": ""<Pointer>/delta"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Keyboard&Mouse;Touch"",
|
||||
""groups"": "";Keyboard&Mouse"",
|
||||
""action"": ""Look"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
|
|
@ -234,7 +234,7 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""path"": ""<Touchscreen>/primaryTouch/tap"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Touch"",
|
||||
""groups"": """",
|
||||
""action"": ""Fire"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
|
|
@ -331,22 +331,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""processors"": """",
|
||||
""interactions"": """"
|
||||
},
|
||||
{
|
||||
""name"": ""TrackedDevicePosition"",
|
||||
""type"": ""PassThrough"",
|
||||
""id"": ""b297afa0-f417-4a48-aaa1-36a6efd36190"",
|
||||
""expectedControlType"": ""Vector3"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
},
|
||||
{
|
||||
""name"": ""TrackedDeviceOrientation"",
|
||||
""type"": ""PassThrough"",
|
||||
""id"": ""1a877e6d-221e-4815-a289-aa93412c8d87"",
|
||||
""expectedControlType"": ""Quaternion"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
},
|
||||
{
|
||||
""name"": ""Drag"",
|
||||
""type"": ""Value"",
|
||||
|
|
@ -665,17 +649,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""5693e57a-238a-46ed-b5ae-e64e6e574302"",
|
||||
""path"": ""<Touchscreen>/touch*/position"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Touch"",
|
||||
""action"": ""Point"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""4faf7dc9-b979-4210-aa8c-e808e1ef89f5"",
|
||||
|
|
@ -698,28 +671,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""47c2a644-3ebc-4dae-a106-589b7ca75b59"",
|
||||
""path"": ""<Touchscreen>/touch*/press"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Touch"",
|
||||
""action"": ""Click"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""bb9e6b34-44bf-4381-ac63-5aa15d19f677"",
|
||||
""path"": ""<XRController>/trigger"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""XR"",
|
||||
""action"": ""Click"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""38c99815-14ea-4617-8627-164d27641299"",
|
||||
|
|
@ -753,28 +704,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""7236c0d9-6ca3-47cf-a6ee-a97f5b59ea77"",
|
||||
""path"": ""<XRController>/devicePosition"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""XR"",
|
||||
""action"": ""TrackedDevicePosition"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""23e01e3a-f935-4948-8d8b-9bcac77714fb"",
|
||||
""path"": ""<XRController>/deviceRotation"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""XR"",
|
||||
""action"": ""TrackedDeviceOrientation"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""618fb60f-5dc7-47ec-8dbf-fdc3d4c515a1"",
|
||||
|
|
@ -807,6 +736,14 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
},
|
||||
{
|
||||
""name"": ""Dock"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""d6e65ce8-149c-4009-ac38-66144cca311a"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
|
|
@ -831,6 +768,17 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""action"": ""Inventory"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""3279cef8-8bd1-49f2-984a-637d1f8522f6"",
|
||||
""path"": ""<Keyboard>/#(C)"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Keyboard&Mouse"",
|
||||
""action"": ""Dock"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -863,17 +811,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
""name"": ""Touch"",
|
||||
""bindingGroup"": ""Touch"",
|
||||
""devices"": [
|
||||
{
|
||||
""devicePath"": ""<Touchscreen>"",
|
||||
""isOptional"": false,
|
||||
""isOR"": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
""name"": ""Joystick"",
|
||||
""bindingGroup"": ""Joystick"",
|
||||
|
|
@ -884,17 +821,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
""isOR"": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
""name"": ""XR"",
|
||||
""bindingGroup"": ""XR"",
|
||||
""devices"": [
|
||||
{
|
||||
""devicePath"": ""<XRController>"",
|
||||
""isOptional"": false,
|
||||
""isOR"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}");
|
||||
|
|
@ -914,13 +840,12 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
m_UI_ScrollWheel = m_UI.FindAction("ScrollWheel", throwIfNotFound: true);
|
||||
m_UI_MiddleClick = m_UI.FindAction("MiddleClick", throwIfNotFound: true);
|
||||
m_UI_RightClick = m_UI.FindAction("RightClick", throwIfNotFound: true);
|
||||
m_UI_TrackedDevicePosition = m_UI.FindAction("TrackedDevicePosition", throwIfNotFound: true);
|
||||
m_UI_TrackedDeviceOrientation = m_UI.FindAction("TrackedDeviceOrientation", throwIfNotFound: true);
|
||||
m_UI_Drag = m_UI.FindAction("Drag", throwIfNotFound: true);
|
||||
// Global
|
||||
m_Global = asset.FindActionMap("Global", throwIfNotFound: true);
|
||||
m_Global_MapToggle = m_Global.FindAction("Map Toggle", throwIfNotFound: true);
|
||||
m_Global_Inventory = m_Global.FindAction("Inventory", throwIfNotFound: true);
|
||||
m_Global_Dock = m_Global.FindAction("Dock", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
@ -1035,8 +960,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
private readonly InputAction m_UI_ScrollWheel;
|
||||
private readonly InputAction m_UI_MiddleClick;
|
||||
private readonly InputAction m_UI_RightClick;
|
||||
private readonly InputAction m_UI_TrackedDevicePosition;
|
||||
private readonly InputAction m_UI_TrackedDeviceOrientation;
|
||||
private readonly InputAction m_UI_Drag;
|
||||
public struct UIActions
|
||||
{
|
||||
|
|
@ -1050,8 +973,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
public InputAction @ScrollWheel => m_Wrapper.m_UI_ScrollWheel;
|
||||
public InputAction @MiddleClick => m_Wrapper.m_UI_MiddleClick;
|
||||
public InputAction @RightClick => m_Wrapper.m_UI_RightClick;
|
||||
public InputAction @TrackedDevicePosition => m_Wrapper.m_UI_TrackedDevicePosition;
|
||||
public InputAction @TrackedDeviceOrientation => m_Wrapper.m_UI_TrackedDeviceOrientation;
|
||||
public InputAction @Drag => m_Wrapper.m_UI_Drag;
|
||||
public InputActionMap Get() { return m_Wrapper.m_UI; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
|
|
@ -1086,12 +1007,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
@RightClick.started -= m_Wrapper.m_UIActionsCallbackInterface.OnRightClick;
|
||||
@RightClick.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnRightClick;
|
||||
@RightClick.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnRightClick;
|
||||
@TrackedDevicePosition.started -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDevicePosition;
|
||||
@TrackedDevicePosition.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDevicePosition;
|
||||
@TrackedDevicePosition.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDevicePosition;
|
||||
@TrackedDeviceOrientation.started -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDeviceOrientation;
|
||||
@TrackedDeviceOrientation.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDeviceOrientation;
|
||||
@TrackedDeviceOrientation.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDeviceOrientation;
|
||||
@Drag.started -= m_Wrapper.m_UIActionsCallbackInterface.OnDrag;
|
||||
@Drag.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnDrag;
|
||||
@Drag.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnDrag;
|
||||
|
|
@ -1123,12 +1038,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
@RightClick.started += instance.OnRightClick;
|
||||
@RightClick.performed += instance.OnRightClick;
|
||||
@RightClick.canceled += instance.OnRightClick;
|
||||
@TrackedDevicePosition.started += instance.OnTrackedDevicePosition;
|
||||
@TrackedDevicePosition.performed += instance.OnTrackedDevicePosition;
|
||||
@TrackedDevicePosition.canceled += instance.OnTrackedDevicePosition;
|
||||
@TrackedDeviceOrientation.started += instance.OnTrackedDeviceOrientation;
|
||||
@TrackedDeviceOrientation.performed += instance.OnTrackedDeviceOrientation;
|
||||
@TrackedDeviceOrientation.canceled += instance.OnTrackedDeviceOrientation;
|
||||
@Drag.started += instance.OnDrag;
|
||||
@Drag.performed += instance.OnDrag;
|
||||
@Drag.canceled += instance.OnDrag;
|
||||
|
|
@ -1142,12 +1051,14 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
private IGlobalActions m_GlobalActionsCallbackInterface;
|
||||
private readonly InputAction m_Global_MapToggle;
|
||||
private readonly InputAction m_Global_Inventory;
|
||||
private readonly InputAction m_Global_Dock;
|
||||
public struct GlobalActions
|
||||
{
|
||||
private @AetheriaInput m_Wrapper;
|
||||
public GlobalActions(@AetheriaInput wrapper) { m_Wrapper = wrapper; }
|
||||
public InputAction @MapToggle => m_Wrapper.m_Global_MapToggle;
|
||||
public InputAction @Inventory => m_Wrapper.m_Global_Inventory;
|
||||
public InputAction @Dock => m_Wrapper.m_Global_Dock;
|
||||
public InputActionMap Get() { return m_Wrapper.m_Global; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
|
|
@ -1163,6 +1074,9 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
@Inventory.started -= m_Wrapper.m_GlobalActionsCallbackInterface.OnInventory;
|
||||
@Inventory.performed -= m_Wrapper.m_GlobalActionsCallbackInterface.OnInventory;
|
||||
@Inventory.canceled -= m_Wrapper.m_GlobalActionsCallbackInterface.OnInventory;
|
||||
@Dock.started -= m_Wrapper.m_GlobalActionsCallbackInterface.OnDock;
|
||||
@Dock.performed -= m_Wrapper.m_GlobalActionsCallbackInterface.OnDock;
|
||||
@Dock.canceled -= m_Wrapper.m_GlobalActionsCallbackInterface.OnDock;
|
||||
}
|
||||
m_Wrapper.m_GlobalActionsCallbackInterface = instance;
|
||||
if (instance != null)
|
||||
|
|
@ -1173,6 +1087,9 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
@Inventory.started += instance.OnInventory;
|
||||
@Inventory.performed += instance.OnInventory;
|
||||
@Inventory.canceled += instance.OnInventory;
|
||||
@Dock.started += instance.OnDock;
|
||||
@Dock.performed += instance.OnDock;
|
||||
@Dock.canceled += instance.OnDock;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1195,15 +1112,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
return asset.controlSchemes[m_GamepadSchemeIndex];
|
||||
}
|
||||
}
|
||||
private int m_TouchSchemeIndex = -1;
|
||||
public InputControlScheme TouchScheme
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_TouchSchemeIndex == -1) m_TouchSchemeIndex = asset.FindControlSchemeIndex("Touch");
|
||||
return asset.controlSchemes[m_TouchSchemeIndex];
|
||||
}
|
||||
}
|
||||
private int m_JoystickSchemeIndex = -1;
|
||||
public InputControlScheme JoystickScheme
|
||||
{
|
||||
|
|
@ -1213,15 +1121,6 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
return asset.controlSchemes[m_JoystickSchemeIndex];
|
||||
}
|
||||
}
|
||||
private int m_XRSchemeIndex = -1;
|
||||
public InputControlScheme XRScheme
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_XRSchemeIndex == -1) m_XRSchemeIndex = asset.FindControlSchemeIndex("XR");
|
||||
return asset.controlSchemes[m_XRSchemeIndex];
|
||||
}
|
||||
}
|
||||
public interface IPlayerActions
|
||||
{
|
||||
void OnMove(InputAction.CallbackContext context);
|
||||
|
|
@ -1239,13 +1138,12 @@ public class @AetheriaInput : IInputActionCollection, IDisposable
|
|||
void OnScrollWheel(InputAction.CallbackContext context);
|
||||
void OnMiddleClick(InputAction.CallbackContext context);
|
||||
void OnRightClick(InputAction.CallbackContext context);
|
||||
void OnTrackedDevicePosition(InputAction.CallbackContext context);
|
||||
void OnTrackedDeviceOrientation(InputAction.CallbackContext context);
|
||||
void OnDrag(InputAction.CallbackContext context);
|
||||
}
|
||||
public interface IGlobalActions
|
||||
{
|
||||
void OnMapToggle(InputAction.CallbackContext context);
|
||||
void OnInventory(InputAction.CallbackContext context);
|
||||
void OnDock(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue