Merge branch 'main' into slide-sideways
This commit is contained in:
commit
b64b932d6d
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 37b107ae46699425aaebe349c41daf8a
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e82d79a965eae43519cd60439e2be938
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -4401,8 +4401,8 @@ MonoBehaviour:
|
||||||
italicTypeface: {fileID: 0}
|
italicTypeface: {fileID: 0}
|
||||||
- regularTypeface: {fileID: 0}
|
- regularTypeface: {fileID: 0}
|
||||||
italicTypeface: {fileID: 0}
|
italicTypeface: {fileID: 0}
|
||||||
- regularTypeface: {fileID: 0}
|
- regularTypeface: {fileID: 11400000, guid: 37b107ae46699425aaebe349c41daf8a, type: 2}
|
||||||
italicTypeface: {fileID: 0}
|
italicTypeface: {fileID: 11400000, guid: e82d79a965eae43519cd60439e2be938, type: 2}
|
||||||
- regularTypeface: {fileID: 0}
|
- regularTypeface: {fileID: 0}
|
||||||
italicTypeface: {fileID: 0}
|
italicTypeface: {fileID: 0}
|
||||||
- regularTypeface: {fileID: 0}
|
- regularTypeface: {fileID: 0}
|
||||||
|
|
|
@ -9,12 +9,6 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1738226812227614580}
|
- component: {fileID: 1738226812227614580}
|
||||||
- component: {fileID: 1738226812227614581}
|
|
||||||
- component: {fileID: 1738226812227614582}
|
|
||||||
- component: {fileID: 233269787904781725}
|
|
||||||
- component: {fileID: 2766037370157449026}
|
|
||||||
- component: {fileID: 2122656558574222561}
|
|
||||||
- component: {fileID: -3971665732303992234}
|
|
||||||
- component: {fileID: -4901459127090716512}
|
- component: {fileID: -4901459127090716512}
|
||||||
- component: {fileID: 1858863165099212332}
|
- component: {fileID: 1858863165099212332}
|
||||||
m_Layer: 7
|
m_Layer: 7
|
||||||
|
@ -34,25 +28,77 @@ Transform:
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 0.1, y: 0.05, z: 0.6}
|
m_LocalScale: {x: 0.1, y: 0.05, z: 0.6}
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 4594444422239700297}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!33 &1738226812227614581
|
--- !u!114 &-4901459127090716512
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1738226812227614583}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 990644fedd5c4b99befe1da660313b53, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
xMin: -10.1
|
||||||
|
xMax: 10.1
|
||||||
|
--- !u!1 &7094929575626237127
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4594444422239700297}
|
||||||
|
- component: {fileID: 6881408910791168133}
|
||||||
|
- component: {fileID: 6589931989203474192}
|
||||||
|
- component: {fileID: 886925500633839999}
|
||||||
|
- component: {fileID: 6137382929676426403}
|
||||||
|
- component: {fileID: 2787129704687440408}
|
||||||
|
- component: {fileID: 2424066718066466437}
|
||||||
|
- component: {fileID: 8226614408333612856}
|
||||||
|
m_Layer: 7
|
||||||
|
m_Name: Enemy
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4594444422239700297
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7094929575626237127}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 5}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1738226812227614580}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &6881408910791168133
|
||||||
MeshFilter:
|
MeshFilter:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1738226812227614583}
|
m_GameObject: {fileID: 7094929575626237127}
|
||||||
m_Mesh: {fileID: -5495902117074765545, guid: 7421c25da3323da4aa7ac7582f03c58e, type: 3}
|
m_Mesh: {fileID: -5495902117074765545, guid: 7421c25da3323da4aa7ac7582f03c58e, type: 3}
|
||||||
--- !u!23 &1738226812227614582
|
--- !u!23 &6589931989203474192
|
||||||
MeshRenderer:
|
MeshRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1738226812227614583}
|
m_GameObject: {fileID: 7094929575626237127}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_CastShadows: 1
|
m_CastShadows: 1
|
||||||
m_ReceiveShadows: 1
|
m_ReceiveShadows: 1
|
||||||
|
@ -87,64 +133,64 @@ MeshRenderer:
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
m_AdditionalVertexStreams: {fileID: 0}
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
--- !u!65 &233269787904781725
|
--- !u!65 &886925500633839999
|
||||||
BoxCollider:
|
BoxCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1738226812227614583}
|
m_GameObject: {fileID: 7094929575626237127}
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_IsTrigger: 1
|
m_IsTrigger: 1
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Size: {x: 2, y: 2, z: 2}
|
m_Size: {x: 2, y: 2, z: 2}
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &2766037370157449026
|
--- !u!114 &6137382929676426403
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1738226812227614583}
|
m_GameObject: {fileID: 7094929575626237127}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: d77551efeb20a4bdabb517c8351695ff, type: 3}
|
m_Script: {fileID: 11500000, guid: d77551efeb20a4bdabb517c8351695ff, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
maxHealth: 4
|
maxHealth: 1
|
||||||
--- !u!114 &2122656558574222561
|
--- !u!114 &2787129704687440408
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1738226812227614583}
|
m_GameObject: {fileID: 7094929575626237127}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 5b2c8b098025f4e2f997759b5c00fef7, type: 3}
|
m_Script: {fileID: 11500000, guid: 5b2c8b098025f4e2f997759b5c00fef7, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
--- !u!114 &-3971665732303992234
|
--- !u!114 &2424066718066466437
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1738226812227614583}
|
m_GameObject: {fileID: 7094929575626237127}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 1c18e41c4d38f4467bda24e543fec25f, type: 3}
|
m_Script: {fileID: 11500000, guid: 1c18e41c4d38f4467bda24e543fec25f, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
value: 1000
|
value: 1000
|
||||||
--- !u!114 &-4901459127090716512
|
--- !u!114 &8226614408333612856
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1738226812227614583}
|
m_GameObject: {fileID: 7094929575626237127}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 990644fedd5c4b99befe1da660313b53, type: 3}
|
m_Script: {fileID: 11500000, guid: 990644fedd5c4b99befe1da660313b53, type: 3}
|
||||||
|
|
|
@ -132,6 +132,7 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 79664421}
|
- component: {fileID: 79664421}
|
||||||
|
- component: {fileID: 79664422}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: PlayerContainer
|
m_Name: PlayerContainer
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -147,13 +148,25 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 79664420}
|
m_GameObject: {fileID: 79664420}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1173812008}
|
- {fileID: 1173812008}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 5
|
m_RootOrder: 5
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &79664422
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 79664420}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 35034e3b9a94742c6be0c008855b42e4, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &84273093
|
--- !u!1 &84273093
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -1172,7 +1185,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1222495242}
|
m_GameObject: {fileID: 1222495242}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: -2.532}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1173812008}
|
m_Father: {fileID: 1173812008}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5f5923e6ff0e344db822ce1549c8a550
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -26,6 +26,6 @@ public class AddScoreOnDie : MonoBehaviour
|
||||||
|
|
||||||
private void Die()
|
private void Die()
|
||||||
{
|
{
|
||||||
Score.Value += value + (ulong)Random.Range(-5, 5);
|
Score.Add(value + (ulong)Random.Range(-5, 5));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
using DG.Tweening;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Events;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
|
|
||||||
|
public class BoldButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, ISelectHandler, IDeselectHandler
|
||||||
|
{
|
||||||
|
[SerializeField] private UnityEvent Select;
|
||||||
|
|
||||||
|
private TextMeshProUGUI _text;
|
||||||
|
private static BoldButton _currentBold;
|
||||||
|
private Tweener _tween;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
_text = GetComponentInChildren<TextMeshProUGUI>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BoldText()
|
||||||
|
{
|
||||||
|
_currentBold?.UnBoldText();
|
||||||
|
_currentBold = this;
|
||||||
|
_text.fontStyle = FontStyles.Bold;
|
||||||
|
|
||||||
|
Select?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UnBoldText()
|
||||||
|
{
|
||||||
|
_text.fontStyle = FontStyles.Normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnPointerEnter(PointerEventData eventData)
|
||||||
|
{
|
||||||
|
BoldText();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnPointerExit(PointerEventData eventData)
|
||||||
|
{
|
||||||
|
UnBoldText();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnSelect(BaseEventData eventData)
|
||||||
|
{
|
||||||
|
BoldText();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnDeselect(BaseEventData eventData)
|
||||||
|
{
|
||||||
|
UnBoldText();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5d187770e669e412092a5b03c66a546c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,23 @@
|
||||||
|
using DG.Tweening;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
|
public class PlayGameButton : MonoBehaviour, ISubmitHandler
|
||||||
|
{
|
||||||
|
[SerializeField] private string levelName;
|
||||||
|
[SerializeField] private CanvasGroup group;
|
||||||
|
[SerializeField] private CanvasGroup thisGroup;
|
||||||
|
|
||||||
|
public void OnSubmit(BaseEventData eventData)
|
||||||
|
{
|
||||||
|
var asyncOp = SceneManager.LoadSceneAsync(levelName);
|
||||||
|
asyncOp.allowSceneActivation = false;
|
||||||
|
|
||||||
|
DOTween.Sequence()
|
||||||
|
.Append(transform.DOScale(Vector3.one * 1.5f, 0.3f).SetEase(Ease.OutQuint))
|
||||||
|
.Insert(0.15f, thisGroup.DOFade(0, 0.15f))
|
||||||
|
.Append(group.DOFade(0, 0.3f))
|
||||||
|
.AppendCallback(() => asyncOp.allowSceneActivation = true);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 52f2c203017f497995d6e2ee8e7e91ef
|
||||||
|
timeCreated: 1610358275
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using DG.Tweening;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class PlayerEnter : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
transform.DOMove(Vector3.zero, 0.5f).SetEase(Ease.OutQuint);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 35034e3b9a94742c6be0c008855b42e4
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -17,7 +17,7 @@ public class ScaleWithTime : MonoBehaviour
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
_text = GetComponent<TextMeshProUGUI>();
|
_text = GetComponentInChildren<TextMeshProUGUI>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
|
|
|
@ -3,15 +3,24 @@ using System;
|
||||||
public static class Score
|
public static class Score
|
||||||
{
|
{
|
||||||
private static ulong _value;
|
private static ulong _value;
|
||||||
public static ulong Value
|
public static ulong Value => _value;
|
||||||
|
|
||||||
|
public static void Add(ulong val)
|
||||||
{
|
{
|
||||||
get => _value;
|
_value += val;
|
||||||
set
|
ScoreChanged();
|
||||||
{
|
|
||||||
_value = value;
|
|
||||||
ScoreUpdated?.Invoke(_value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Reset()
|
||||||
|
{
|
||||||
|
_value = 0;
|
||||||
|
ScoreChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ScoreChanged()
|
||||||
|
{
|
||||||
|
ScoreUpdated?.Invoke(_value);
|
||||||
|
}
|
||||||
|
|
||||||
public static event Action<ulong> ScoreUpdated;
|
public static event Action<ulong> ScoreUpdated;
|
||||||
}
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class SelectAccessibilityButton : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private AccessibilityMode mode;
|
||||||
|
[SerializeField] private AccessibilityOptions options;
|
||||||
|
[SerializeField] private TunnelController tunnel;
|
||||||
|
|
||||||
|
public void Select()
|
||||||
|
{
|
||||||
|
|
||||||
|
options.Mode = mode;
|
||||||
|
tunnel.Reset();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 76696d93beae43d3ac9fd18d1350eb46
|
||||||
|
timeCreated: 1610358275
|
|
@ -23,10 +23,13 @@ public class TunnelController : MonoBehaviour
|
||||||
public Renderer Active { get; private set; }
|
public Renderer Active { get; private set; }
|
||||||
|
|
||||||
private float _start = -1;
|
private float _start = -1;
|
||||||
|
private static readonly int PlayerXMove = Shader.PropertyToID("_PlayerXMove");
|
||||||
|
private static readonly int PlayerXPos = Shader.PropertyToID("_PlayerXPos");
|
||||||
|
private static readonly int CameraShake = Shader.PropertyToID("_CameraShake");
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
Shader.SetGlobalFloat("_CameraShake", 0);
|
Shader.SetGlobalFloat(CameraShake, 0);
|
||||||
Shader.SetGlobalFloat("_BaseTubeRadius", _baseTubeRadius);
|
Shader.SetGlobalFloat("_BaseTubeRadius", _baseTubeRadius);
|
||||||
|
|
||||||
Debug.Log(_accessibility.Mode);
|
Debug.Log(_accessibility.Mode);
|
||||||
|
@ -58,13 +61,18 @@ public class TunnelController : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
Awake();
|
||||||
|
}
|
||||||
|
|
||||||
void LateUpdate()
|
void LateUpdate()
|
||||||
{
|
{
|
||||||
var cameraShakeIntensity = _intensity * _accessibility.Intensity.Value;
|
var cameraShakeIntensity = _intensity * _accessibility.Intensity.Value;
|
||||||
|
|
||||||
Shader.SetGlobalFloat("_PlayerXMove", _playerXMove);
|
Shader.SetGlobalFloat(PlayerXMove, _playerXMove);
|
||||||
Shader.SetGlobalFloat("_PlayerXPos", _playerXPos);
|
Shader.SetGlobalFloat(PlayerXPos, _playerXPos);
|
||||||
Shader.SetGlobalFloat("_CameraShake", _baseCameraShake * _distanceToNextBeat * cameraShakeIntensity);
|
Shader.SetGlobalFloat(CameraShake, _baseCameraShake * _distanceToNextBeat * cameraShakeIntensity);
|
||||||
|
|
||||||
var elapsed = Time.time - _start;
|
var elapsed = Time.time - _start;
|
||||||
if (elapsed > _duration) return;
|
if (elapsed > _duration) return;
|
||||||
|
@ -72,7 +80,7 @@ public class TunnelController : MonoBehaviour
|
||||||
var normalisedElapsed = elapsed / _duration;
|
var normalisedElapsed = elapsed / _duration;
|
||||||
|
|
||||||
var shake = Mathf.Max(_anim.Evaluate(normalisedElapsed), _baseCameraShake) * _intensity;
|
var shake = Mathf.Max(_anim.Evaluate(normalisedElapsed), _baseCameraShake) * _intensity;
|
||||||
Shader.SetGlobalFloat("_CameraShake", shake);
|
Shader.SetGlobalFloat(CameraShake, shake);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoseLifeShake()
|
public void LoseLifeShake()
|
||||||
|
|
|
@ -6,6 +6,9 @@ EditorBuildSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Scenes:
|
m_Scenes:
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/Chief's Sandbox.unity
|
path: Assets/Scenes/Menu.unity
|
||||||
|
guid: 5f5923e6ff0e344db822ce1549c8a550
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/Game.unity
|
||||||
guid: 3775e8f75767144a4a8c18fff047afea
|
guid: 3775e8f75767144a4a8c18fff047afea
|
||||||
m_configObjects: {}
|
m_configObjects: {}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
--- !u!5 &1
|
--- !u!5 &1
|
||||||
TimeManager:
|
TimeManager:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
Fixed Timestep: 0.02
|
Fixed Timestep: 0.02
|
||||||
Maximum Allowed Timestep: 0.1
|
Maximum Allowed Timestep: 0.1
|
||||||
m_TimeScale: 1
|
m_TimeScale: 1
|
||||||
Maximum Particle Timestep: 0.03
|
Maximum Particle Timestep: 0.03
|
||||||
|
|
Loading…
Reference in New Issue