Small fixes
This commit is contained in:
@@ -165,6 +165,7 @@ MonoBehaviour:
|
||||
m_ScoreText: {fileID: 1501855168}
|
||||
m_DefaultMaterial: {fileID: 2100000, guid: 2b4111cfdf7255c48b4c3dbcf9e202a6, type: 2}
|
||||
m_FreeHitMaterial: {fileID: 2100000, guid: 22eb1f2017d2a15459d4c10b27104270, type: 2}
|
||||
m_PostProcessVolume: {fileID: 519420033}
|
||||
--- !u!4 &104400498
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -32,16 +32,16 @@ MonoBehaviour:
|
||||
value: 1
|
||||
intensity:
|
||||
overrideState: 1
|
||||
value: 15
|
||||
value: 10
|
||||
threshold:
|
||||
overrideState: 1
|
||||
value: 0.4
|
||||
value: 0
|
||||
softKnee:
|
||||
overrideState: 1
|
||||
value: 0.5
|
||||
clamp:
|
||||
overrideState: 1
|
||||
value: 1
|
||||
value: 35
|
||||
diffusion:
|
||||
overrideState: 1
|
||||
value: 3
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.Rendering.PostProcessing;
|
||||
|
||||
public class PlayerController : OrbitalPositionBehaviour
|
||||
{
|
||||
@@ -19,14 +20,19 @@ public class PlayerController : OrbitalPositionBehaviour
|
||||
private bool m_HasFreeHitActive;
|
||||
private bool m_HasInvicibility;
|
||||
|
||||
private Bloom m_BloomController;
|
||||
|
||||
[Header("References")]
|
||||
[SerializeField] private MeshRenderer m_Renderer;
|
||||
[SerializeField] private Text m_ScoreText;
|
||||
[SerializeField] private Material m_DefaultMaterial;
|
||||
[SerializeField] private Material m_FreeHitMaterial;
|
||||
[SerializeField] private PostProcessVolume m_PostProcessVolume;
|
||||
|
||||
protected override void OnStart()
|
||||
{
|
||||
m_BloomController = m_PostProcessVolume.profile.GetSetting<Bloom>();
|
||||
|
||||
s_Instance = this;
|
||||
s_HighScore = Mathf.Max(s_HighScore, PlayerPrefs.GetInt("HighScore", 0));
|
||||
Debug.Log($"Loaded high score of [{s_HighScore}]");
|
||||
@@ -39,6 +45,11 @@ public class PlayerController : OrbitalPositionBehaviour
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (!m_KillingItself)
|
||||
{
|
||||
m_BloomController.diffusion.value = 3f;
|
||||
}
|
||||
|
||||
m_ScoreText.text = s_PlayerScore.ToString();
|
||||
if (s_PlayerScore > s_HighScore)
|
||||
m_ScoreText.color = Color.yellow;
|
||||
@@ -84,11 +95,6 @@ public class PlayerController : OrbitalPositionBehaviour
|
||||
m_OrbitalPosition.m_ObjectRadius /= 0.6f;
|
||||
}
|
||||
|
||||
private IEnumerator OnSpeedUpModifier()
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
|
||||
private IEnumerator TriggerInvicibility()
|
||||
{
|
||||
m_HasFreeHitActive = false;
|
||||
@@ -121,11 +127,12 @@ public class PlayerController : OrbitalPositionBehaviour
|
||||
m_SuicidePoint = transform.position;
|
||||
m_KillingItself = true;
|
||||
m_DeathLerp = 0f;
|
||||
|
||||
//m_BloomController.diffusion.value = 10f;
|
||||
}
|
||||
|
||||
else if (other.CompareTag("PlayerMod"))
|
||||
{
|
||||
Debug.Log($"Collision with player mod [{((PlayerModifier)other).HeldModifier}]");
|
||||
switch (((PlayerModifier)other).HeldModifier)
|
||||
{
|
||||
case PlayerModifier.Modifier.GainPoints:
|
||||
@@ -156,8 +163,6 @@ public class PlayerController : OrbitalPositionBehaviour
|
||||
Debug.Log($"Collision with unknown modifier occured [{((PlayerModifier)other).HeldModifier}]");
|
||||
break;
|
||||
}
|
||||
|
||||
Debug.Log("Collided with player mod");
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
@@ -18,8 +18,6 @@ public class PlayerModifier : OrbitalPositionBehaviour
|
||||
|
||||
private static Modifier GetRandomModifier()
|
||||
{
|
||||
return Modifier.SpeedUp;
|
||||
|
||||
Array possibilities = Enum.GetValues(typeof(Modifier));
|
||||
return (Modifier)possibilities.GetValue(s_RandomGenerator.Next(possibilities.Length));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user