From 22b4755b7001eb9edc0be14010ec9efc1759ce91 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Sun, 31 Jan 2021 11:09:50 +1100 Subject: [PATCH] Working play controller --- Assets/Data/StartUI/StartCountDown.asset | 4 +- Assets/Randomizer.cs | 4 + Assets/Scenes/MainMenu.unity | 3 + Assets/Scenes/MainMenu.unity.meta | 7 + Assets/Scenes/PlayerJoinScene.unity | 4 +- Assets/Scenes/Testing Scenes/PlayerTest.unity | 4 +- Assets/Scripts/Managers/GameManager.cs | 28 ++- .../Scripts/Player Scripts/InputBehaviour.cs | 27 +++ .../Player Scripts/InputBehaviour.cs.meta | 11 + .../{PlayerInput.cs => PlayerDataHolder.cs} | 2 +- ...Input.cs.meta => PlayerDataHolder.cs.meta} | 0 .../Player Scripts/PlayerInputController.cs | 25 +- Assets/Scripts/Player Scripts/PlayerList.cs | 4 +- .../Scripts/Player Scripts/PlayerManager.cs | 2 +- .../Scripts/Player Scripts/PlayerVisuals.cs | 47 ++++ .../Player Scripts/PlayerVisuals.cs.meta | 11 + .../Scripts/UI/StartScreen/PlayerJoinIcon.cs | 5 + Assets/Scripts/UI/StartScreen/PlayerJoinUI.cs | 7 + .../Scripts/UI/StartScreen/StartScreenUI.cs | 25 +- Assets/World Assets/Materials/MenuSkybox.mat | 97 ++++++++ .../Materials/MenuSkybox.mat.meta | 8 + Assets/World Assets/Prefabs/Player.prefab | 216 +++++++++++++++--- .../Prefabs/YeetyPlayer Variant.prefab | 4 + .../Textures/Player_prototype.png | 3 + .../Textures/Player_prototype.png.meta | 154 +++++++++++++ Assets/World Assets/Textures/player_apron.png | 3 + .../Textures/player_apron.png.meta | 154 +++++++++++++ ProjectSettings/EditorBuildSettings.asset | 4 +- .../com.unity.probuilder/Settings.json | 2 +- 29 files changed, 802 insertions(+), 63 deletions(-) create mode 100644 Assets/Scenes/MainMenu.unity create mode 100644 Assets/Scenes/MainMenu.unity.meta create mode 100644 Assets/Scripts/Player Scripts/InputBehaviour.cs create mode 100644 Assets/Scripts/Player Scripts/InputBehaviour.cs.meta rename Assets/Scripts/Player Scripts/{PlayerInput.cs => PlayerDataHolder.cs} (81%) rename Assets/Scripts/Player Scripts/{PlayerInput.cs.meta => PlayerDataHolder.cs.meta} (100%) create mode 100644 Assets/Scripts/Player Scripts/PlayerVisuals.cs create mode 100644 Assets/Scripts/Player Scripts/PlayerVisuals.cs.meta create mode 100644 Assets/World Assets/Materials/MenuSkybox.mat create mode 100644 Assets/World Assets/Materials/MenuSkybox.mat.meta create mode 100644 Assets/World Assets/Textures/Player_prototype.png create mode 100644 Assets/World Assets/Textures/Player_prototype.png.meta create mode 100644 Assets/World Assets/Textures/player_apron.png create mode 100644 Assets/World Assets/Textures/player_apron.png.meta diff --git a/Assets/Data/StartUI/StartCountDown.asset b/Assets/Data/StartUI/StartCountDown.asset index 8bb1ee8..a6bf1cd 100644 --- a/Assets/Data/StartUI/StartCountDown.asset +++ b/Assets/Data/StartUI/StartCountDown.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13436f466beab517ebda34d6070f298f3d9658f006edccbadc49e76370c23918 -size 468 +oid sha256:fbd6ab3adb2878ca24fd0729102ac0d9311d82264428ae14411d02982d8890ad +size 470 diff --git a/Assets/Randomizer.cs b/Assets/Randomizer.cs index 76e7f16..d0afff4 100644 --- a/Assets/Randomizer.cs +++ b/Assets/Randomizer.cs @@ -18,6 +18,10 @@ public class Randomizer : MonoBehaviour public GameObject topObj; public GameObject bottomObj; + [SerializeField] + private bool m_RandomizeOnAwake; + + public void RandomizeParts(int a, int b, int c, int d, int e, int f) { baseObj.GetComponent().material.mainTexture =bases[a]; diff --git a/Assets/Scenes/MainMenu.unity b/Assets/Scenes/MainMenu.unity new file mode 100644 index 0000000..857029d --- /dev/null +++ b/Assets/Scenes/MainMenu.unity @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b761cdfcfaf2ef8ef42dacd933c918864bc3471dd72727ab6d8b3ab875b781ec +size 31025 diff --git a/Assets/Scenes/MainMenu.unity.meta b/Assets/Scenes/MainMenu.unity.meta new file mode 100644 index 0000000..66f17b2 --- /dev/null +++ b/Assets/Scenes/MainMenu.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b79707a426eed924a9926d85a57c24ae +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/PlayerJoinScene.unity b/Assets/Scenes/PlayerJoinScene.unity index 04a1bcb..a2d10f9 100644 --- a/Assets/Scenes/PlayerJoinScene.unity +++ b/Assets/Scenes/PlayerJoinScene.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb27a0269c94bdafc5a3e77752768e888c0f94d67aa6b3bd2be873fcf6e433fa -size 7750 +oid sha256:dc8615481614d10a6fbf0d0e29458c5676bbc21338acc548e0c9be44d1946b77 +size 40106 diff --git a/Assets/Scenes/Testing Scenes/PlayerTest.unity b/Assets/Scenes/Testing Scenes/PlayerTest.unity index c705bb3..e2ca249 100644 --- a/Assets/Scenes/Testing Scenes/PlayerTest.unity +++ b/Assets/Scenes/Testing Scenes/PlayerTest.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:768ac381577cdb784579393f18dca89518697f5139ca39440dbe2d447b8d380d -size 38805 +oid sha256:82a3624880dbdde6439e2199bb7135c2cd2304884e782a5d4ed6dc7eeefbe537 +size 37832 diff --git a/Assets/Scripts/Managers/GameManager.cs b/Assets/Scripts/Managers/GameManager.cs index 4b33329..bc68ab3 100644 --- a/Assets/Scripts/Managers/GameManager.cs +++ b/Assets/Scripts/Managers/GameManager.cs @@ -11,25 +11,37 @@ public class GameManager : MonoBehaviour [SerializeField] private GameObject m_playerPrefab; + + private Camera m_camera; + // Start is called before the first frame update void Start() { - + SetUpPlayers(); + m_camera = Camera.main; } - // Update is called once per frame - void Update() + private void SetUpPlayers() { - - } + foreach (PlayerData data in m_PlayerList.AllPlayers) + { + GameObject newPlayer = Instantiate(m_playerPrefab); + data.Input.SwitchCurrentActionMap("Gameplay"); - private void SetUpPlayers() - { + foreach (InputBehaviour input in newPlayer.GetComponentsInChildren()) + input.Initialise(data); - + newPlayer.GetComponentInChildren().Initalise(data); + + newPlayer.transform.position += Vector3.ProjectOnPlane(Random.insideUnitSphere, Vector3.up); + } + } + private void LateUpdate() + { + } } diff --git a/Assets/Scripts/Player Scripts/InputBehaviour.cs b/Assets/Scripts/Player Scripts/InputBehaviour.cs new file mode 100644 index 0000000..0413732 --- /dev/null +++ b/Assets/Scripts/Player Scripts/InputBehaviour.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.InputSystem; + +public abstract class InputBehaviour : MonoBehaviour +{ + + protected PlayerData m_data; + + public virtual void Initialise(PlayerData data) + { + this.m_data = data; + RegisterInput(data.Input); + } + + protected virtual void OnDestroy() + { + if (m_data != null) + UnregisterInput(m_data.Input); + } + + + public abstract void RegisterInput(PlayerInput playerInput); + + public abstract void UnregisterInput(PlayerInput playerInput); +} diff --git a/Assets/Scripts/Player Scripts/InputBehaviour.cs.meta b/Assets/Scripts/Player Scripts/InputBehaviour.cs.meta new file mode 100644 index 0000000..e124a2a --- /dev/null +++ b/Assets/Scripts/Player Scripts/InputBehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ce47a6f551a12e45b389bbcadd60fee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Player Scripts/PlayerInput.cs b/Assets/Scripts/Player Scripts/PlayerDataHolder.cs similarity index 81% rename from Assets/Scripts/Player Scripts/PlayerInput.cs rename to Assets/Scripts/Player Scripts/PlayerDataHolder.cs index ac05cf4..5e657d8 100644 --- a/Assets/Scripts/Player Scripts/PlayerInput.cs +++ b/Assets/Scripts/Player Scripts/PlayerDataHolder.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using UnityEngine; -public class PlayerInput : MonoBehaviour +public class PlayerDataHolder : MonoBehaviour { private PlayerData m_Data; diff --git a/Assets/Scripts/Player Scripts/PlayerInput.cs.meta b/Assets/Scripts/Player Scripts/PlayerDataHolder.cs.meta similarity index 100% rename from Assets/Scripts/Player Scripts/PlayerInput.cs.meta rename to Assets/Scripts/Player Scripts/PlayerDataHolder.cs.meta diff --git a/Assets/Scripts/Player Scripts/PlayerInputController.cs b/Assets/Scripts/Player Scripts/PlayerInputController.cs index 58fcd02..6885ce0 100644 --- a/Assets/Scripts/Player Scripts/PlayerInputController.cs +++ b/Assets/Scripts/Player Scripts/PlayerInputController.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; -[RequireComponent(typeof(UnityEngine.InputSystem.PlayerInput), typeof(CharacterController))] -public class PlayerInputController : MonoBehaviour +[RequireComponent(typeof(CharacterController))] +public class PlayerInputController : InputBehaviour { @@ -21,20 +21,15 @@ public class PlayerInputController : MonoBehaviour + "1.0 = forward")] private AnimationCurve m_turnRadius; - - private UnityEngine.InputSystem.PlayerInput m_input; private CharacterController m_controller; private Vector3 m_desiredDirection; private bool m_recievedInput => m_desiredDirection.magnitude != 0; - private YeetController m_yeetController; private void Awake() { - m_input = GetComponent(); m_controller = GetComponent(); - m_yeetController = GetComponent(); } @@ -46,9 +41,9 @@ public class PlayerInputController : MonoBehaviour } - private void OnMovement(InputValue value) + private void OnMovement(InputAction.CallbackContext value) { - Vector2 m_recievedInput = value.Get(); + Vector2 m_recievedInput = value.ReadValue(); m_desiredDirection = new Vector3(m_recievedInput.x, 0.0f, m_recievedInput.y); } @@ -75,4 +70,16 @@ public class PlayerInputController : MonoBehaviour { transform.position = Vector3.ProjectOnPlane(transform.position, axis); } + + public override void RegisterInput(PlayerInput playerInput) + { + playerInput.currentActionMap.FindAction("Movement").performed += OnMovement; + playerInput.currentActionMap.FindAction("Movement").canceled += OnMovement; + } + + public override void UnregisterInput(PlayerInput playerInput) + { + playerInput.currentActionMap.FindAction("Movement").performed -= OnMovement; + playerInput.currentActionMap.FindAction("Movement").canceled -= OnMovement; + } } diff --git a/Assets/Scripts/Player Scripts/PlayerList.cs b/Assets/Scripts/Player Scripts/PlayerList.cs index 2f2226c..388544b 100644 --- a/Assets/Scripts/Player Scripts/PlayerList.cs +++ b/Assets/Scripts/Player Scripts/PlayerList.cs @@ -15,7 +15,9 @@ public class PlayerList : ScriptableObject [ShowNativeProperty] public int PlayerCount => Players.Count; - public Dictionary Players = new Dictionary(); + public PlayerData[] AllPlayers => Players.Values.ToArray(); + + public Dictionary Players = new Dictionary(); private uint m_totalPlayerCount; diff --git a/Assets/Scripts/Player Scripts/PlayerManager.cs b/Assets/Scripts/Player Scripts/PlayerManager.cs index aab8334..8ea12b5 100644 --- a/Assets/Scripts/Player Scripts/PlayerManager.cs +++ b/Assets/Scripts/Player Scripts/PlayerManager.cs @@ -26,7 +26,7 @@ public class PlayerManager : MonoBehaviour Debug.Log($"New Player Joined"); PlayerData data = m_connectedPlayers.AddPlayer(player); - newPlayer.GetComponent().Initialise(data); + newPlayer.GetComponent().Initialise(data); newPlayer.transform.SetParent(transform, false); } diff --git a/Assets/Scripts/Player Scripts/PlayerVisuals.cs b/Assets/Scripts/Player Scripts/PlayerVisuals.cs new file mode 100644 index 0000000..9c6b40f --- /dev/null +++ b/Assets/Scripts/Player Scripts/PlayerVisuals.cs @@ -0,0 +1,47 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class PlayerVisuals : MonoBehaviour +{ + + [SerializeField] + private SpriteRenderer m_apron; + + [SerializeField] + private Transform m_moveingObject; + + private Camera m_camera; + private Vector3 m_startScale; + + private void Awake() + { + m_camera = Camera.main; + m_startScale = transform.localScale; + } + + public void Initalise(PlayerData data) + { + m_apron.color = data.Color; + } + + public void LateUpdate() + { + transform.rotation = m_camera.transform.rotation; + transform.Rotate(new Vector3(0, 180, 0)); + + float direction = Mathf.Sign(Vector3.Dot(m_moveingObject.transform.forward, -m_camera.transform.right)); + transform.localScale = new Vector3(m_startScale.x * direction, m_startScale.y, m_startScale.z); + + + + + } + + + + + + + +} diff --git a/Assets/Scripts/Player Scripts/PlayerVisuals.cs.meta b/Assets/Scripts/Player Scripts/PlayerVisuals.cs.meta new file mode 100644 index 0000000..0e7bea5 --- /dev/null +++ b/Assets/Scripts/Player Scripts/PlayerVisuals.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f1c5224ac04236e479fb805642e4f051 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UI/StartScreen/PlayerJoinIcon.cs b/Assets/Scripts/UI/StartScreen/PlayerJoinIcon.cs index 2912b92..b4dcf67 100644 --- a/Assets/Scripts/UI/StartScreen/PlayerJoinIcon.cs +++ b/Assets/Scripts/UI/StartScreen/PlayerJoinIcon.cs @@ -2,9 +2,13 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; +using UnityEngine.UI; public class PlayerJoinIcon : MonoBehaviour { + [SerializeField] + private Image m_apron; + private PlayerData m_data; private Vector3 m_startingScale; @@ -27,6 +31,7 @@ public class PlayerJoinIcon : MonoBehaviour { Debug.Log("Initialised new Player"); m_data = data; + m_apron.color = data.Color; } public void OnPlayerPing(InputAction.CallbackContext args) diff --git a/Assets/Scripts/UI/StartScreen/PlayerJoinUI.cs b/Assets/Scripts/UI/StartScreen/PlayerJoinUI.cs index f1cbd24..3b71144 100644 --- a/Assets/Scripts/UI/StartScreen/PlayerJoinUI.cs +++ b/Assets/Scripts/UI/StartScreen/PlayerJoinUI.cs @@ -46,6 +46,13 @@ public class PlayerJoinUI : MonoBehaviour newPoster.localPosition = new Vector3(randomX, randomY, 0.0f); + newPoster.Rotate(Vector3.forward, Random.Range(-20.0f, 20.0f)); + + if (Random.Range(0, 2) > 0) + newPoster.transform.localScale = new Vector3(-newPoster.transform.localScale.x, newPoster.transform.localScale.y, newPoster.transform.localScale.z); + + + bool isOverlapping = false; foreach (RectTransform child in children) { diff --git a/Assets/Scripts/UI/StartScreen/StartScreenUI.cs b/Assets/Scripts/UI/StartScreen/StartScreenUI.cs index b2f417b..c138f5e 100644 --- a/Assets/Scripts/UI/StartScreen/StartScreenUI.cs +++ b/Assets/Scripts/UI/StartScreen/StartScreenUI.cs @@ -1,5 +1,6 @@ using System.Collections; using System.Collections.Generic; +using System.Linq; using UnityEngine; using TMPro; using Variables; @@ -22,6 +23,10 @@ public class StartScreenUI : MonoBehaviour [SerializeField] private Transform m_endPosition; + + [SerializeField] + private List m_aliases; + @@ -39,8 +44,18 @@ public class StartScreenUI : MonoBehaviour private void UpdateCountDown(float value) { + int number = (int)value; + if (m_aliases.Any(p => p.Number == number)) + { + m_countdownText.text = m_aliases.First(p => p.Number == number).Name; + } + else + { + m_countdownText.text = number.ToString(); + } - m_countdownText.text = ((int)value).ToString(); + + float ratio = m_lerpCurve.Evaluate(value % 1); m_countdownText.transform.position = Vector3.Lerp(m_endPosition.position, m_startPosition.position, ratio); @@ -64,4 +79,12 @@ public class StartScreenUI : MonoBehaviour } + + [System.Serializable] + public struct NumberAlias + { + public int Number; + public string Name; + } + } diff --git a/Assets/World Assets/Materials/MenuSkybox.mat b/Assets/World Assets/Materials/MenuSkybox.mat new file mode 100644 index 0000000..dd9082c --- /dev/null +++ b/Assets/World Assets/Materials/MenuSkybox.mat @@ -0,0 +1,97 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-6743396077492297169 +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: 2 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MenuSkybox + m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _SUNDISK_NONE + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + 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} + - _MainTex: + m_Texture: {fileID: 0} + 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} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlphaClip: 0 + - _AtmosphereThickness: 0.96 + - _Blend: 0 + - _BumpScale: 1 + - _Cull: 2 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _Exposure: 1.54 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SunDisk: 0 + - _SunSize: 0 + - _SunSizeConvergence: 3.69 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _GroundColor: {r: 0.9150943, g: 0.09927912, b: 0.23433246, a: 1} + - _SkyTint: {r: 0.56763506, g: 0, b: 1, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/World Assets/Materials/MenuSkybox.mat.meta b/Assets/World Assets/Materials/MenuSkybox.mat.meta new file mode 100644 index 0000000..b70c07f --- /dev/null +++ b/Assets/World Assets/Materials/MenuSkybox.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ef02d4d6130333641861d8b11d42c6cc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/World Assets/Prefabs/Player.prefab b/Assets/World Assets/Prefabs/Player.prefab index 6a7ca5a..03b1623 100644 --- a/Assets/World Assets/Prefabs/Player.prefab +++ b/Assets/World Assets/Prefabs/Player.prefab @@ -1,5 +1,88 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &2643327028999286732 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1167696238296845307} + - component: {fileID: 1341142098817708722} + m_Layer: 0 + m_Name: Player_prototype + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1167696238296845307 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2643327028999286732} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.11, y: 6.13, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 5965212798371097713} + m_Father: {fileID: 2725293204815276925} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &1341142098817708722 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2643327028999286732} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + 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: 1 + 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: 0 + m_Sprite: {fileID: 21300000, guid: b8f8aafc0bafaec4aa9ffc439415ce9f, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 9, y: 12.75} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 --- !u!1 &2725293204815276914 GameObject: m_ObjectHideFlags: 0 @@ -13,6 +96,7 @@ GameObject: - component: {fileID: 2725293204815276926} - component: {fileID: 2725293204815276927} - component: {fileID: 2725293204815276924} + - component: {fileID: 8744383078323344904} m_Layer: 0 m_Name: Player_Object m_TagString: Untagged @@ -29,8 +113,9 @@ Transform: m_GameObject: {fileID: 2725293204815276914} 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_LocalScale: {x: 0.27916, y: 0.27916, z: 0.27916} + m_Children: + - {fileID: 1167696238296845307} m_Father: {fileID: 2725293205319018844} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -337,6 +422,20 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 0} +--- !u!114 &8744383078323344904 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2725293204815276914} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1c5224ac04236e479fb805642e4f051, type: 3} + m_Name: + m_EditorClassIdentifier: + m_apron: {fileID: 9135536610966766493} + m_moveingObject: {fileID: 2725293205319018844} --- !u!1 &2725293205319018834 GameObject: m_ObjectHideFlags: 0 @@ -346,7 +445,6 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2725293205319018844} - - component: {fileID: 2725293205319018845} - component: {fileID: 2725293205319018846} - component: {fileID: 2725293205319018847} - component: {fileID: -6157332607153341915} @@ -372,36 +470,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2725293205319018845 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2725293205319018834} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actions: {fileID: -944628639613478452, guid: 0343accae530a2649aa73f13cba8378e, type: 3} - m_NotificationBehavior: 0 - m_UIInputModule: {fileID: 0} - m_DeviceLostEvent: - m_PersistentCalls: - m_Calls: [] - m_DeviceRegainedEvent: - m_PersistentCalls: - m_Calls: [] - m_ControlsChangedEvent: - m_PersistentCalls: - m_Calls: [] - m_ActionEvents: [] - m_NeverAutoSwitchControlSchemes: 0 - m_DefaultControlScheme: - m_DefaultActionMap: Gameplay - m_SplitScreenIndex: -1 - m_Camera: {fileID: 0} --- !u!143 &2725293205319018846 CharacterController: m_ObjectHideFlags: 0 @@ -479,3 +547,85 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8fa05fb7e07cd834287b7e97ac2f7576, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &6496616781582263990 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5965212798371097713} + - component: {fileID: 9135536610966766493} + m_Layer: 0 + m_Name: player_apron + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5965212798371097713 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6496616781582263990} + 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: 1167696238296845307} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &9135536610966766493 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6496616781582263990} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + 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: 1 + 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: 0 + m_Sprite: {fileID: 21300000, guid: 92c5da83b31a4504b93abd518db4f89a, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 9, y: 12.75} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 diff --git a/Assets/World Assets/Prefabs/YeetyPlayer Variant.prefab b/Assets/World Assets/Prefabs/YeetyPlayer Variant.prefab index 513e05b..4f8323e 100644 --- a/Assets/World Assets/Prefabs/YeetyPlayer Variant.prefab +++ b/Assets/World Assets/Prefabs/YeetyPlayer Variant.prefab @@ -89,6 +89,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 2725293205319018845, guid: 47d3f018734864140ba302f6972ba575, type: 3} + propertyPath: m_DefaultActionMap + value: 63e31309-151e-48ff-854a-81cb2511f050 + objectReference: {fileID: 0} - target: {fileID: 2725293205319018846, guid: 47d3f018734864140ba302f6972ba575, type: 3} propertyPath: m_SlopeLimit value: 90 diff --git a/Assets/World Assets/Textures/Player_prototype.png b/Assets/World Assets/Textures/Player_prototype.png new file mode 100644 index 0000000..f34b005 --- /dev/null +++ b/Assets/World Assets/Textures/Player_prototype.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:516c17ab2327815854cae1d16468221504fa82297ac348f382a9836331815d5f +size 130698 diff --git a/Assets/World Assets/Textures/Player_prototype.png.meta b/Assets/World Assets/Textures/Player_prototype.png.meta new file mode 100644 index 0000000..4e097c0 --- /dev/null +++ b/Assets/World Assets/Textures/Player_prototype.png.meta @@ -0,0 +1,154 @@ +fileFormatVersion: 2 +guid: b8f8aafc0bafaec4aa9ffc439415ce9f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/World Assets/Textures/player_apron.png b/Assets/World Assets/Textures/player_apron.png new file mode 100644 index 0000000..d8ff4c2 --- /dev/null +++ b/Assets/World Assets/Textures/player_apron.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8b2b5ecb6142bbf0b635bf03082a27acdb4dd52dcdf39e60c4ecb6098078759 +size 42753 diff --git a/Assets/World Assets/Textures/player_apron.png.meta b/Assets/World Assets/Textures/player_apron.png.meta new file mode 100644 index 0000000..f52457a --- /dev/null +++ b/Assets/World Assets/Textures/player_apron.png.meta @@ -0,0 +1,154 @@ +fileFormatVersion: 2 +guid: 92c5da83b31a4504b93abd518db4f89a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + 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 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 2 + mipBias: -100 + 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 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 8192 + 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: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 8192 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 8192 + 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: 8192 + 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: 8192 + 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: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 8a53ceb..c3df0dd 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb68bf88720fcc8913223f827b544731065b9e252ff0eba9394ecf11b69d6281 -size 349 +oid sha256:b860e60a2c05ee077303c4a200ab9c3192b4f54776c0dee7e78b846b41dffd4e +size 463 diff --git a/ProjectSettings/Packages/com.unity.probuilder/Settings.json b/ProjectSettings/Packages/com.unity.probuilder/Settings.json index d01c18f..9a8e478 100644 --- a/ProjectSettings/Packages/com.unity.probuilder/Settings.json +++ b/ProjectSettings/Packages/com.unity.probuilder/Settings.json @@ -111,7 +111,7 @@ { "type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", "key": "editor.selectMode", - "value": "{\"m_Value\":4}" + "value": "{\"m_Value\":1}" }, { "type": "UnityEngine.ProBuilder.PivotLocation, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",