Commit ba4aa6f5 authored by Jan Meissner's avatar Jan Meissner

Reduced player hitbox, improved LevelSelect scripts, added preview for Level 13-14

parent 5db7d444
fileFormatVersion: 2
guid: 7e6ab90328c64eb42912d0b1f951661b
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1b8fdd0702d61f64e9387ab1e910d911
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
......@@ -178,7 +178,7 @@ BoxCollider2D:
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.95, y: 0.95}
m_Size: {x: 0.85, y: 0.95}
m_EdgeRadius: 0
--- !u!95 &95392249558912674
Animator:
......
......@@ -4,23 +4,20 @@ using UnityEngine;
using UnityEngine.UI;
public class LevelSelectController : MonoBehaviour {
//[SerializeField] private GameObject levelButtonPrefab;
[SerializeField] private GameObject pagePrefab;
[SerializeField] private int nonPageObjects = 3;
private int highestLevel;
private int lastLevel;
private void Start() {
InitalizeLevelSelect();
}
/// <summary>
/// Locks all currently not unlocked levels
/// Initializes LevelSelect
/// </summary>
public void InitalizeLevelSelect()
{
highestLevel = GameManager.Instance.HighestLevel;
lastLevel = GameManager.Instance.LastLevel;
int highestLevel = GameManager.Instance.HighestLevel;
int lastLevel = GameManager.Instance.LastLevel;
int pagesNeeded = lastLevel / 6 + 1;
int buttonsOnLastPage = lastLevel % 6;
GameObject currentPage;
......@@ -36,8 +33,6 @@ public class LevelSelectController : MonoBehaviour {
String buttonName = "ButtonLevel" + j;
int levelNr = j + (currentPage.GetComponent<LevelSelectPageController>().PageNr-1) * 6;
if (GameObject.Find(buttonName) != null)
{
GameObject button = currentPage.transform.Find(buttonName).gameObject;
Image image = button.transform.Find("Image").GetComponent<Image>();
// Level unlocked
......@@ -55,7 +50,6 @@ public class LevelSelectController : MonoBehaviour {
button.GetComponent<Button>().interactable = false;
}
}
}
// Deactivate not needed NextPage- & PreviousPage-Buttons
if (i == 1)
......@@ -66,7 +60,7 @@ public class LevelSelectController : MonoBehaviour {
{
currentPage.transform.Find("ButtonNextPage").gameObject.SetActive(false);
// Deactivate not needed buttons
// Deactivate not needed level buttons
if (buttonsOnLastPage != 0)
{
for (int j = 6; j > buttonsOnLastPage; j--)
......@@ -86,25 +80,15 @@ public class LevelSelectController : MonoBehaviour {
private void DisablePagesAfterFirst() {
bool firstPage = true;
foreach (GameObject page in GameObject.FindGameObjectsWithTag("LevelSelectPage")) {
if (firstPage) {
if (firstPage)
{
firstPage = false;
} else {
page.SetActive(false);
}
else
{
page.SetActive(false);
}
}
/// <summary>
/// Ensures all pages are active before loading "locked" images
/// </summary>
private void ActivateAllPages() {
foreach (GameObject page in GameObject.FindGameObjectsWithTag("LevelSelectPage")) {
page.SetActive(true);
}
}
public void LoadLevel(int level) {
GameManager.Instance.LoadLevel(level);
}
public void ShowNextPage(int pageNr)
......
......@@ -8,7 +8,6 @@ public class LevelSelectPageController : MonoBehaviour {
public void LoadLevel(int level)
{
level += (PageNr-1) * 6;
Debug.Log("Load level " + level);
GameManager.Instance.LoadLevel(level);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment