Hook up the score display
This commit is contained in:
@@ -261,6 +261,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: b37e3dc225aa25143af8ab61f827ae8b, type: 3}
|
m_Script: {fileID: 11500000, guid: b37e3dc225aa25143af8ab61f827ae8b, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: '::'
|
m_EditorClassIdentifier: '::'
|
||||||
|
finalScoreText: {fileID: 1520153022985003366}
|
||||||
--- !u!1 &2350186695477379260
|
--- !u!1 &2350186695477379260
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -455,7 +456,7 @@ GameObject:
|
|||||||
- component: {fileID: 2205574065701906917}
|
- component: {fileID: 2205574065701906917}
|
||||||
- component: {fileID: 4125557264992545207}
|
- component: {fileID: 4125557264992545207}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Score
|
m_Name: ScoreLabel
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -816,7 +817,7 @@ GameObject:
|
|||||||
- component: {fileID: 8369606923535336432}
|
- component: {fileID: 8369606923535336432}
|
||||||
- component: {fileID: 1520153022985003366}
|
- component: {fileID: 1520153022985003366}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Score (1)
|
m_Name: ScoreDisplay
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
|
|||||||
@@ -342,13 +342,13 @@ LineRenderer:
|
|||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
m_Positions:
|
m_Positions:
|
||||||
- {x: -0.15602553, y: 4.0749445, z: 0}
|
- {x: -0.15602553, y: 4.074945, z: 0}
|
||||||
- {x: -0.1566351, y: 3.9736378, z: 0}
|
- {x: -0.1566351, y: 3.9736383, z: 0}
|
||||||
- {x: -0.1572447, y: 3.8729858, z: 0}
|
- {x: -0.1572447, y: 3.8729858, z: 0}
|
||||||
- {x: -0.15785426, y: 3.7729874, z: 0}
|
- {x: -0.15785426, y: 3.7729874, z: 0}
|
||||||
- {x: -0.15846384, y: 3.6736438, z: 0}
|
- {x: -0.15846384, y: 3.6736436, z: 0}
|
||||||
- {x: -0.15907341, y: 3.5749543, z: 0}
|
- {x: -0.15907341, y: 3.5749543, z: 0}
|
||||||
- {x: -0.15968299, y: 3.4769194, z: 0}
|
- {x: -0.15968299, y: 3.4769192, z: 0}
|
||||||
- {x: -0.16029257, y: 3.3795385, z: 0}
|
- {x: -0.16029257, y: 3.3795385, z: 0}
|
||||||
- {x: -0.16090216, y: 3.2828126, z: 0}
|
- {x: -0.16090216, y: 3.2828126, z: 0}
|
||||||
- {x: -0.16151173, y: 3.1867406, z: 0}
|
- {x: -0.16151173, y: 3.1867406, z: 0}
|
||||||
@@ -915,7 +915,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 747976396}
|
m_GameObject: {fileID: 747976396}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
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: 3.1975174, z: 0}
|
m_LocalPosition: {x: 0, y: 3.197517, z: 0}
|
||||||
m_LocalScale: {x: 0.57574, y: 0.57574, z: 0.57574}
|
m_LocalScale: {x: 0.57574, y: 0.57574, z: 0.57574}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
@@ -1369,13 +1369,13 @@ LineRenderer:
|
|||||||
m_Positions:
|
m_Positions:
|
||||||
- {x: -0.15602553, y: 4.074945, z: 0}
|
- {x: -0.15602553, y: 4.074945, z: 0}
|
||||||
- {x: -0.11662118, y: 3.8796225, z: 0}
|
- {x: -0.11662118, y: 3.8796225, z: 0}
|
||||||
- {x: -0.07721684, y: 3.7057445, z: 0}
|
- {x: -0.07721684, y: 3.7057447, z: 0}
|
||||||
- {x: -0.03781248, y: 3.5533106, z: 0}
|
- {x: -0.03781248, y: 3.5533109, z: 0}
|
||||||
- {x: 0.0015918687, y: 3.4223216, z: 0}
|
- {x: 0.0015918687, y: 3.4223216, z: 0}
|
||||||
- {x: 0.040996216, y: 3.3127766, z: 0}
|
- {x: 0.040996216, y: 3.3127766, z: 0}
|
||||||
- {x: 0.08040057, y: 3.2246757, z: 0}
|
- {x: 0.08040057, y: 3.224676, z: 0}
|
||||||
- {x: 0.11980491, y: 3.1580195, z: 0}
|
- {x: 0.11980491, y: 3.1580195, z: 0}
|
||||||
- {x: 0.15920927, y: 3.1128078, z: 0}
|
- {x: 0.15920927, y: 3.112808, z: 0}
|
||||||
- {x: 0.1986136, y: 3.0890403, z: 0}
|
- {x: 0.1986136, y: 3.0890403, z: 0}
|
||||||
- {x: 0.23801796, y: 3.0867171, z: 0}
|
- {x: 0.23801796, y: 3.0867171, z: 0}
|
||||||
m_Parameters:
|
m_Parameters:
|
||||||
@@ -1912,13 +1912,13 @@ LineRenderer:
|
|||||||
m_Positions:
|
m_Positions:
|
||||||
- {x: -0.15602553, y: 4.074945, z: 0}
|
- {x: -0.15602553, y: 4.074945, z: 0}
|
||||||
- {x: -0.18956745, y: 3.8764977, z: 0}
|
- {x: -0.18956745, y: 3.8764977, z: 0}
|
||||||
- {x: -0.22310936, y: 3.7000232, z: 0}
|
- {x: -0.22310936, y: 3.7000234, z: 0}
|
||||||
- {x: -0.25665125, y: 3.5455205, z: 0}
|
- {x: -0.25665125, y: 3.5455205, z: 0}
|
||||||
- {x: -0.29019317, y: 3.4129908, z: 0}
|
- {x: -0.29019317, y: 3.412991, z: 0}
|
||||||
- {x: -0.32373506, y: 3.3024333, z: 0}
|
- {x: -0.32373506, y: 3.3024333, z: 0}
|
||||||
- {x: -0.35727698, y: 3.213848, z: 0}
|
- {x: -0.35727698, y: 3.2138486, z: 0}
|
||||||
- {x: -0.39081886, y: 3.1472356, z: 0}
|
- {x: -0.39081886, y: 3.1472359, z: 0}
|
||||||
- {x: -0.4243608, y: 3.1025953, z: 0}
|
- {x: -0.4243608, y: 3.1025958, z: 0}
|
||||||
- {x: -0.45790267, y: 3.0799277, z: 0}
|
- {x: -0.45790267, y: 3.0799277, z: 0}
|
||||||
- {x: -0.4914446, y: 3.0792325, z: 0}
|
- {x: -0.4914446, y: 3.0792325, z: 0}
|
||||||
m_Parameters:
|
m_Parameters:
|
||||||
|
|||||||
@@ -1,16 +1,29 @@
|
|||||||
using System;
|
using System;
|
||||||
using Core;
|
using Core;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using TMPro;
|
||||||
|
using Minigames.DivingForPictures;
|
||||||
|
|
||||||
public class DivingGameOverScreen : MonoBehaviour
|
public class DivingGameOverScreen : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[SerializeField]
|
||||||
|
private TextMeshProUGUI finalScoreText;
|
||||||
|
|
||||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnEnable()
|
||||||
|
{
|
||||||
|
if (DivingGameManager.Instance != null)
|
||||||
|
{
|
||||||
|
int finalScore = DivingGameManager.Instance.PlayerScore;
|
||||||
|
finalScoreText.text = $"{finalScore}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async void PlayAgain()
|
public async void PlayAgain()
|
||||||
{
|
{
|
||||||
var progress = new Progress<float>(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
|
var progress = new Progress<float>(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ MonoBehaviour:
|
|||||||
basePoints: 100
|
basePoints: 100
|
||||||
depthMultiplier: 10
|
depthMultiplier: 10
|
||||||
speedTransitionDuration: 2
|
speedTransitionDuration: 2
|
||||||
surfacingSpeedFactor: 3
|
surfacingSpeedFactor: 6
|
||||||
surfacingSpawnDelay: 5
|
surfacingSpawnDelay: 5
|
||||||
referenceScreenHeight: 1920
|
referenceScreenHeight: 1920
|
||||||
initialTileCount: 3
|
initialTileCount: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user