Compare commits

...

25 Commits

Author SHA1 Message Date
0f409ddb08 Merge pull request 'SamWorkset' (#1) from SamWorkset into master
Reviewed-on: #1
2025-05-22 15:43:50 +00:00
d3f41bd245 Fixed an issue wit the server room alarm being restarted when button pushed during alarm 2025-05-22 18:38:48 +03:00
ffd98b6322 added scoring system for the bow game 2025-05-20 14:53:35 +03:00
03a3ca570e Added slideshow (disabled, but fully functional, not actually part of the player experience, just for fun). Moved teleport button for bolt car onto its front. Added signs for barred areas and server entry guiding. 2025-05-09 19:18:31 +03:00
fe60892585 trying to get LFS to work 2025-03-25 20:58:23 +02:00
fe90ea9996 trying to get LFS to work 2025-03-25 20:55:18 +02:00
7f643bf361 Ensure LFS tracking and add large file 2025-03-25 20:40:35 +02:00
1287fd8f39 Removed large files from Git history. LFS needs it to be so in order to be configured 2025-03-25 20:35:49 +02:00
ac04a4ee16 fixing an LFS issue 2025-03-25 20:26:33 +02:00
e40106b45e added UFO skywalk animation and bolt car teleport button 2025-03-25 20:09:15 +02:00
7ea187f9fd fixing push issue 2025-03-09 21:48:52 +02:00
b62e851c0e finished portal fundimentals 2025-03-09 20:43:38 +02:00
960991b17d added portals 2025-01-24 03:14:07 +02:00
9f4da45c40 fixed network manager prefab issue 2025-01-22 21:33:47 +02:00
afab7d7810 Merge commit 'e7f8693f' into SamWorkset 2025-01-22 21:22:58 +02:00
3db109d127 commiting minor changes 2025-01-22 21:22:00 +02:00
42aacaafb4 prepping for new skywalk system 2025-01-22 19:43:13 +02:00
Ranno Samuel Adson
776c68736d constructed entryway for skywalk 2025-01-15 21:44:46 +02:00
Ranno Samuel Adson
7ba5fe1f30 Implimented the card 2025-01-07 02:40:37 +02:00
Ranno Samuel Adson
98094a9f5f Adding server room sound effects and button to trigger them 2025-01-02 16:37:16 +02:00
Ranno Samuel Adson
de968605ec installed server racks 2024-12-28 20:11:26 +02:00
Ranno Samuel Adson
8177855e63 finished bolt car interaction 2024-12-28 18:15:03 +02:00
Ranno Samuel Adson
8cba77447f worked on ground moddelling. Doing a quicksave before doing a large model alteration. 2024-12-27 16:23:25 +02:00
Ranno Samuel Adson
fa3d2f7ec8 worked on ground moddelling. Doing a quicksave before altering materials. 2024-12-27 15:24:51 +02:00
Ranno Samuel Adson
5df9dacfb5 making changes to lighting. This is a backup just in case 2024-12-27 14:11:36 +02:00
483 changed files with 32692 additions and 2294446 deletions

25
.gitattributes vendored
View File

@ -1,8 +1,8 @@
* text=auto * text=auto
# Unity files # Unity files
*.meta -text merge=unityyamlmerge diff *.meta -text merge=unityyamlmerge diff
*.unity -text merge=unityyamlmerge diff *.unity filter=lfs diff=lfs merge=lfs -text
*.asset -text merge=unityyamlmerge diff *.asset filter=lfs diff=lfs merge=lfs -text
*.prefab -text merge=unityyamlmerge diff *.prefab -text merge=unityyamlmerge diff
*.mat -text merge=unityyamlmerge diff *.mat -text merge=unityyamlmerge diff
*.anim -text merge=unityyamlmerge diff *.anim -text merge=unityyamlmerge diff
@ -79,3 +79,24 @@
*.tar filter=lfs diff=lfs merge=lfs -text *.tar filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text *.exr filter=lfs diff=lfs merge=lfs -text
*.hdr filter=lfs diff=lfs merge=lfs -text *.hdr filter=lfs diff=lfs merge=lfs -text
*.cubemap filter=lfs diff=lfs merge=lfs -text
*.assets filter=lfs diff=lfs merge=lfs -text
*.resS filter=lfs diff=lfs merge=lfs -text
*.dylib filter=lfs diff=lfs merge=lfs -text
*.tar.7z filter=lfs diff=lfs merge=lfs -text
*.f8 filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Components/Portals2/New[[:space:]]Cubemap.cubemap filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Other/Delta[[:space:]](Toomas)[[:space:]]v3.blend filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Other/Delta[[:space:]](Toomas)[[:space:]]v3.blend1 filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Scenes/DeltaBuilding_base/LightingData.asset filter=lfs diff=lfs merge=lfs -text
Build/DeltaVR_Data/level0 filter=lfs diff=lfs merge=lfs -text
Build/DeltaVR_Data/sharedassets0.assets filter=lfs diff=lfs merge=lfs -text
Build/DeltaVR_Data/sharedassets0.assets.resS filter=lfs diff=lfs merge=lfs -text
Library/Artifacts/6e/6e8680668429d5a691eb5372cd18a3f8 filter=lfs diff=lfs merge=lfs -text
Library/PackageCache/com.unity.burst@1.8.3/.Runtime/libburst-llvm-14.dylib filter=lfs diff=lfs merge=lfs -text
Library/PackageCache/com.unity.toolchain.win-x86_64-linux-x86_64@2.0.4/data~/payload.tar.7z filter=lfs diff=lfs merge=lfs -text
Library/PlayerDataCache/Win64/Data/level0 filter=lfs diff=lfs merge=lfs -text
Library/PlayerDataCache/Win64/Data/sharedassets0.assets filter=lfs diff=lfs merge=lfs -text
Library/PlayerDataCache/Win64/Data/sharedassets0.assets.resS filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Scenes/DeltaBuilding_base.unity filter=lfs diff=lfs merge=lfs -text
*.ext filter=lfs diff=lfs merge=lfs -text

BIN
Assets/DefaultPrefabObjects.asset (Stored with Git LFS)

Binary file not shown.

View File

@ -158,6 +158,7 @@ namespace FishNet.Discovery
/// </summary> /// </summary>
public void StartAdvertisingServer() public void StartAdvertisingServer()
{ {
//Debug.Log("NetworkDiscovery is advertizing on port " + port);
if (!InstanceFinder.IsServer) if (!InstanceFinder.IsServer)
{ {
if (NetworkManager.StaticCanLog(LoggingType.Warning)) Debug.LogWarning("Unable to start advertising server. Server is inactive.", this); if (NetworkManager.StaticCanLog(LoggingType.Warning)) Debug.LogWarning("Unable to start advertising server. Server is inactive.", this);
@ -184,7 +185,7 @@ namespace FishNet.Discovery
EnableBroadcast = true, EnableBroadcast = true,
MulticastLoopback = false, MulticastLoopback = false,
}; };
//Debug.Log("UDP = " + _serverUdpClient.ToString());
Task.Run(AdvertiseServerAsync); Task.Run(AdvertiseServerAsync);
if (NetworkManager.StaticCanLog(LoggingType.Common)) Debug.Log("Started advertising server.", this); if (NetworkManager.StaticCanLog(LoggingType.Common)) Debug.Log("Started advertising server.", this);
@ -208,11 +209,13 @@ namespace FishNet.Discovery
{ {
while (_serverUdpClient != null) while (_serverUdpClient != null)
{ {
await Task.Delay(TimeSpan.FromSeconds(discoveryInterval)); await Task.Delay(TimeSpan.FromSeconds(discoveryInterval));
UdpReceiveResult result = await _serverUdpClient.ReceiveAsync(); UdpReceiveResult result = await _serverUdpClient.ReceiveAsync();
Debug.Log("Awaiting for server");
string receivedSecret = Encoding.UTF8.GetString(result.Buffer); string receivedSecret = Encoding.UTF8.GetString(result.Buffer);
Debug.Log(receivedSecret);
if (receivedSecret == secret) if (receivedSecret == secret)
{ {
@ -221,6 +224,7 @@ namespace FishNet.Discovery
await _serverUdpClient.SendAsync(okBytes, okBytes.Length, result.RemoteEndPoint); await _serverUdpClient.SendAsync(okBytes, okBytes.Length, result.RemoteEndPoint);
} }
} }
Debug.Log("_serverUdpClient == null");
} }
#endregion #endregion
@ -238,6 +242,7 @@ namespace FishNet.Discovery
// //
// return; // return;
// } // }
Debug.Log("NetworkDiscovery is searching");
if (InstanceFinder.IsClient) if (InstanceFinder.IsClient)
{ {

View File

@ -0,0 +1,144 @@
using FishNet;
using FishNet.Discovery;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class NetworkMenuUI : MonoBehaviour
{
[Header("UI References")]
public Button startPlayingButton;
public Button joinMultiplayerButton;
public Transform serverListContainer;
public GameObject serverListItemPrefab;
public TMP_Text statusText;
[Header("Networking")]
public NetworkDiscovery networkDiscovery;
public Camera uiCamera; // Optional, disable if connecting
private readonly List<IPEndPoint> foundServers = new();
private void Start()
{
if (networkDiscovery == null)
networkDiscovery = FindObjectOfType<NetworkDiscovery>();
startPlayingButton.onClick.AddListener(OnStartPlaying);
joinMultiplayerButton.onClick.AddListener(OnJoinMultiplayer);
networkDiscovery.ServerFoundCallback += OnServerFound;
}
private void OnStartPlaying()
{
statusText.text = "Starting host...";
StartCoroutine(HostAndSearchRoutine());
}
private void OnJoinMultiplayer()
{
statusText.text = "Searching for servers...";
ClearServerList();
foundServers.Clear();
networkDiscovery.StartSearchingForServers();
}
private void OnServerFound(IPEndPoint endPoint)
{
if (foundServers.Contains(endPoint)) return;
foundServers.Add(endPoint);
// Auto-join if started as host
if (InstanceFinder.IsServer)
{
//networkDiscovery.StopAdvertisingServer();
networkDiscovery.StopSearchingForServers();
uiCamera.enabled = false;
InstanceFinder.ClientManager.StartConnection("192.168.42.212");
statusText.text = $"Joined server: {endPoint.Address}";
return;
}
// Display in UI for manual joining
GameObject item = Instantiate(serverListItemPrefab, serverListContainer);
TMP_Text label = item.GetComponentInChildren<TMP_Text>();
label.text = endPoint.Address.ToString();
Button btn = item.GetComponent<Button>();
btn.onClick.AddListener(() =>
{
networkDiscovery.StopSearchingForServers();
if (uiCamera != null) uiCamera.enabled = false;
InstanceFinder.ClientManager.StartConnection(endPoint.Address.ToString());
statusText.text = $"Joined server: {endPoint.Address}";
});
}
private Coroutine joinRoutine;
private IEnumerator HostAndSearchRoutine()
{
// Step 1: Start hosting
InstanceFinder.ServerManager.StartConnection();
// Step 2: Start advertising
yield return new WaitForSeconds(0.5f); // Let the server settle
networkDiscovery.StartAdvertisingServer();
// Step 3: Begin searching
yield return new WaitForSeconds(0.5f); // Let advertisement initialize
networkDiscovery.StartSearchingForServers();
// Step 4: Try to find and join a better server
yield return new WaitForSeconds(0.5f); // Give discovery a moment
StartJoinRoutine();
}
public void StartJoinRoutine()
{
if (joinRoutine != null) StopCoroutine(joinRoutine);
joinRoutine = StartCoroutine(TryJoinServerRepeatedly());
}
private IEnumerator TryJoinServerRepeatedly()
{
float timeout = 10f;
float timer = 0f;
while (timer < timeout)
{
if (foundServers.Count > 0)
{
var firstServer = foundServers[0];
//networkDiscovery.StopAdvertisingServer();
networkDiscovery.StopSearchingForServers();
InstanceFinder.ClientManager.StartConnection(firstServer.Address.ToString());
statusText.text = $"Joined server: {firstServer.Address}";
yield break;
}
statusText.text = $"Searching for servers... ({Mathf.FloorToInt(timer)}s)";
yield return new WaitForSeconds(1f);
timer += 1f;
}
statusText.text = "No servers found. Acting as host.";
// You can optionally start your own server here
}
private void ClearServerList()
{
foreach (Transform child in serverListContainer)
{
Destroy(child.gameObject);
}
}
}

View File

@ -0,0 +1,261 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1243484539689895160
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6102112898136418063}
- component: {fileID: 4162166102933070300}
- component: {fileID: 8982425673842065088}
- component: {fileID: 6642303600386318624}
m_Layer: 5
m_Name: Server List item prefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6102112898136418063
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1243484539689895160}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.2, y: 1.2, z: 1.2}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 6068593683225063891}
m_Father: {fileID: 0}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4162166102933070300
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1243484539689895160}
m_CullTransparentMesh: 1
--- !u!114 &8982425673842065088
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1243484539689895160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &6642303600386318624
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1243484539689895160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0.21698111, g: 0.21698111, b: 0.21698111, a: 1}
m_HighlightedColor: {r: 0.21960784, g: 0.21960784, b: 0.21960784, a: 1}
m_PressedColor: {r: 0.21960784, g: 0.21960784, b: 0.21960784, a: 1}
m_SelectedColor: {r: 0.21960784, g: 0.21960784, b: 0.21960784, a: 1}
m_DisabledColor: {r: 0.21960784, g: 0.21960784, b: 0.21960784, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 8982425673842065088}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &8712802155540729905
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6068593683225063891}
- component: {fileID: 767001398382591515}
- component: {fileID: 730381457657509126}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6068593683225063891
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8712802155540729905}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6102112898136418063}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &767001398382591515
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8712802155540729905}
m_CullTransparentMesh: 1
--- !u!114 &730381457657509126
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8712802155540729905}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: ...
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 576a6f8ea39540279a630577bd7afdd6
timeCreated: 1641941960

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: e081f465852cec14380da085e957c52b
DefaultImporter:
userData:

View File

@ -1,4 +0,0 @@
fileFormatVersion: 2
guid: 1c18650754748f647bacde4e2116cbff
DefaultImporter:
userData:

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 246f31a0e00fea74a93125fec6d80da8 guid: f5d758e3acccf474babdbe217a2702ba
folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -0,0 +1,182 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8051369383683820709
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8051369383683820711}
- component: {fileID: 8051369383683820710}
- component: {fileID: 8051369383683820712}
m_Layer: 0
m_Name: Character
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8051369383683820711
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8051369383683820709}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8051369383799751563}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8051369383683820710
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8051369383683820709}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bdd6baffed6b79b48bb8cf0161756493, type: 3}
m_Name:
m_EditorClassIdentifier:
moveTime: 0.3
spacing:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!95 &8051369383683820712
Animator:
serializedVersion: 7
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8051369383683820709}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: f9d4780e949200b49ae5f256e0442cea, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_AnimatePhysics: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1 &8051369383799751561
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8051369383799751563}
- component: {fileID: 8051369383799751562}
m_Layer: 0
m_Name: Sprite
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8051369383799751563
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8051369383799751561}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8051369383683820711}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &8051369383799751562
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8051369383799751561}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 10
m_Sprite: {fileID: 21300048, guid: 50bccb3411d406442a8403b4563296fe, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.875, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: af07a1ee10ccc834a9f9300876f0dd1d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,291 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3776417633943570566
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2713484099994599764}
- component: {fileID: 8898868620759246925}
- component: {fileID: 2823387740483917408}
- component: {fileID: 7228060430554009006}
m_Layer: 5
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2713484099994599764
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3776417633943570566}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7722027027337438454}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 28.47, y: 0}
m_SizeDelta: {x: 318.76, y: 60}
m_Pivot: {x: 0, y: 1}
--- !u!222 &8898868620759246925
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3776417633943570566}
m_CullTransparentMesh: 0
--- !u!114 &2823387740483917408
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3776417633943570566}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.08788714, g: 0.55213046, b: 0.745283, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: 6d126f2c0efbba843a135aa740cbaacf, type: 3}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Description
--- !u!114 &7228060430554009006
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3776417633943570566}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1573420865, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
--- !u!1 &7372123802294102135
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7722027027337438454}
- component: {fileID: 640838197393523978}
- component: {fileID: 4648272933990885673}
m_Layer: 5
m_Name: ControlCard
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7722027027337438454
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7372123802294102135}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2713484099994599764}
- {fileID: 7039742045538577585}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 535, y: 60}
m_Pivot: {x: 0, y: 1}
--- !u!222 &640838197393523978
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7372123802294102135}
m_CullTransparentMesh: 0
--- !u!114 &4648272933990885673
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7372123802294102135}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8940b9c7b5c3e474fb41c133c6d5921b, type: 3}
m_Name:
m_EditorClassIdentifier:
description: {fileID: 2823387740483917408}
key: {fileID: 2372743461420994894}
--- !u!1 &8159339757654792732
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7039742045538577585}
- component: {fileID: 3585941539577991754}
- component: {fileID: 2372743461420994894}
- component: {fileID: 2990572538408775129}
m_Layer: 5
m_Name: Key
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7039742045538577585
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8159339757654792732}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7722027027337438454}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 432.64, y: -30}
m_SizeDelta: {x: 170.83, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3585941539577991754
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8159339757654792732}
m_CullTransparentMesh: 0
--- !u!114 &2372743461420994894
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8159339757654792732}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.08788714, g: 0.55213046, b: 0.745283, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: 6d126f2c0efbba843a135aa740cbaacf, type: 3}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: key
--- !u!114 &2990572538408775129
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8159339757654792732}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9339623, g: 0.12775902, b: 0.12775902, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 2372743461420994894}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 4648272933990885673}
m_MethodName: Rebind
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7bc281e9b618bf04280bf3c33c3885fc
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 27cd94760aa43894b9c62c6daf8744f4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -341,6 +341,15 @@
"processors": "", "processors": "",
"interactions": "", "interactions": "",
"initialStateCheck": true "initialStateCheck": true
},
{
"name": "Menu",
"type": "Button",
"id": "39706395-c969-4237-93cf-67a34bc65814",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
} }
], ],
"bindings": [ "bindings": [
@ -541,6 +550,17 @@
"action": "Is Tracked", "action": "Is Tracked",
"isComposite": false, "isComposite": false,
"isPartOfComposite": false "isPartOfComposite": false
},
{
"name": "",
"id": "5caa4e7f-3ad1-435d-ba4e-d4a5c08829cf",
"path": "",
"interactions": "",
"processors": "",
"groups": "",
"action": "Menu",
"isComposite": false,
"isPartOfComposite": false
} }
] ]
}, },
@ -619,6 +639,24 @@
"processors": "", "processors": "",
"interactions": "", "interactions": "",
"initialStateCheck": true "initialStateCheck": true
},
{
"name": "Menu",
"type": "Button",
"id": "14d919dc-f9a2-41b4-8031-4c7595badb99",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "SelectButton",
"type": "Button",
"id": "29709a2c-9d19-453b-aa39-9e808a78c174",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
} }
], ],
"bindings": [ "bindings": [
@ -753,6 +791,50 @@
"action": "Translate Anchor", "action": "Translate Anchor",
"isComposite": false, "isComposite": false,
"isPartOfComposite": false "isPartOfComposite": false
},
{
"name": "",
"id": "f4faa8a6-f624-4e4a-8282-c76236c0a5b9",
"path": "*/{PrimaryButton}",
"interactions": "",
"processors": "",
"groups": "Generic XR Controller",
"action": "Menu",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4f916ad5-7696-4f73-9fd2-2d5edf9d5e41",
"path": "*/{SecondaryButton}",
"interactions": "",
"processors": "",
"groups": "Generic XR Controller",
"action": "Menu",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "2c1c3a2b-0893-45cb-bddd-6e5bc4b6c618",
"path": "*/{MenuButton}",
"interactions": "",
"processors": "",
"groups": "Generic XR Controller",
"action": "Menu",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c2f7c46d-dff0-4ecf-806d-5677572830bb",
"path": "*/{TriggerButton}",
"interactions": "",
"processors": "",
"groups": "Generic XR Controller",
"action": "SelectButton",
"isComposite": false,
"isPartOfComposite": false
} }
] ]
}, },
@ -1295,6 +1377,15 @@
"processors": "", "processors": "",
"interactions": "", "interactions": "",
"initialStateCheck": true "initialStateCheck": true
},
{
"name": "Select Button",
"type": "Button",
"id": "032871cb-ede6-4367-b571-d0de017baaf3",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
} }
], ],
"bindings": [ "bindings": [
@ -1429,6 +1520,17 @@
"action": "Translate Anchor", "action": "Translate Anchor",
"isComposite": false, "isComposite": false,
"isPartOfComposite": false "isPartOfComposite": false
},
{
"name": "",
"id": "e6857251-fe54-4650-898b-0008bd6a3db3",
"path": "*/{TriggerButton}",
"interactions": "",
"processors": "",
"groups": "Generic XR Controller",
"action": "Select Button",
"isComposite": false,
"isPartOfComposite": false
} }
] ]
}, },

View File

@ -2,20 +2,25 @@
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000 --- !u!21 &2100000
Material: Material:
serializedVersion: 6 serializedVersion: 8
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: TunnelingVignette m_Name: TunnelingVignette
m_Shader: {fileID: 4800000, guid: 57a6ee90d63926849add7351e0648a36, type: 3} m_Shader: {fileID: 4800000, guid: 57a6ee90d63926849add7351e0648a36, type: 3}
m_ShaderKeywords: _WINDQUALITY_NONE m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _WINDQUALITY_NONE
m_LightmapFlags: 4 m_LightmapFlags: 4
m_EnableInstancingVariants: 0 m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0 m_DoubleSidedGI: 0
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
disabledShaderPasses: [] disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties: m_SavedProperties:
serializedVersion: 3 serializedVersion: 3
m_TexEnvs: m_TexEnvs:
@ -103,6 +108,7 @@ Material:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats: m_Floats:
- Vector1_3F06E706: 0.2 - Vector1_3F06E706: 0.2
- Vector1_75dd1e4765a74fbfb568941f1cbc3b28: 0.2 - Vector1_75dd1e4765a74fbfb568941f1cbc3b28: 0.2

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2ad85b0f43f25f1499c27a4dca23ddd8 guid: 8f19a044f4ee30042a6ad8c58d595f40
folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -0,0 +1,50 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraMovement : MonoBehaviour
{
[SerializeField] private Transform target;
[SerializeField] private float speed;
private MapInfo map;
private Camera cam;
void Start()
{
map = FindObjectOfType<MapInfo>();
cam = GetComponentInChildren<Camera>();
if (cam == null)
enabled = false;
}
// LateUpdate is called once at the end of frame
void LateUpdate()
{
if(target == null)
return;
Vector3 targetPositon = target.position;
if (map != null)
{
targetPositon = map.ClampPosition(targetPositon,
new Vector2(cam.orthographicSize * cam.aspect, cam.orthographicSize));
}
transform.position = Vector3.MoveTowards(transform.position, targetPositon, speed * Time.deltaTime);
}
public void SetTarget(Transform newTarget)
{
target = newTarget;
}
public void JumpToTarget()
{
if(target == null)
return;
transform.position = target.position;
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9cc1c8f52cb11d142b26f98158580b66 guid: 1490e1d8991fb6546860b2b1859f6001
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

24
Assets/Scripts/Command.cs Normal file
View File

@ -0,0 +1,24 @@
//Command.cs
using UnityEngine;
public abstract class Command
{
public abstract KeyCode Key { get; set; }
public abstract string Description { get; }
/*
Todo:
1. Add an abstract Execute method with an argument for receiver.
For your consideration:
What would make for a good Execute receiver parameter?
Should we try to limit the receiver types?
How precisely can we limit the receiver's type?
Could we move the receiver into command data instead?
What are the benefits of either approach? Which works best here?
*/
/*
2. Create a MoveCommand class, which executes Walk method in TileBasedMovement component.
Execute method of this command should call the Walk(Vector3 direction) method of GridMovement.
*/
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c372f0cb4dbc3db4c991d69f9481efa4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Scripts/GUI.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9f91583480983b6449cdd7996dc3edca
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ControlCard : MonoBehaviour
{
public Command MyCommand;
[SerializeField] private Text description;
[SerializeField] private Text key;
private RebindMenu rebindMenu;
public void Populate(Command command, RebindMenu rebindMenu)
{
this.rebindMenu = rebindMenu;
MyCommand = command;
Refresh();
}
public void Rebind()
{
rebindMenu.Open(this);
}
public void Refresh()
{
description.text = MyCommand.Description;
key.text = MyCommand.Key.ToString();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8940b9c7b5c3e474fb41c133c6d5921b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ControlsMenu : MonoBehaviour
{
[Header("Widgets")]
[SerializeField] private GameObject mainPanel;
[SerializeField] private GameObject scrollContent;
[SerializeField] private RebindMenu rebindMenu;
[Header("Prefabs")]
[SerializeField] private ControlCard controlCardPrefab;
private InputHandler inputHandler;
// Start is called before the first frame update
void Start()
{
inputHandler = FindObjectOfType<InputHandler>();
if (inputHandler == null)
{
gameObject.SetActive(false);
return;
}
foreach (Command command in inputHandler.Keymap)
{
ControlCard card = Instantiate(controlCardPrefab, scrollContent.transform);
card.Populate(command, rebindMenu);
}
Close();
}
public void Open()
{
mainPanel.SetActive(true);
inputHandler.enabled = false;
}
public void Close()
{
mainPanel.SetActive(false);
rebindMenu.Close();
inputHandler.enabled = true;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2a01ec157fbb2184ba9fe507120720d7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,37 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class RebindMenu : MonoBehaviour
{
[SerializeField] private Text instruction;
private ControlCard controlCard;
public void Open(ControlCard keybindCard)
{
controlCard = keybindCard;
instruction.text = $"Enter new key for\n" +
$"{controlCard.MyCommand.Description}";
gameObject.SetActive(true);
}
public void Close()
{
gameObject.SetActive(false);
}
//On GUI provides a convenient method to get keycodes through Event data
void OnGUI()
{
if(!(Event.current.isKey && Input.anyKeyDown))
return;
controlCard.MyCommand.Key = Event.current.keyCode;
controlCard.Refresh();
Close();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bd6df0aacf9fc0649996299244764e42
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,92 @@
//GridMovement.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GridMovement : MonoBehaviour
{
[SerializeField] private float moveTime = 0.3f;
[SerializeField] private AnimationCurve spacing;
private bool isMoving;
private Animator animator;
private MapInfo map;
void Start()
{
animator = GetComponent<Animator>();
animator.SetFloat("y", -1);
map = FindObjectOfType<MapInfo>();
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.W))
{
Walk(Vector3.up);
}
else if (Input.GetKeyDown(KeyCode.S))
{
Walk(Vector3.down);
}
else if (Input.GetKeyDown(KeyCode.A))
{
Walk(Vector3.left);
}
else if (Input.GetKeyDown(KeyCode.D))
{
Walk(Vector3.right);
}
}
public bool Walk(Vector3 direction)
{
if (isMoving)
return false;
if (!IsPositionWalkable(transform.position + direction))
return false;
StartCoroutine(WalkCoroutine(direction, moveTime));
return true;
}
private bool IsPositionWalkable(Vector3 pos)
{
if (Physics2D.OverlapPoint(pos) != null)
return false;
if (map != null)
{
return map.IsPositionInBounds(pos);
}
return true;
}
private IEnumerator WalkCoroutine(Vector3 direction, float duration)
{
Vector3 from = transform.position;
Vector3 to = from + direction;
animator.SetFloat("x", direction.x);
animator.SetFloat("y", direction.y);
animator.SetFloat("speed", 1f);
if (duration < float.Epsilon)
{
transform.position = to;
yield break;
}
isMoving = true;
float aggregate = 0;
while (aggregate < 1f)
{
aggregate += Time.deltaTime / duration;
transform.position = Vector3.Lerp(from, to, spacing.Evaluate(aggregate));
yield return null;
}
isMoving = false;
animator.SetFloat("speed", 0f);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bdd6baffed6b79b48bb8cf0161756493
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,31 @@
//InputHandler.cs
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
public class InputHandler : MonoBehaviour
{
// SerializeField let's us assign a value in the Unity editor for private variables.
[SerializeField]
// The character currently being commanded
private GridMovement currentActor;
// A list of all characters in the scene
private List<GridMovement> allActors;
// Variables for binding commands to input and executing commands
public List<Command> Keymap = new List<Command>(); // keycode to command mapping
// Use this for initialization
void Awake()
{
// TODO: Add movement commands to the list
}
void Update()
{
// TODO: Loop through all commands and execute them on correct actor via correct key press.
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 024cba9d4ec5ad94f9c1a71c69531745
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

28
Assets/Scripts/MapInfo.cs Normal file
View File

@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MapInfo : MonoBehaviour
{
[Header("Map Bounds")]
public Vector2Int MaxCoordinate;
public Vector2Int MinCoordinate;
public bool IsPositionInBounds(Vector3 pos)
{
return pos.x <= MaxCoordinate.x &&
pos.x >= MinCoordinate.x &&
pos.y <= MaxCoordinate.y &&
pos.y >= MinCoordinate.y;
}
public Vector3 ClampPosition(Vector3 pos, Vector2 border)
{
return new Vector3(
Mathf.Clamp(pos.x, MinCoordinate.x + border.x - 1, MaxCoordinate.x - border.x + 1),
Mathf.Clamp(pos.y, MinCoordinate.y + border.y - 1, MaxCoordinate.y - border.y + 1),
pos.z);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b1d98edaef7b5584b901e896b9884397
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 0513661a0421e1b48bf12e93fa7fd32c
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Highway Gothic Condensed
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 203f921b75842f94980ce8bc16dbcb5e
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Highway Gothic Expanded
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 86ebc3b6c244e104484ba83184df624e
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Highway Gothic Narrow
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 776fe1a80b7f5e849bc8a771ac823335
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Highway Gothic
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: a140e778bc3825a448f26048e2e3b6b6
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Highway Gothic Wide
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 073c1e6b6fa23824a91bde459e0ab714
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 040c35c7cdde44445a82a5c31d2dc09f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: 9dea5884fe8a0ae4f8c8591e2a8109b6
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Rubik
fallbackFontReferences:
- {fileID: 12800000, guid: ea3bd7e30e648b44295e8062d7703012, type: 3}
- {fileID: 12800000, guid: 1ce70496c2a732c4ab6e2028f85fef16, type: 3}
- {fileID: 12800000, guid: 5ba23d7fd900fbf469f8d83cc2925475, type: 3}
- {fileID: 12800000, guid: 9275a70863d5c4640b4a5ffe04d3593d, type: 3}
- {fileID: 12800000, guid: 960d67f74d5391141ac509dd7fe34ac4, type: 3}
- {fileID: 12800000, guid: 75d6543f7688c6041bb1d88fdf113ec6, type: 3}
- {fileID: 12800000, guid: 974b22d25338a2b4a823c48f5b3545b4, type: 3}
- {fileID: 12800000, guid: a79210c2f22448b459a98dcc0ada0292, type: 3}
- {fileID: 12800000, guid: a601fde13d865f841a0af75b9466421e, type: 3}
- {fileID: 12800000, guid: 86413e54e48f5134ab96b18d6c0c1493, type: 3}
- {fileID: 12800000, guid: 16b0bf29c5564704fbf769553f5e9382, type: 3}
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
fileFormatVersion: 2
guid: 86413e54e48f5134ab96b18d6c0c1493
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Rubik
fallbackFontReferences:
- {fileID: 12800000, guid: 9275a70863d5c4640b4a5ffe04d3593d, type: 3}
- {fileID: 12800000, guid: 75d6543f7688c6041bb1d88fdf113ec6, type: 3}
- {fileID: 12800000, guid: 16b0bf29c5564704fbf769553f5e9382, type: 3}
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 5f19da0cb9622d94c8810039e573949a
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Rubik
fallbackFontReferences:
- {fileID: 12800000, guid: ea3bd7e30e648b44295e8062d7703012, type: 3}
- {fileID: 12800000, guid: 1ce70496c2a732c4ab6e2028f85fef16, type: 3}
- {fileID: 12800000, guid: 9dea5884fe8a0ae4f8c8591e2a8109b6, type: 3}
- {fileID: 12800000, guid: 5ba23d7fd900fbf469f8d83cc2925475, type: 3}
- {fileID: 12800000, guid: 9275a70863d5c4640b4a5ffe04d3593d, type: 3}
- {fileID: 12800000, guid: 960d67f74d5391141ac509dd7fe34ac4, type: 3}
- {fileID: 12800000, guid: 75d6543f7688c6041bb1d88fdf113ec6, type: 3}
- {fileID: 12800000, guid: 974b22d25338a2b4a823c48f5b3545b4, type: 3}
- {fileID: 12800000, guid: a79210c2f22448b459a98dcc0ada0292, type: 3}
- {fileID: 12800000, guid: a601fde13d865f841a0af75b9466421e, type: 3}
- {fileID: 12800000, guid: 86413e54e48f5134ab96b18d6c0c1493, type: 3}
- {fileID: 12800000, guid: 16b0bf29c5564704fbf769553f5e9382, type: 3}
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,27 @@
fileFormatVersion: 2
guid: 974b22d25338a2b4a823c48f5b3545b4
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Rubik
fallbackFontReferences:
- {fileID: 12800000, guid: 9275a70863d5c4640b4a5ffe04d3593d, type: 3}
- {fileID: 12800000, guid: 960d67f74d5391141ac509dd7fe34ac4, type: 3}
- {fileID: 12800000, guid: 75d6543f7688c6041bb1d88fdf113ec6, type: 3}
- {fileID: 12800000, guid: a601fde13d865f841a0af75b9466421e, type: 3}
- {fileID: 12800000, guid: 86413e54e48f5134ab96b18d6c0c1493, type: 3}
- {fileID: 12800000, guid: 16b0bf29c5564704fbf769553f5e9382, type: 3}
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,30 @@
fileFormatVersion: 2
guid: 5ba23d7fd900fbf469f8d83cc2925475
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Rubik
fallbackFontReferences:
- {fileID: 12800000, guid: ea3bd7e30e648b44295e8062d7703012, type: 3}
- {fileID: 12800000, guid: 9275a70863d5c4640b4a5ffe04d3593d, type: 3}
- {fileID: 12800000, guid: 960d67f74d5391141ac509dd7fe34ac4, type: 3}
- {fileID: 12800000, guid: 75d6543f7688c6041bb1d88fdf113ec6, type: 3}
- {fileID: 12800000, guid: 974b22d25338a2b4a823c48f5b3545b4, type: 3}
- {fileID: 12800000, guid: a79210c2f22448b459a98dcc0ada0292, type: 3}
- {fileID: 12800000, guid: a601fde13d865f841a0af75b9466421e, type: 3}
- {fileID: 12800000, guid: 86413e54e48f5134ab96b18d6c0c1493, type: 3}
- {fileID: 12800000, guid: 16b0bf29c5564704fbf769553f5e9382, type: 3}
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More