mirror of
https://github.com/celisej567/forest.git
synced 2026-02-26 00:53:44 +03:00
1
This commit is contained in:
@@ -21021,10 +21021,11 @@ MonoBehaviour:
|
|||||||
fireplace: {fileID: 677355415}
|
fireplace: {fileID: 677355415}
|
||||||
LoseImage: {fileID: 2127466308}
|
LoseImage: {fileID: 2127466308}
|
||||||
LoseImageStartScale: {x: 0, y: 0}
|
LoseImageStartScale: {x: 0, y: 0}
|
||||||
LoseImageStartRotation: {x: 0, y: 0, z: -0.8191521, w: -0.57357633}
|
LoseImageStartRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
LoseStarted: 0
|
LoseStarted: 0
|
||||||
LoseImageStopScale: {x: 4.24, y: 1.83}
|
LoseImageStopScale: {x: 4.24, y: 1.83}
|
||||||
LoseImageStopRotation: {x: 0, y: 0, z: 0, w: 0}
|
LoseImageStopRotation: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
LoseAudio: {fileID: 8300000, guid: dc896058066dec849997ffb0e547cdf5, type: 3}
|
||||||
--- !u!4 &1169605884
|
--- !u!4 &1169605884
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -12,16 +12,14 @@ public class GameRules : MonoBehaviour
|
|||||||
|
|
||||||
public Fireplace fireplace;
|
public Fireplace fireplace;
|
||||||
|
|
||||||
[Space]
|
[Header("Lose things")]
|
||||||
public GameObject LoseImage;
|
public GameObject LoseImage;
|
||||||
public Vector2 LoseImageStartScale;
|
public Vector2 LoseImageStartScale;
|
||||||
public Quaternion LoseImageStartRotation;
|
public Quaternion LoseImageStartRotation;
|
||||||
|
|
||||||
public bool LoseStarted = false;
|
public bool LoseStarted = false;
|
||||||
|
|
||||||
|
|
||||||
public Vector2 LoseImageStopScale;
|
public Vector2 LoseImageStopScale;
|
||||||
public Quaternion LoseImageStopRotation;
|
public Quaternion LoseImageStopRotation;
|
||||||
|
public AudioClip LoseAudio;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@@ -46,14 +44,17 @@ public class GameRules : MonoBehaviour
|
|||||||
LoseStarted = true;
|
LoseStarted = true;
|
||||||
LoseImage.SetActive(true);
|
LoseImage.SetActive(true);
|
||||||
LoseImage.transform.localScale = LoseImageStartScale;
|
LoseImage.transform.localScale = LoseImageStartScale;
|
||||||
LoseImage.transform.localRotation = LoseImageStartRotation;
|
LoseImage.transform.rotation = LoseImageStartRotation;
|
||||||
|
AudioSource bb = gameObject.AddComponent<AudioSource>();
|
||||||
|
bb.clip = LoseAudio;
|
||||||
|
bb.Play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(LoseStarted)
|
if(LoseStarted)
|
||||||
{
|
{
|
||||||
LoseImage.transform.localScale = Vector2.Lerp(LoseImage.transform.localScale, LoseImageStopScale, Time.deltaTime);
|
LoseImage.transform.localScale = Vector2.Lerp(LoseImage.transform.localScale, LoseImageStopScale, Time.deltaTime);
|
||||||
LoseImage.transform.localRotation = Quaternion.Lerp(LoseImage.transform.localRotation, LoseImageStopRotation, Time.deltaTime);
|
LoseImage.transform.rotation = Quaternion.Lerp(LoseImage.transform.rotation, LoseImageStopRotation, Time.deltaTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ AudioImporter:
|
|||||||
quality: 1
|
quality: 1
|
||||||
conversionMode: 0
|
conversionMode: 0
|
||||||
platformSettingOverrides: {}
|
platformSettingOverrides: {}
|
||||||
forceToMono: 0
|
forceToMono: 1
|
||||||
normalize: 1
|
normalize: 1
|
||||||
preloadAudioData: 1
|
preloadAudioData: 1
|
||||||
loadInBackground: 0
|
loadInBackground: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user