textures and pause game
This commit is contained in:
1 parent
8a0162cf9d
commit
8472073b56
11 files changed
+43
-23
No files matched your search
Executable → Regular
File mode changed.
@@ -128,7 +128,7 @@ Material:
|
|||||||
m_Colors:
|
m_Colors:
|
||||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _EmissionColor: {r: 0, g: 2.2588236, b: 8, a: 1}
|
- _EmissionColor: {r: 0, g: 0.42297584, b: 1.4980394, a: 1}
|
||||||
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
--- !u!114 &398519245074296181
|
--- !u!114 &398519245074296181
|
||||||
|
|||||||
Executable → Regular
+1
-1
@@ -128,7 +128,7 @@ Material:
|
|||||||
m_Colors:
|
m_Colors:
|
||||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _EmissionColor: {r: 0, g: 4, b: 0.14117648, a: 1}
|
- _EmissionColor: {r: 0, g: 1.4980394, b: 0.05287198, a: 1}
|
||||||
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
--- !u!114 &398519245074296181
|
--- !u!114 &398519245074296181
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ Material:
|
|||||||
m_Colors:
|
m_Colors:
|
||||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _EmissionColor: {r: 8, g: 0, b: 0, a: 1}
|
- _EmissionColor: {r: 1.4980394, g: 0, b: 0, a: 1}
|
||||||
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
--- !u!114 &398519245074296181
|
--- !u!114 &398519245074296181
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ RenderSettings:
|
|||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 705507994}
|
m_Sun: {fileID: 705507994}
|
||||||
m_IndirectSpecularColor: {r: 0.14633277, g: 0.17844424, b: 0.14237845, a: 1}
|
m_IndirectSpecularColor: {r: 0.13586485, g: 0.16515756, b: 0.1291475, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
@@ -1382,6 +1382,10 @@ PrefabInstance:
|
|||||||
propertyPath: timingUi
|
propertyPath: timingUi
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 766862836}
|
objectReference: {fileID: 766862836}
|
||||||
|
- target: {fileID: 5313449993149091347, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
|
||||||
|
propertyPath: shipAudio
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 235775467}
|
||||||
- target: {fileID: 5313449993149091347, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
|
- target: {fileID: 5313449993149091347, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
|
||||||
propertyPath: timingDoc
|
propertyPath: timingDoc
|
||||||
value:
|
value:
|
||||||
|
|||||||
Executable → Regular
+8
-8
@@ -30,11 +30,11 @@ Material:
|
|||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TexEnvs:
|
m_TexEnvs:
|
||||||
- _BaseMap:
|
- _BaseMap:
|
||||||
m_Texture: {fileID: 2800000, guid: 57878ff7becbdfeb49e897c235fcd13a, type: 3}
|
m_Texture: {fileID: 2800000, guid: 17801f6600aff15a9a030fe1477f76a6, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _BumpMap:
|
- _BumpMap:
|
||||||
m_Texture: {fileID: 2800000, guid: 687d8e41dbf54edb68a65b1f399660c6, type: 3}
|
m_Texture: {fileID: 2800000, guid: 89bb05f0f47cc490798f25ad3e26f563, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _DetailAlbedoMap:
|
- _DetailAlbedoMap:
|
||||||
@@ -42,7 +42,7 @@ Material:
|
|||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _DetailMask:
|
- _DetailMask:
|
||||||
m_Texture: {fileID: 2800000, guid: 277d00e38be7681a491dd3bf1557824a, type: 3}
|
m_Texture: {fileID: 2800000, guid: bc3995cb0bd4043df818b9e9540ae135, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _DetailNormalMap:
|
- _DetailNormalMap:
|
||||||
@@ -50,23 +50,23 @@ Material:
|
|||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _EmissionMap:
|
- _EmissionMap:
|
||||||
m_Texture: {fileID: 2800000, guid: 5903a9f196dc3dc4983ea3caa46c011e, type: 3}
|
m_Texture: {fileID: 2800000, guid: 9c8cb3484bdeeaed0bdf2414b7e7bc41, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _MainTex:
|
- _MainTex:
|
||||||
m_Texture: {fileID: 2800000, guid: 57878ff7becbdfeb49e897c235fcd13a, type: 3}
|
m_Texture: {fileID: 2800000, guid: 17801f6600aff15a9a030fe1477f76a6, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _MetallicGlossMap:
|
- _MetallicGlossMap:
|
||||||
m_Texture: {fileID: 2800000, guid: 38b1ebcc987699268bff0eb4013b6b82, type: 3}
|
m_Texture: {fileID: 2800000, guid: 33165c4da57b0a30283e5dc7e509360f, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _OcclusionMap:
|
- _OcclusionMap:
|
||||||
m_Texture: {fileID: 2800000, guid: a426ec70e6f7f3a339bae47e767905b0, type: 3}
|
m_Texture: {fileID: 2800000, guid: cc2a9cfbc7336b2708a860f84e70cd49, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _ParallaxMap:
|
- _ParallaxMap:
|
||||||
m_Texture: {fileID: 2800000, guid: 56c50cf21746aadf6a4f5f684a050b1e, type: 3}
|
m_Texture: {fileID: 2800000, guid: ba18cee4f860687e2bec971b0864e0ef, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
- _SpecGlossMap:
|
- _SpecGlossMap:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public class ShipControls : MonoBehaviour {
|
|||||||
public Camera aim;
|
public Camera aim;
|
||||||
public Timing timing;
|
public Timing timing;
|
||||||
|
|
||||||
ShipAudio audio;
|
ShipAudio shipAudio;
|
||||||
SpaceRaceInput input;
|
SpaceRaceInput input;
|
||||||
|
|
||||||
Rigidbody rigidBody;
|
Rigidbody rigidBody;
|
||||||
@@ -64,7 +64,7 @@ public class ShipControls : MonoBehaviour {
|
|||||||
void Start() {
|
void Start() {
|
||||||
Cursor.lockState = CursorLockMode.Locked;
|
Cursor.lockState = CursorLockMode.Locked;
|
||||||
rigidBody = GetComponent<Rigidbody>();
|
rigidBody = GetComponent<Rigidbody>();
|
||||||
audio = GetComponentInChildren<ShipAudio>();
|
shipAudio = GetComponentInChildren<ShipAudio>();
|
||||||
|
|
||||||
// just stop the body from being affected by rotation for now
|
// just stop the body from being affected by rotation for now
|
||||||
// until the 3p camera is in to explain why
|
// until the 3p camera is in to explain why
|
||||||
@@ -174,7 +174,7 @@ public class ShipControls : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Respawn() {
|
public void Respawn() {
|
||||||
audio.PlayNoise();
|
shipAudio.PlayNoise();
|
||||||
// IMPORTANT
|
// IMPORTANT
|
||||||
// stop the timer before we move the ship or anything
|
// stop the timer before we move the ship or anything
|
||||||
// otherwise it might generate a checkpoint time
|
// otherwise it might generate a checkpoint time
|
||||||
@@ -203,7 +203,7 @@ public class ShipControls : MonoBehaviour {
|
|||||||
public void Damage(float amt, string src) {
|
public void Damage(float amt, string src) {
|
||||||
Debug.Log($"Damage {amt} from {src}");
|
Debug.Log($"Damage {amt} from {src}");
|
||||||
|
|
||||||
audio.PlayNoise();
|
shipAudio.PlayNoise();
|
||||||
|
|
||||||
// convert dmg to % to hide internals
|
// convert dmg to % to hide internals
|
||||||
float dmg = (amt / powerUnit.ShieldMax) * 100f;
|
float dmg = (amt / powerUnit.ShieldMax) * 100f;
|
||||||
@@ -223,7 +223,7 @@ public class ShipControls : MonoBehaviour {
|
|||||||
|
|
||||||
void Deploy(Output output) {
|
void Deploy(Output output) {
|
||||||
bool deployed = powerUnit.Deploy(output);
|
bool deployed = powerUnit.Deploy(output);
|
||||||
if (deployed) audio.PlayNoise();
|
if (deployed) shipAudio.PlayNoise();
|
||||||
}
|
}
|
||||||
|
|
||||||
// I prefer doing it this way than registering the callbacks etc
|
// I prefer doing it this way than registering the callbacks etc
|
||||||
@@ -278,7 +278,7 @@ public class ShipControls : MonoBehaviour {
|
|||||||
void OnPowerUnit4(InputAction.CallbackContext ctx) => Deploy(Output.Shield);
|
void OnPowerUnit4(InputAction.CallbackContext ctx) => Deploy(Output.Shield);
|
||||||
|
|
||||||
void OnBoostCharge() {
|
void OnBoostCharge() {
|
||||||
// audio.PlayNoise();
|
// shipAudio.PlayNoise();
|
||||||
// do some ui fx whatever
|
// do some ui fx whatever
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class Timing: MonoBehaviour {
|
|||||||
public bool timerEnabled;
|
public bool timerEnabled;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
ShipAudio audio;
|
ShipAudio shipAudio;
|
||||||
|
|
||||||
public string mapName;
|
public string mapName;
|
||||||
public double sectorTime;
|
public double sectorTime;
|
||||||
@@ -111,7 +111,7 @@ public class Timing: MonoBehaviour {
|
|||||||
Debug.Log($"{sectorTimes.Count} / {sectors.Length}");
|
Debug.Log($"{sectorTimes.Count} / {sectors.Length}");
|
||||||
|
|
||||||
// play a sound :)
|
// play a sound :)
|
||||||
if (audio != null) audio.PlayNoise();
|
if (shipAudio != null) shipAudio.PlayNoise();
|
||||||
|
|
||||||
// restart the timer for the next sector
|
// restart the timer for the next sector
|
||||||
sectorStart = Time.timeAsDouble;
|
sectorStart = Time.timeAsDouble;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class MenuControls : MonoBehaviour {
|
|||||||
ControlsUI controlsUI;
|
ControlsUI controlsUI;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
ShipAudio audio;
|
ShipAudio shipAudio;
|
||||||
|
|
||||||
SpaceRaceInput input;
|
SpaceRaceInput input;
|
||||||
|
|
||||||
@@ -68,14 +68,26 @@ public class MenuControls : MonoBehaviour {
|
|||||||
input.menu.Enable();
|
input.menu.Enable();
|
||||||
input.menu.ToggleMenu.started += OnToggleMenu;
|
input.menu.ToggleMenu.started += OnToggleMenu;
|
||||||
input.menu.CloseMenu.started += OnCloseMenu;
|
input.menu.CloseMenu.started += OnCloseMenu;
|
||||||
|
|
||||||
|
InputSystem.onDeviceChange += OnDeviceChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnDeviceChange(InputDevice device, InputDeviceChange change) {
|
||||||
|
if (change != InputDeviceChange.Removed) return;
|
||||||
|
Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnDestroy() {
|
void OnDestroy() {
|
||||||
input.menu.ToggleMenu.started -= OnToggleMenu;
|
input.menu.ToggleMenu.started -= OnToggleMenu;
|
||||||
input.menu.CloseMenu.started -= OnCloseMenu;
|
input.menu.CloseMenu.started -= OnCloseMenu;
|
||||||
|
|
||||||
|
InputSystem.onDeviceChange -= OnDeviceChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Show() {
|
void Show() {
|
||||||
|
// pause the game
|
||||||
|
Time.timeScale = 0f;
|
||||||
|
|
||||||
visible = true;
|
visible = true;
|
||||||
UnityEngine.Cursor.lockState = CursorLockMode.None;
|
UnityEngine.Cursor.lockState = CursorLockMode.None;
|
||||||
menuDoc.enabled = true;
|
menuDoc.enabled = true;
|
||||||
@@ -96,6 +108,9 @@ public class MenuControls : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Hide() {
|
void Hide() {
|
||||||
|
// pause the game
|
||||||
|
Time.timeScale = 1f;
|
||||||
|
|
||||||
visible = false;
|
visible = false;
|
||||||
UnityEngine.Cursor.lockState = CursorLockMode.Locked;
|
UnityEngine.Cursor.lockState = CursorLockMode.Locked;
|
||||||
menuDoc.enabled = false;
|
menuDoc.enabled = false;
|
||||||
@@ -111,7 +126,7 @@ public class MenuControls : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OnToggleMenu(InputAction.CallbackContext _ctx) {
|
void OnToggleMenu(InputAction.CallbackContext _ctx) {
|
||||||
audio.PlayNoise();
|
shipAudio.PlayNoise();
|
||||||
visible = !visible;
|
visible = !visible;
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public class TimingUI : MonoBehaviour {
|
|||||||
Label noticePosition;
|
Label noticePosition;
|
||||||
|
|
||||||
bool ShouldHide => timing?.sectors.Count() == 0;
|
bool ShouldHide => timing?.sectors.Count() == 0;
|
||||||
|
public bool TimerEnabled => timing.timerEnabled;
|
||||||
|
|
||||||
static string[] completionMsgs = {
|
static string[] completionMsgs = {
|
||||||
"(⌐▨_▨)",
|
"(⌐▨_▨)",
|
||||||
|
|||||||
Executable → Regular
+1
-1
@@ -5,5 +5,5 @@ TimeManager:
|
|||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
Fixed Timestep: 0.01
|
Fixed Timestep: 0.01
|
||||||
Maximum Allowed Timestep: 0.33333334
|
Maximum Allowed Timestep: 0.33333334
|
||||||
m_TimeScale: 1
|
m_TimeScale: 0
|
||||||
Maximum Particle Timestep: 0.03
|
Maximum Particle Timestep: 0.03
|
||||||
Reference in new issue
Block a user