menu
This commit is contained in:
parent
e2371b336c
commit
672b5c36fd
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}
|
||||||
|
|
|
@ -95,6 +95,7 @@ Material:
|
||||||
m_Floats:
|
m_Floats:
|
||||||
- _Alpha: 1
|
- _Alpha: 1
|
||||||
- _AlphaClip: 0
|
- _AlphaClip: 0
|
||||||
|
- _BaseScale: 0.5
|
||||||
- _Blend: 0
|
- _Blend: 0
|
||||||
- _BumpScale: 1
|
- _BumpScale: 1
|
||||||
- _C: 0
|
- _C: 0
|
||||||
|
|
|
@ -111,7 +111,7 @@ MonoBehaviour:
|
||||||
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 &2122656558574222561
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -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,14 +3,23 @@ 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) * cameraShakeIntensity;
|
var shake = Mathf.Max(_anim.Evaluate(normalisedElapsed), _baseCameraShake) * cameraShakeIntensity;
|
||||||
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: {}
|
||||||
|
|
Loading…
Reference in New Issue