Compare commits
94 Commits
afab7d7810
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 31145f9735 | |||
| a8bec4f5ff | |||
| 13c1e8a0f6 | |||
| 24543cce38 | |||
| 9af96fed99 | |||
| ac87f2f8ef | |||
| 856ff3ca40 | |||
| 693b3a572e | |||
| 8977957054 | |||
| b563be1158 | |||
| 616532e69c | |||
| 450efe675a | |||
| cce7492556 | |||
| e197206d0a | |||
| dc7aa3b9b9 | |||
| 54d44afcec | |||
| 15c2e62e92 | |||
| c4fafd1dd3 | |||
| 1c03f1773b | |||
| ef3bc5da39 | |||
| ed66253b06 | |||
| 6b8c3b6fbb | |||
| cb73b9cbbc | |||
| 07cdba6097 | |||
| b9448fb4c7 | |||
| 4b1d8ea5bd | |||
| 6a76fa038f | |||
| 8af4eff8c7 | |||
| b38461fc52 | |||
| e5baba75cf | |||
| b9515d50d0 | |||
| e06b0206c8 | |||
| cd0313e693 | |||
| 1580f40636 | |||
| 803e87688a | |||
| 6479d850e9 | |||
| bad94ab628 | |||
| a8568685ab | |||
| eadbd139e4 | |||
| 4f0e84caae | |||
| 25ed189168 | |||
| f5ba95849e | |||
| c5b90be63f | |||
| 5a41559b88 | |||
| 5ab753f4b5 | |||
| ed18f85228 | |||
| dab664b62a | |||
| 9d389a3296 | |||
| c7ed19b8dc | |||
| 5e251e9d23 | |||
| b176dcc20a | |||
| a1c495cf92 | |||
| 9f65f3d476 | |||
| 317d74dfef | |||
| 7ec96e6fdd | |||
| f42fc6463c | |||
| d269226b4b | |||
| 47d505a1ba | |||
| e7ad8e6fd4 | |||
| 36e3b95645 | |||
| b012ae17b2 | |||
| 11b4c264ef | |||
| a3f514b6eb | |||
| b9ccfb1c3a | |||
| cdd6a2e96d | |||
| 9af005b651 | |||
| e9b013a904 | |||
| 262a67293e | |||
| bc7217fce3 | |||
| ab2406c367 | |||
| 0f409ddb08 | |||
| d3f41bd245 | |||
| 4aa139be24 | |||
| b4c665abe4 | |||
|
|
b84e1b7837 | ||
|
|
e9fe4cb559 | ||
| d2673f52e1 | |||
| e6045f7775 | |||
| e6ddcc7390 | |||
| 75cfdd7a48 | |||
|
|
071c1db4f4 | ||
|
|
9bd8601edb | ||
| ffd98b6322 | |||
| 03a3ca570e | |||
| fe60892585 | |||
| fe90ea9996 | |||
| 7f643bf361 | |||
| 1287fd8f39 | |||
| ac04a4ee16 | |||
| e40106b45e | |||
| 7ea187f9fd | |||
| b62e851c0e | |||
| 960991b17d | |||
| 9f4da45c40 |
26
.gitattributes
vendored
26
.gitattributes
vendored
@@ -1,8 +1,8 @@
|
||||
* text=auto
|
||||
# Unity files
|
||||
*.meta -text merge=unityyamlmerge diff
|
||||
*.unity -text merge=unityyamlmerge diff
|
||||
*.asset -text merge=unityyamlmerge diff
|
||||
*.unity filter=lfs diff=lfs merge=lfs -text
|
||||
*.asset filter=lfs diff=lfs merge=lfs -text
|
||||
*.prefab -text merge=unityyamlmerge diff
|
||||
*.mat -text merge=unityyamlmerge diff
|
||||
*.anim -text merge=unityyamlmerge diff
|
||||
@@ -79,4 +79,24 @@
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.exr filter=lfs diff=lfs merge=lfs -text
|
||||
*.hdr filter=lfs diff=lfs merge=lfs -text
|
||||
*.unity 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
|
||||
|
||||
Binary file not shown.
@@ -242,7 +242,7 @@ namespace FishNet.Discovery
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
// Debug.Log("NetworkDiscovery is searching on port " + port);
|
||||
Debug.Log("NetworkDiscovery is searching");
|
||||
|
||||
if (InstanceFinder.IsClient)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
using _PROJECT.NewHandPresence;
|
||||
using FishNet;
|
||||
using FishNet.Discovery;
|
||||
using FishNet.Managing.Scened;
|
||||
using FishNet.Object;
|
||||
using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using TMPro;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class NetworkMenuUI : MonoBehaviour
|
||||
{
|
||||
|
||||
|
||||
private ConcurrentQueue<System.Action> mainThreadQueue = new();
|
||||
[Header("UI References")]
|
||||
public Toggle VRToggle;
|
||||
|
||||
public Button startPlayingButton;
|
||||
public Button reloadButton;
|
||||
public Button joinMultiplayerButton;
|
||||
public Transform serverListContainer;
|
||||
public GameObject serverListItemPrefab;
|
||||
public TMP_Text statusText;
|
||||
public Button quitButton;
|
||||
|
||||
[Header("Networking")]
|
||||
public NetworkDiscovery networkDiscovery;
|
||||
public Camera uiCamera;
|
||||
public AudioListener placeholderAudioListener;
|
||||
private bool _useVR;
|
||||
|
||||
//public Image coverImage;
|
||||
|
||||
private readonly List<IPEndPoint> foundServers = new();
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
||||
if (networkDiscovery == null)
|
||||
networkDiscovery = FindObjectOfType<NetworkDiscovery>();
|
||||
|
||||
_useVR = PlayerPrefs.GetInt("UseVR", 0) == 1;
|
||||
VRToggle.isOn = _useVR;
|
||||
|
||||
// React to UI toggle changes
|
||||
VRToggle.onValueChanged.AddListener((isOn) =>
|
||||
{
|
||||
_useVR = isOn;
|
||||
PlayerPrefs.SetInt("UseVR", _useVR ? 1 : 0);
|
||||
PlayerPrefs.Save();
|
||||
Debug.Log($"UseVR set to {_useVR}");
|
||||
});
|
||||
|
||||
startPlayingButton.onClick.AddListener(OnStartPlaying);
|
||||
reloadButton.onClick.AddListener(OnReload);
|
||||
joinMultiplayerButton.onClick.AddListener(OnJoinMultiplayer);
|
||||
quitButton.onClick.AddListener(OnQuit);
|
||||
|
||||
networkDiscovery.ServerFoundCallback += (endPoint) =>
|
||||
{
|
||||
Debug.Log("Found a server");
|
||||
// Only queue the endpoint for main-thread processing
|
||||
mainThreadQueue.Enqueue(() =>
|
||||
{
|
||||
StartCoroutine(ProcessServerFound(endPoint));
|
||||
});
|
||||
};
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
while (mainThreadQueue.TryDequeue(out var action))
|
||||
{
|
||||
action.Invoke(); // safely runs on main thread
|
||||
}
|
||||
}
|
||||
private void OnStartPlaying()
|
||||
{
|
||||
statusText.text = "Starting host...";
|
||||
StartCoroutine(HostAndSearchRoutine());
|
||||
}
|
||||
|
||||
|
||||
private void OnReload()
|
||||
{
|
||||
/*if (!InstanceFinder.IsClient)
|
||||
{
|
||||
Debug.LogWarning("Reload can only be called from a client!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Use the ClientManager.Objects dictionary
|
||||
foreach (NetworkObject obj in InstanceFinder.ClientManager.Objects.)
|
||||
{
|
||||
if (obj.IsOwner) // This ensures it's YOUR local player
|
||||
{
|
||||
var xr = obj.GetComponentInChildren<XROrigin>();
|
||||
if (xr != null)
|
||||
{
|
||||
Debug.Log("Found my XR Origin player.");
|
||||
|
||||
TutorialController tutorial = xr.GetComponent<TutorialController>();
|
||||
if (tutorial != null)
|
||||
{
|
||||
tutorial._state = TutorialController.TutorialState.Initializing;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("My local player is not an XR Origin.");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private void OnJoinMultiplayer()
|
||||
{
|
||||
statusText.text = "Searching for servers...";
|
||||
networkDiscovery.StopSearchingForServers();
|
||||
ClearServerList();
|
||||
//Debug.Log(foundServers.Count);
|
||||
foundServers.Clear();
|
||||
//Debug.Log(foundServers.Count);
|
||||
networkDiscovery.StartSearchingForServers();
|
||||
}
|
||||
|
||||
private void OnQuit()
|
||||
{
|
||||
Debug.Log("Quitting application");
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
private IEnumerator ProcessServerFound(IPEndPoint endPoint)
|
||||
{
|
||||
Debug.Log("server found");
|
||||
//Debug.Log(endPoint.Address.ToString());
|
||||
//Debug.Log(foundServers.Count);
|
||||
if (foundServers.Contains(endPoint)) yield return null;
|
||||
foundServers.Add(endPoint);
|
||||
|
||||
Debug.Log($"Server found {endPoint}");
|
||||
// Auto-join if started as host
|
||||
if (InstanceFinder.IsServer)
|
||||
{
|
||||
Debug.Log("Server is local");
|
||||
//networkDiscovery.StopAdvertisingServer();
|
||||
networkDiscovery.StopSearchingForServers();
|
||||
|
||||
uiCamera.enabled = false;
|
||||
Debug.Log("Disabled placeholder audio source");
|
||||
placeholderAudioListener.enabled = false;
|
||||
//coverImage.gameObject.SetActive(false);
|
||||
|
||||
InstanceFinder.ClientManager.StartConnection(endPoint.Address.ToString());
|
||||
statusText.text = $"Joined server: {endPoint.Address}";
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Debug.Log("Server is foregin");
|
||||
GameObject item = Instantiate(serverListItemPrefab, serverListContainer);
|
||||
|
||||
|
||||
|
||||
TMP_Text label = item.GetComponentInChildren<TMP_Text>();
|
||||
if (label != null)
|
||||
label.text = endPoint.Address.ToString();
|
||||
|
||||
Button btn = item.GetComponent<Button>();
|
||||
btn.onClick.RemoveAllListeners(); // clear any old listener
|
||||
btn.onClick.AddListener(() =>
|
||||
{
|
||||
networkDiscovery.StopSearchingForServers();
|
||||
if (uiCamera != null) uiCamera.enabled = false;
|
||||
if (placeholderAudioListener != null)
|
||||
{
|
||||
Debug.Log("Disabled placeholder audio source");
|
||||
placeholderAudioListener.enabled = false;
|
||||
}
|
||||
//coverImage.gameObject.SetActive(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();
|
||||
if (uiCamera != null) uiCamera.enabled = false;
|
||||
if (placeholderAudioListener != null)
|
||||
{
|
||||
Debug.Log("Disabled placeholder audio source");
|
||||
placeholderAudioListener.enabled = false;
|
||||
}
|
||||
networkDiscovery.StopSearchingForServers();
|
||||
InstanceFinder.ClientManager.StartConnection(firstServer.Address.ToString());
|
||||
statusText.text = $"Joined server: {firstServer.Address}";
|
||||
//coverImage.gameObject.SetActive(false);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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}
|
||||
8
Assets/Materials.meta
Normal file
8
Assets/Materials.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8be822b805a1a743a8ce4e297f22632
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
45
Assets/Materials/Lit Variant.mat
Normal file
45
Assets/Materials/Lit Variant.mat
Normal file
@@ -0,0 +1,45 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Lit Variant
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: -6478536213147159724, guid: 248e38dcb931fa345a11dbf79e87036f,
|
||||
type: 3}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats: []
|
||||
m_Colors:
|
||||
- _Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &6311866733530308580
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 7
|
||||
@@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f586378b4e144a9851e7b34d9b748ee
|
||||
timeCreated: 1484171803
|
||||
licenseType: Pro
|
||||
guid: 2a434b8ce7febdc44909acb2b1ffe4ce
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
8
Assets/Prefabs.meta
Normal file
8
Assets/Prefabs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f5d758e3acccf474babdbe217a2702ba
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
182
Assets/Prefabs/Character.prefab
Normal file
182
Assets/Prefabs/Character.prefab
Normal 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
|
||||
7
Assets/Prefabs/Character.prefab.meta
Normal file
7
Assets/Prefabs/Character.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af07a1ee10ccc834a9f9300876f0dd1d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
291
Assets/Prefabs/ControlCard.prefab
Normal file
291
Assets/Prefabs/ControlCard.prefab
Normal 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
|
||||
7
Assets/Prefabs/ControlCard.prefab.meta
Normal file
7
Assets/Prefabs/ControlCard.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7bc281e9b618bf04280bf3c33c3885fc
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1438
Assets/Prefabs/Controls Canvas.prefab
Normal file
1438
Assets/Prefabs/Controls Canvas.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefabs/Controls Canvas.prefab.meta
Normal file
7
Assets/Prefabs/Controls Canvas.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27cd94760aa43894b9c62c6daf8744f4
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -2,20 +2,25 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: TunnelingVignette
|
||||
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_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
@@ -103,6 +108,7 @@ Material:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- Vector1_3F06E706: 0.2
|
||||
- Vector1_75dd1e4765a74fbfb568941f1cbc3b28: 0.2
|
||||
|
||||
8
Assets/Scripts.meta
Normal file
8
Assets/Scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f19a044f4ee30042a6ad8c58d595f40
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
50
Assets/Scripts/CameraMovement.cs
Normal file
50
Assets/Scripts/CameraMovement.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cc1c8f52cb11d142b26f98158580b66
|
||||
guid: 1490e1d8991fb6546860b2b1859f6001
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
24
Assets/Scripts/Command.cs
Normal file
24
Assets/Scripts/Command.cs
Normal 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.
|
||||
*/
|
||||
}
|
||||
11
Assets/Scripts/Command.cs.meta
Normal file
11
Assets/Scripts/Command.cs.meta
Normal 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
8
Assets/Scripts/GUI.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f91583480983b6449cdd7996dc3edca
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
Assets/Scripts/GUI/ControlCard.cs
Normal file
34
Assets/Scripts/GUI/ControlCard.cs
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/Scripts/GUI/ControlCard.cs.meta
Normal file
11
Assets/Scripts/GUI/ControlCard.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8940b9c7b5c3e474fb41c133c6d5921b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
48
Assets/Scripts/GUI/ControlsMenu.cs
Normal file
48
Assets/Scripts/GUI/ControlsMenu.cs
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/Scripts/GUI/ControlsMenu.cs.meta
Normal file
11
Assets/Scripts/GUI/ControlsMenu.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a01ec157fbb2184ba9fe507120720d7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
37
Assets/Scripts/GUI/RebindMenu.cs
Normal file
37
Assets/Scripts/GUI/RebindMenu.cs
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/Scripts/GUI/RebindMenu.cs.meta
Normal file
11
Assets/Scripts/GUI/RebindMenu.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd6df0aacf9fc0649996299244764e42
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
92
Assets/Scripts/GridMovement.cs
Normal file
92
Assets/Scripts/GridMovement.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/GridMovement.cs.meta
Normal file
11
Assets/Scripts/GridMovement.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bdd6baffed6b79b48bb8cf0161756493
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
31
Assets/Scripts/InputHandler.cs
Normal file
31
Assets/Scripts/InputHandler.cs
Normal 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.
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/InputHandler.cs.meta
Normal file
11
Assets/Scripts/InputHandler.cs.meta
Normal 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
28
Assets/Scripts/MapInfo.cs
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/Scripts/MapInfo.cs.meta
Normal file
11
Assets/Scripts/MapInfo.cs.meta
Normal 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.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGCOND.TTF
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGCOND.TTF
Normal file
Binary file not shown.
@@ -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:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGEXPD.TTF
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGEXPD.TTF
Normal file
Binary file not shown.
@@ -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:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGNRRW.TTF
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGNRRW.TTF
Normal file
Binary file not shown.
@@ -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:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGOTH.TTF
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGOTH.TTF
Normal file
Binary file not shown.
@@ -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:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGWDE.TTF
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HWYGWDE.TTF
Normal file
Binary file not shown.
@@ -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:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HighwayGothic SDF.asset
LFS
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/HighwayGothic SDF.asset
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 073c1e6b6fa23824a91bde459e0ab714
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,347 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2180264
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: LiberationSans SDF Material
|
||||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Cube:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FaceTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 28268798066460806}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OutlineTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Ambient: 0.5
|
||||
- _Bevel: 0.5
|
||||
- _BevelClamp: 0
|
||||
- _BevelOffset: 0
|
||||
- _BevelRoundness: 0
|
||||
- _BevelWidth: 0
|
||||
- _BumpFace: 0
|
||||
- _BumpOutline: 0
|
||||
- _BumpScale: 1
|
||||
- _ColorMask: 15
|
||||
- _CullMode: 0
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _Diffuse: 0.5
|
||||
- _DstBlend: 0
|
||||
- _FaceDilate: 0
|
||||
- _FaceUVSpeedX: 0
|
||||
- _FaceUVSpeedY: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _GlowInner: 0.05
|
||||
- _GlowOffset: 0
|
||||
- _GlowOuter: 0.05
|
||||
- _GlowPower: 0.75
|
||||
- _GradientScale: 10
|
||||
- _LightAngle: 3.1416
|
||||
- _MaskSoftnessX: 0
|
||||
- _MaskSoftnessY: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _OutlineSoftness: 0
|
||||
- _OutlineUVSpeedX: 0
|
||||
- _OutlineUVSpeedY: 0
|
||||
- _OutlineWidth: 0
|
||||
- _Parallax: 0.02
|
||||
- _PerspectiveFilter: 0.875
|
||||
- _Reflectivity: 10
|
||||
- _ScaleRatioA: 0.90909094
|
||||
- _ScaleRatioB: 0.73125
|
||||
- _ScaleRatioC: 0.7386364
|
||||
- _ScaleX: 1
|
||||
- _ScaleY: 1
|
||||
- _ShaderFlags: 0
|
||||
- _Sharpness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SpecularPower: 2
|
||||
- _SrcBlend: 1
|
||||
- _Stencil: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilOp: 0
|
||||
- _StencilReadMask: 255
|
||||
- _StencilWriteMask: 255
|
||||
- _TextureHeight: 512
|
||||
- _TextureWidth: 512
|
||||
- _UVSec: 0
|
||||
- _UnderlayDilate: 0
|
||||
- _UnderlayOffsetX: 0
|
||||
- _UnderlayOffsetY: 0
|
||||
- _UnderlaySoftness: 0
|
||||
- _VertexOffsetX: 0
|
||||
- _VertexOffsetY: 0
|
||||
- _WeightBold: 0.75
|
||||
- _WeightNormal: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04, type: 3}
|
||||
m_Name: LiberationSans SDF - Fallback
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 1.1.0
|
||||
m_Material: {fileID: 2180264}
|
||||
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
|
||||
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
|
||||
m_AtlasPopulationMode: 1
|
||||
InternalDynamicOS: 0
|
||||
m_FaceInfo:
|
||||
m_FaceIndex: 0
|
||||
m_FamilyName: Liberation Sans
|
||||
m_StyleName: Regular
|
||||
m_PointSize: 86
|
||||
m_Scale: 1
|
||||
m_LineHeight: 98.8916
|
||||
m_AscentLine: 77.853516
|
||||
m_CapLine: 59
|
||||
m_MeanLine: 45
|
||||
m_Baseline: 0
|
||||
m_DescentLine: -18.22461
|
||||
m_SuperscriptOffset: 77.853516
|
||||
m_SuperscriptSize: 0.5
|
||||
m_SubscriptOffset: -18.22461
|
||||
m_SubscriptSize: 0.5
|
||||
m_UnderlineOffset: -12.261719
|
||||
m_UnderlineThickness: 6.298828
|
||||
m_StrikethroughOffset: 18
|
||||
m_StrikethroughThickness: 6.298828
|
||||
m_TabWidth: 24
|
||||
m_GlyphTable: []
|
||||
m_CharacterTable: []
|
||||
m_AtlasTextures:
|
||||
- {fileID: 28268798066460806}
|
||||
m_AtlasTextureIndex: 0
|
||||
m_IsMultiAtlasTexturesEnabled: 1
|
||||
m_ClearDynamicDataOnBuild: 1
|
||||
m_UsedGlyphRects: []
|
||||
m_FreeGlyphRects:
|
||||
- m_X: 0
|
||||
m_Y: 0
|
||||
m_Width: 511
|
||||
m_Height: 511
|
||||
m_fontInfo:
|
||||
Name: Liberation Sans
|
||||
PointSize: 86
|
||||
Scale: 1
|
||||
CharacterCount: 250
|
||||
LineHeight: 98.90625
|
||||
Baseline: 0
|
||||
Ascender: 77.84375
|
||||
CapHeight: 59.1875
|
||||
Descender: -18.21875
|
||||
CenterLine: 0
|
||||
SuperscriptOffset: 77.84375
|
||||
SubscriptOffset: -12.261719
|
||||
SubSize: 0.5
|
||||
Underline: -12.261719
|
||||
UnderlineThickness: 6.298828
|
||||
strikethrough: 23.675
|
||||
strikethroughThickness: 0
|
||||
TabWidth: 239.0625
|
||||
Padding: 9
|
||||
AtlasWidth: 1024
|
||||
AtlasHeight: 1024
|
||||
atlas: {fileID: 0}
|
||||
m_AtlasWidth: 512
|
||||
m_AtlasHeight: 512
|
||||
m_AtlasPadding: 9
|
||||
m_AtlasRenderMode: 4169
|
||||
m_glyphInfoList: []
|
||||
m_KerningTable:
|
||||
kerningPairs: []
|
||||
m_FontFeatureTable:
|
||||
m_MultipleSubstitutionRecords: []
|
||||
m_LigatureSubstitutionRecords: []
|
||||
m_GlyphPairAdjustmentRecords: []
|
||||
m_MarkToBaseAdjustmentRecords: []
|
||||
m_MarkToMarkAdjustmentRecords: []
|
||||
fallbackFontAssets: []
|
||||
m_FallbackFontAssetTable: []
|
||||
m_CreationSettings:
|
||||
sourceFontFileName:
|
||||
sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
|
||||
faceIndex: 0
|
||||
pointSizeSamplingMode: 0
|
||||
pointSize: 86
|
||||
padding: 9
|
||||
paddingMode: 0
|
||||
packingMode: 4
|
||||
atlasWidth: 512
|
||||
atlasHeight: 512
|
||||
characterSetSelectionMode: 1
|
||||
characterSequence: 32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633
|
||||
referencedFontAssetGUID: 8f586378b4e144a9851e7b34d9b748ee
|
||||
referencedTextAssetGUID:
|
||||
fontStyle: 0
|
||||
fontStyleModifier: 0
|
||||
renderMode: 4169
|
||||
includeFontFeatures: 1
|
||||
m_FontWeightTable:
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
fontWeights:
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
- regularTypeface: {fileID: 0}
|
||||
italicTypeface: {fileID: 0}
|
||||
normalStyle: 0
|
||||
normalSpacingOffset: 0
|
||||
boldStyle: 0.75
|
||||
boldSpacing: 7
|
||||
italicStyle: 35
|
||||
tabSize: 10
|
||||
--- !u!28 &28268798066460806
|
||||
Texture2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: LiberationSans SDF Atlas
|
||||
m_ImageContentsHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
serializedVersion: 2
|
||||
m_Width: 0
|
||||
m_Height: 0
|
||||
m_CompleteImageSize: 0
|
||||
m_TextureFormat: 1
|
||||
m_MipCount: 1
|
||||
m_IsReadable: 1
|
||||
m_StreamingMipmaps: 0
|
||||
m_StreamingMipmapsPriority: 0
|
||||
m_AlphaIsTransparency: 0
|
||||
m_ImageCount: 1
|
||||
m_TextureDimension: 2
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 1
|
||||
m_Aniso: 1
|
||||
m_MipBias: 0
|
||||
m_WrapU: 0
|
||||
m_WrapV: 0
|
||||
m_WrapW: 0
|
||||
m_LightmapFormat: 0
|
||||
m_ColorSpace: 0
|
||||
image data: 0
|
||||
_typelessdata:
|
||||
m_StreamData:
|
||||
offset: 0
|
||||
size: 0
|
||||
path:
|
||||
File diff suppressed because one or more lines are too long
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Black SDF.asset
LFS
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Black SDF.asset
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 040c35c7cdde44445a82a5c31d2dc09f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Black.ttf
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Black.ttf
Normal file
Binary file not shown.
@@ -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:
|
||||
Binary file not shown.
@@ -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:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Bold.ttf
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Bold.ttf
Normal file
Binary file not shown.
@@ -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:
|
||||
Binary file not shown.
@@ -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:
|
||||
Binary file not shown.
@@ -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:
|
||||
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9275a70863d5c4640b4a5ffe04d3593d
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Rubik
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Italic.ttf
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Italic.ttf
Normal file
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16b0bf29c5564704fbf769553f5e9382
|
||||
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}
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Light SDF.asset
LFS
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Light SDF.asset
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 254d33525bc3919439f569ea33703c5b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Light.ttf
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Light.ttf
Normal file
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 75d6543f7688c6041bb1d88fdf113ec6
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Rubik
|
||||
fallbackFontReferences:
|
||||
- {fileID: 12800000, guid: 9275a70863d5c4640b4a5ffe04d3593d, type: 3}
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,34 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f51daeb03a982249aa5bebe7c26f9ab
|
||||
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: 5f19da0cb9622d94c8810039e573949a, 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:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Medium SDF.asset
LFS
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Medium SDF.asset
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d564a6b9a8a781b438125b614edcc297
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Medium.ttf
Normal file
BIN
Assets/TextMesh Pro/Resources/Fonts & Materials/Rubik-Medium.ttf
Normal file
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 960d67f74d5391141ac509dd7fe34ac4
|
||||
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: 86413e54e48f5134ab96b18d6c0c1493, type: 3}
|
||||
- {fileID: 12800000, guid: 16b0bf29c5564704fbf769553f5e9382, type: 3}
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea3bd7e30e648b44295e8062d7703012
|
||||
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: 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:
|
||||
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a79210c2f22448b459a98dcc0ada0292
|
||||
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: 974b22d25338a2b4a823c48f5b3545b4, 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:
|
||||
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a601fde13d865f841a0af75b9466421e
|
||||
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: 86413e54e48f5134ab96b18d6c0c1493, type: 3}
|
||||
- {fileID: 12800000, guid: 16b0bf29c5564704fbf769553f5e9382, type: 3}
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ce70496c2a732c4ab6e2028f85fef16
|
||||
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: 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:
|
||||
Binary file not shown.
@@ -11,9 +11,10 @@ Material:
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2000
|
||||
@@ -113,9 +114,9 @@ Material:
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.6981132, g: 0.4544322, b: 0.45867008, a: 1}
|
||||
- _Color: {r: 0.6981132, g: 0.4544322, b: 0.45867002, a: 1}
|
||||
- _EmissionColor: {r: 0.074176654, g: 0.074176654, b: 0.074176654, a: 1}
|
||||
- _BaseColor: {r: 0.9339623, g: 0.030838395, b: 0.045404896, a: 1}
|
||||
- _Color: {r: 0.9339623, g: 0.030838395, b: 0.045404874, a: 1}
|
||||
- _EmissionColor: {r: 0.1807191, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &8952982900415126127
|
||||
|
||||
@@ -215,6 +215,7 @@ namespace UnityEngine.XR.Content.Interaction
|
||||
}
|
||||
|
||||
pressInfo.m_InPressRegion = withinButtonRegion;
|
||||
Debug.Log("Button was pressed by: " + pressInfo.m_Interactor);
|
||||
}
|
||||
|
||||
minimumHeight = Mathf.Max(minimumHeight, -(m_PressDistance + m_PressBuffer));
|
||||
@@ -234,7 +235,11 @@ namespace UnityEngine.XR.Content.Interaction
|
||||
m_Toggled = !m_Toggled;
|
||||
|
||||
if (m_Toggled)
|
||||
{
|
||||
m_OnPress.Invoke();
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
m_OnRelease.Invoke();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using static MouseLook;
|
||||
|
||||
@@ -100,7 +101,8 @@ public class CarDrivingRoutine : MonoBehaviour
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
{;
|
||||
if (other.GetComponent<XROrigin>() == null) return;
|
||||
StartCoroutine(SmoothAdjustSpeed(0, 0, haltspeed)); // Smoothly halt in 1 second
|
||||
_tireSound.Stop();
|
||||
_stopSound.Play();
|
||||
@@ -108,6 +110,7 @@ public class CarDrivingRoutine : MonoBehaviour
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.GetComponent<XROrigin>() == null) return;
|
||||
StartCoroutine(SmoothAdjustSpeed(targetSpeed, targetRotationSpeed, haltspeed)); // Smoothly resume speed in 1 second
|
||||
_stopSound.Stop();
|
||||
_tireSound.Play();
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
namespace UnityEngine.XR.Content.Interaction
|
||||
{
|
||||
/// <summary>
|
||||
/// An interactable that can be pushed by a direct interactor's movement
|
||||
/// </summary>
|
||||
public class CarTeleportButton : XRBaseInteractable
|
||||
{
|
||||
class PressInfo
|
||||
{
|
||||
internal IXRHoverInteractor m_Interactor;
|
||||
internal bool m_InPressRegion = false;
|
||||
internal bool m_WrongSide = false;
|
||||
}
|
||||
public PassangerSeat passangerSeat;
|
||||
|
||||
[Serializable]
|
||||
public class ValueChangeEvent : UnityEvent<float> { }
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The object that is visually pressed down")]
|
||||
Transform m_Button = null;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("The distance the button can be pressed")]
|
||||
float m_PressDistance = 0.1f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Extra distance for clicking the button down")]
|
||||
float m_PressBuffer = 0.01f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Offset from the button base to start testing for push")]
|
||||
float m_ButtonOffset = 0.0f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("How big of a surface area is available for pressing the button")]
|
||||
float m_ButtonSize = 0.1f;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Treat this button like an on/off toggle")]
|
||||
bool m_ToggleButton = false;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Events to trigger when the button is pressed")]
|
||||
UnityEvent m_OnPress;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Events to trigger when the button is released")]
|
||||
UnityEvent m_OnRelease;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Events to trigger when the button pressed value is updated. Only called when the button is pressed")]
|
||||
ValueChangeEvent m_OnValueChange;
|
||||
|
||||
[SerializeField]
|
||||
[Tooltip("Audio source to play when the button is pressed")]
|
||||
AudioSource m_AudioSource;
|
||||
|
||||
bool m_Pressed = false;
|
||||
bool m_Toggled = false;
|
||||
float m_Value = 0f;
|
||||
Vector3 m_BaseButtonPosition = Vector3.zero;
|
||||
|
||||
Dictionary<IXRHoverInteractor, PressInfo> m_HoveringInteractors = new Dictionary<IXRHoverInteractor, PressInfo>();
|
||||
|
||||
/// <summary>
|
||||
/// The object that is visually pressed down
|
||||
/// </summary>
|
||||
public Transform button
|
||||
{
|
||||
get => m_Button;
|
||||
set => m_Button = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The distance the button can be pressed
|
||||
/// </summary>
|
||||
public float pressDistance
|
||||
{
|
||||
get => m_PressDistance;
|
||||
set => m_PressDistance = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The distance (in percentage from 0 to 1) the button is currently being held down
|
||||
/// </summary>
|
||||
public float value => m_Value;
|
||||
|
||||
/// <summary>
|
||||
/// Events to trigger when the button is pressed
|
||||
/// </summary>
|
||||
public UnityEvent onPress => m_OnPress;
|
||||
|
||||
/// <summary>
|
||||
/// Events to trigger when the button is released
|
||||
/// </summary>
|
||||
public UnityEvent onRelease => m_OnRelease;
|
||||
|
||||
/// <summary>
|
||||
/// Events to trigger when the button distance value is changed. Only called when the button is pressed
|
||||
/// </summary>
|
||||
public ValueChangeEvent onValueChange => m_OnValueChange;
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not a toggle button is in the locked down position
|
||||
/// </summary>
|
||||
public bool toggleValue
|
||||
{
|
||||
get => m_ToggleButton && m_Toggled;
|
||||
set
|
||||
{
|
||||
if (!m_ToggleButton)
|
||||
return;
|
||||
|
||||
m_Toggled = value;
|
||||
if (m_Toggled)
|
||||
SetButtonHeight(-m_PressDistance);
|
||||
else
|
||||
SetButtonHeight(0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsHoverableBy(IXRHoverInteractor interactor)
|
||||
{
|
||||
if (interactor is XRRayInteractor)
|
||||
return false;
|
||||
|
||||
return base.IsHoverableBy(interactor);
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (m_Button != null)
|
||||
m_BaseButtonPosition = m_Button.position;
|
||||
}
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
if (m_Toggled)
|
||||
SetButtonHeight(-m_PressDistance);
|
||||
else
|
||||
SetButtonHeight(0.0f);
|
||||
|
||||
hoverEntered.AddListener(StartHover);
|
||||
hoverExited.AddListener(EndHover);
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
hoverEntered.RemoveListener(StartHover);
|
||||
hoverExited.RemoveListener(EndHover);
|
||||
base.OnDisable();
|
||||
}
|
||||
|
||||
void StartHover(HoverEnterEventArgs args)
|
||||
{
|
||||
m_HoveringInteractors.Add(args.interactorObject, new PressInfo { m_Interactor = args.interactorObject });
|
||||
}
|
||||
|
||||
void EndHover(HoverExitEventArgs args)
|
||||
{
|
||||
m_HoveringInteractors.Remove(args.interactorObject);
|
||||
|
||||
if (m_HoveringInteractors.Count == 0)
|
||||
{
|
||||
if (m_ToggleButton && m_Toggled)
|
||||
SetButtonHeight(-m_PressDistance);
|
||||
else
|
||||
SetButtonHeight(0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase updatePhase)
|
||||
{
|
||||
base.ProcessInteractable(updatePhase);
|
||||
|
||||
if (updatePhase == XRInteractionUpdateOrder.UpdatePhase.Dynamic)
|
||||
{
|
||||
if (m_HoveringInteractors.Count > 0)
|
||||
{
|
||||
UpdatePress();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdatePress()
|
||||
{
|
||||
var minimumHeight = 0.0f;
|
||||
|
||||
if (m_ToggleButton && m_Toggled)
|
||||
minimumHeight = -m_PressDistance;
|
||||
|
||||
// Go through each interactor
|
||||
foreach (var pressInfo in m_HoveringInteractors.Values)
|
||||
{
|
||||
var interactorTransform = pressInfo.m_Interactor.GetAttachTransform(this);
|
||||
var localButtonWorldPos = m_Button.parent.TransformPoint(m_BaseButtonPosition);
|
||||
var localOffset = transform.InverseTransformVector(interactorTransform.position - localButtonWorldPos);
|
||||
|
||||
|
||||
|
||||
var withinButtonRegion = (Mathf.Abs(localOffset.x) < m_ButtonSize && Mathf.Abs(localOffset.z) < m_ButtonSize);
|
||||
if (withinButtonRegion)
|
||||
{
|
||||
if (!pressInfo.m_InPressRegion)
|
||||
{
|
||||
pressInfo.m_WrongSide = (localOffset.y < m_ButtonOffset);
|
||||
}
|
||||
|
||||
if (!pressInfo.m_WrongSide)
|
||||
minimumHeight = Mathf.Min(minimumHeight, localOffset.y - m_ButtonOffset);
|
||||
}
|
||||
|
||||
pressInfo.m_InPressRegion = withinButtonRegion;
|
||||
Debug.Log("Button was pressed by: " + pressInfo.m_Interactor);
|
||||
XROrigin player = pressInfo.m_Interactor.transform.parent.parent.GetComponent<XROrigin>(); // Gets XROrigin player component
|
||||
passangerSeat.activateButtonPush(player, this);
|
||||
}
|
||||
|
||||
minimumHeight = Mathf.Max(minimumHeight, -(m_PressDistance + m_PressBuffer));
|
||||
|
||||
// If button height goes below certain amount, enter press mode
|
||||
var pressed = m_ToggleButton ? (minimumHeight <= -(m_PressDistance + m_PressBuffer)) : (minimumHeight < -m_PressDistance);
|
||||
|
||||
var currentDistance = Mathf.Max(0f, -minimumHeight - m_PressBuffer);
|
||||
m_Value = currentDistance / m_PressDistance;
|
||||
|
||||
if (m_ToggleButton)
|
||||
{
|
||||
if (pressed)
|
||||
{
|
||||
if (!m_Pressed)
|
||||
{
|
||||
m_Toggled = !m_Toggled;
|
||||
|
||||
if (m_Toggled)
|
||||
{
|
||||
m_OnPress.Invoke();
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
m_OnRelease.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pressed)
|
||||
{
|
||||
if (!m_Pressed)
|
||||
m_OnPress.Invoke();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Pressed)
|
||||
m_OnRelease.Invoke();
|
||||
// Play sound if the audio source is set
|
||||
if (m_AudioSource != null)
|
||||
{
|
||||
m_AudioSource.Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
m_Pressed = pressed;
|
||||
|
||||
// Call value change event
|
||||
if (m_Pressed)
|
||||
m_OnValueChange.Invoke(m_Value);
|
||||
|
||||
SetButtonHeight(minimumHeight);
|
||||
}
|
||||
|
||||
void SetButtonHeight(float height)
|
||||
{
|
||||
if (m_Button == null)
|
||||
return;
|
||||
|
||||
Vector3 newPosition = m_Button.localPosition;
|
||||
newPosition.y = height;
|
||||
m_Button.localPosition = newPosition;
|
||||
}
|
||||
|
||||
void OnDrawGizmosSelected()
|
||||
{
|
||||
var pressStartPoint = Vector3.zero;
|
||||
|
||||
if (m_Button != null)
|
||||
{
|
||||
pressStartPoint = m_Button.localPosition;
|
||||
}
|
||||
|
||||
pressStartPoint.y += m_ButtonOffset - (m_PressDistance * 0.5f);
|
||||
|
||||
Gizmos.color = Color.green;
|
||||
Gizmos.matrix = transform.localToWorldMatrix;
|
||||
Gizmos.DrawWireCube(pressStartPoint, new Vector3(m_ButtonSize, m_PressDistance, m_ButtonSize));
|
||||
}
|
||||
|
||||
void OnValidate()
|
||||
{
|
||||
SetButtonHeight(0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56643671ea530f0498dd332a3828fa31
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,106 @@
|
||||
using _PROJECT.NewHandPresence;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR.Content.Interaction;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
public class PassangerSeat : LocomotionProvider
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
public GameObject ExitSpot;
|
||||
public CarTeleportButton ExitButton;
|
||||
private XROrigin currentPassanger;
|
||||
private LocomotionSystem currentPlayerLocomotion;
|
||||
private bool wasSmoothLocomotionEnabled;
|
||||
private ContinuousMoveProviderBase moveProvider;
|
||||
|
||||
void Start()
|
||||
{
|
||||
}
|
||||
public void activateButtonPush(XROrigin player, CarTeleportButton button)
|
||||
{
|
||||
if (button == ExitButton) ExitCar();
|
||||
else EnterCar(player);
|
||||
}
|
||||
public void EnterCar(XROrigin player)
|
||||
{
|
||||
if (player == null || currentPassanger != null) return;
|
||||
|
||||
TutorialController cameraChild = player.GetComponentInChildren<TutorialController>();
|
||||
//TunnelingVignetteController vignetteController = player.GetComponentInChildren<TunnelingVignetteController>();
|
||||
//LocomotionVignetteProvider vignetteProvider = player.GetComponentInChildren<LocomotionVignetteProvider>();
|
||||
if (cameraChild == null) return;
|
||||
|
||||
Transform cameraTransform = cameraChild.transform.parent.transform;
|
||||
|
||||
Vector3 cameraShift = cameraTransform.localPosition;
|
||||
|
||||
currentPassanger = player;
|
||||
player.transform.SetParent(this.transform);
|
||||
player.transform.localPosition = -cameraShift;
|
||||
player.transform.localRotation = Quaternion.identity;
|
||||
cameraTransform.localRotation = this.transform.rotation;
|
||||
BeginLocomotion();
|
||||
disablePlayerLocomotion(player);
|
||||
}
|
||||
private void disablePlayerLocomotion(XROrigin player)
|
||||
{
|
||||
Menu menu = player.GetComponentInChildren<Menu>();
|
||||
if (menu != null) menu.DeactivateMenu();
|
||||
|
||||
currentPlayerLocomotion = player.GetComponentInChildren<LocomotionSystem>();
|
||||
moveProvider = player.GetComponentInChildren<ContinuousMoveProviderBase>();
|
||||
|
||||
if (moveProvider != null)
|
||||
wasSmoothLocomotionEnabled = moveProvider.enabled;
|
||||
|
||||
if (currentPlayerLocomotion != null)
|
||||
{
|
||||
Debug.Log("LocomotionSystem of: " + currentPlayerLocomotion + " disabled");
|
||||
currentPlayerLocomotion.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void ExitCar()
|
||||
{
|
||||
if (currentPassanger == null) return;
|
||||
EndLocomotion();
|
||||
enablePlayerLocomotion(currentPassanger);
|
||||
|
||||
TutorialController cameraChild = currentPassanger.GetComponentInChildren<TutorialController>();
|
||||
if (cameraChild == null) return;
|
||||
|
||||
Transform cameraTransform = cameraChild.transform.parent.transform;
|
||||
|
||||
// Set the player<65>s parent to null (making it part of the scene hierarchy)
|
||||
currentPassanger.transform.SetParent(null);
|
||||
|
||||
// Put the player outside;
|
||||
currentPassanger.transform.localPosition = ExitSpot.transform.position;
|
||||
cameraTransform.rotation = ExitSpot.transform.rotation;
|
||||
currentPassanger = null;
|
||||
}
|
||||
|
||||
private void enablePlayerLocomotion(XROrigin player)
|
||||
{
|
||||
Menu menu = player.GetComponentInChildren<Menu>();
|
||||
if (menu != null) menu.ReactivateMenu();
|
||||
|
||||
if (currentPlayerLocomotion != null)
|
||||
currentPlayerLocomotion.gameObject.SetActive(true);
|
||||
|
||||
if (moveProvider != null)
|
||||
moveProvider.enabled = wasSmoothLocomotionEnabled;
|
||||
moveProvider = null;
|
||||
}
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43e665e561e4e7a4fb6f5f399e4430b1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/_PROJECT/Components/Bow/Scoring.meta
Normal file
8
Assets/_PROJECT/Components/Bow/Scoring.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ddaae698ad29c04680c947f49bcee90
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/_PROJECT/Components/Bow/Scoring/Blank square.png
LFS
Normal file
BIN
Assets/_PROJECT/Components/Bow/Scoring/Blank square.png
LFS
Normal file
Binary file not shown.
148
Assets/_PROJECT/Components/Bow/Scoring/Blank square.png.meta
Normal file
148
Assets/_PROJECT/Components/Bow/Scoring/Blank square.png.meta
Normal file
@@ -0,0 +1,148 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84559f539a8fded4ab0a8d1158df9a34
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Windows Store Apps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/_PROJECT/Components/Bow/Scoring/Empty sheet.png
LFS
Normal file
BIN
Assets/_PROJECT/Components/Bow/Scoring/Empty sheet.png
LFS
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user