Fixed pause/unpause bugs

main
Ivy 4 years ago
parent eeb2d82fc0
commit f248810bf5

@ -2899,27 +2899,31 @@ PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 834121674}
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 374150667840124763, guid: e9268c7f81b604f459302eb8b45a432e, type: 3}
propertyPath: m_Name
value: Player
objectReference: {fileID: 0}
- target: {fileID: 374150667840124763, guid: e9268c7f81b604f459302eb8b45a432e, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 374150667840124767, guid: e9268c7f81b604f459302eb8b45a432e, type: 3}
propertyPath: m_RootOrder
value: 1
value: 3
objectReference: {fileID: 0}
- target: {fileID: 374150667840124767, guid: e9268c7f81b604f459302eb8b45a432e, type: 3}
propertyPath: m_LocalPosition.x
value: -21.536783
value: -0.228
objectReference: {fileID: 0}
- target: {fileID: 374150667840124767, guid: e9268c7f81b604f459302eb8b45a432e, type: 3}
propertyPath: m_LocalPosition.y
value: 5.4181004
value: -0.07360935
objectReference: {fileID: 0}
- target: {fileID: 374150667840124767, guid: e9268c7f81b604f459302eb8b45a432e, type: 3}
propertyPath: m_LocalPosition.z
value: 440.98434
value: 0
objectReference: {fileID: 0}
- target: {fileID: 374150667840124767, guid: e9268c7f81b604f459302eb8b45a432e, type: 3}
propertyPath: m_LocalRotation.w
@ -3009,7 +3013,7 @@ TilemapCollider2D:
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
@ -3310,8 +3314,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 40bd09e5b49bf4584bee75d619e80b0b, type: 3}
m_Name:
m_EditorClassIdentifier:
LevelName:
whereTo: {x: 0, y: 0, z: 0}
LevelName: Museum
whereTo: {x: 120.11, y: -4.03, z: 0}
--- !u!19719996 &612235269
TilemapCollider2D:
m_ObjectHideFlags: 0
@ -3322,7 +3326,7 @@ TilemapCollider2D:
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
@ -3384,17 +3388,61 @@ Tilemap:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 612235266}
m_Enabled: 1
m_Tiles: {}
m_Tiles:
- first: {x: -2, y: -1, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
- first: {x: -2, y: 0, z: 0}
second:
serializedVersion: 2
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_TileObjectToInstantiateIndex: 65535
dummyAlignment: 0
m_AllTileFlags: 1073741825
m_AnimatedTiles: {}
m_TileAssetArray: []
m_TileSpriteArray: []
m_TileMatrixArray: []
m_TileColorArray: []
m_TileAssetArray:
- m_RefCount: 2
m_Data: {fileID: 11400000, guid: a1394616918504c598b3b0e6205c158a, type: 2}
m_TileSpriteArray:
- m_RefCount: 2
m_Data: {fileID: -6913125122176552986, guid: 33f7d659c72ba459ba2a9485c9501630, type: 3}
m_TileMatrixArray:
- m_RefCount: 2
m_Data:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_TileColorArray:
- m_RefCount: 2
m_Data: {r: 1, g: 1, b: 1, a: 1}
m_TileObjectToInstantiateArray: []
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: 0, y: 0, z: 0}
m_Size: {x: 0, y: 0, z: 1}
m_Origin: {x: -2, y: -1, z: 0}
m_Size: {x: 2, y: 2, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0
m_TileOrientationMatrix:
@ -3480,7 +3528,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &834121674
Transform:
m_ObjectHideFlags: 0
@ -3493,7 +3541,6 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1533569615}
- {fileID: 1908186957}
- {fileID: 1322242892}
m_Father: {fileID: 0}
m_RootOrder: 2
@ -3574,7 +3621,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 834121674}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1411747978
PrefabInstance:
@ -4377,11 +4424,6 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 374150667840124763, guid: e9268c7f81b604f459302eb8b45a432e, type: 3}
m_PrefabInstance: {fileID: 78483448}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1908186957 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 374150667840124767, guid: e9268c7f81b604f459302eb8b45a432e, type: 3}
m_PrefabInstance: {fileID: 78483448}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1935037035
GameObject:
m_ObjectHideFlags: 0

@ -3978,7 +3978,7 @@ MonoBehaviour:
baseDialog: {fileID: 3367381689256731763, guid: 70cd530c6dffee4498f4893d4eb450c8, type: 3}
scrollStuff: {fileID: 909612975}
scrollSpace: {fileID: 392211211}
hideGalleryButton: {fileID: 176759822}
closeButton: {fileID: 176759822}
powerupSprites:
- {fileID: 21300000, guid: b5b2b00149700420cb91ce2e6cd30049, type: 3}
- {fileID: 21300000, guid: fedbd5825a33346fa96498465bb740e7, type: 3}
@ -4001,7 +4001,7 @@ MonoBehaviour:
shrinkPowerupButton: {fileID: 974869911}
otherPowerupButton: {fileID: 847247611}
powerupText: {fileID: 829770868}
sceneToLoad: NewDogSpawn
sceneToLoad: Museum
positionToLoad: {x: 15.422754, y: -3.08, z: 0}
music:
- {fileID: 8300000, guid: f29919963390ff24fa1ae468277b309e, type: 3}

File diff suppressed because it is too large Load Diff

@ -35,7 +35,7 @@ public class GameManager : MonoBehaviour
public GameObject baseDialog;
public GameObject scrollStuff;
public GameObject scrollSpace;
public GameObject hideGalleryButton;
public GameObject closeButton;
private GameObject[] galleryArt;
private GameObject[] galleryDialog;
@ -194,17 +194,20 @@ public class GameManager : MonoBehaviour
disableAllPowerups();
artActivated = new bool[artActivated.Length]; //Resets to [false,...]
player.SetActive(true);
player.SetActive(true);
Time.timeScale = 1; // Fixes infinite loading bug
LoadLevel(sceneToLoad, positionToLoad);
title.GetComponent<TextMeshProUGUI>().text = "Paused";
startButton.transform.Find("Text").GetComponent<TextMeshProUGUI>().text = "Restart";
startButton.transform.Find("Text").GetComponent<TextMeshProUGUI>().text = "Restart";
closeButton.SetActive(false);//Remove gallery button
}
public void GalleryButton()
{
scrollSpace.SetActive(true);
hideGalleryButton.SetActive(true);
closeButton.SetActive(true);
float scrollStuffSize = 0;
@ -263,7 +266,7 @@ public class GameManager : MonoBehaviour
scrollSpace.SetActive(false);
if (!paused)
{
hideGalleryButton.SetActive(false);
closeButton.SetActive(false);
}
} else if (powerIndex != Powerup.Other) {
dialogBox.SetActive(true);
@ -271,14 +274,14 @@ public class GameManager : MonoBehaviour
artImage.SetActive(true);
artImage.GetComponent<Image>().sprite = powerupSprites[(int) powerIndex];
artImage.GetComponent<RectTransform>().sizeDelta = new Vector2(300,300);
hideGalleryButton.SetActive(true);
closeButton.SetActive(true);
powerIndex = Powerup.Other;
}
else
{
paused = false;
pauseButton.SetActive(true);
hideGalleryButton.SetActive(false);
closeButton.SetActive(false);
startButton.SetActive(false);
galleryButton.SetActive(false);
title.SetActive(false);
@ -293,7 +296,7 @@ public class GameManager : MonoBehaviour
public void ArtReceived(int artIndex, Powerup powerupIndex)
{
hideGalleryButton.SetActive(true);
closeButton.SetActive(true);
StartDialog(artIndex);
artActivated[artIndex] = true;
powerIndex = powerupIndex;
@ -310,7 +313,7 @@ public class GameManager : MonoBehaviour
{
paused = true;
pauseButton.SetActive(false);
hideGalleryButton.SetActive(true);
closeButton.SetActive(true);
startButton.SetActive(true);
galleryButton.SetActive(true);
title.SetActive(true);

@ -21,6 +21,9 @@ EditorUserSettings:
value: 22424703114646680e0b0227036c7b1f113b1d3c2924691e283e393ce5d32439f5e978fce9332b25
flags: 0
RecentlyUsedScenePath-5:
value: 22424703114646680e0b0227036c720505120d2763053323283c107df7ee3d2cfb
flags: 0
RecentlyUsedScenePath-6:
value: 22424703114646680e0b0227036c72111f19352f223d68252320092a
flags: 0
vcSharedLogLevel:

Loading…
Cancel
Save