Commit a52b603e authored by Lorenz Fischer's avatar Lorenz Fischer

Merge branch 'work' of...

Merge branch 'work' of https://gitlab.fsi.hochschule-trier.de/GameDevWeek/ws-18_19/unity/explosive-temper into work

# Conflicts:
#	Assets/_Game/UI/Menus/LoseMenu.prefab
parents 5af84aa0 b49a7487
fileFormatVersion: 2
guid: dbea5ca1a91e45945a0e748d6f3c01b6
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: base
100002: //RootNode
100004: Flag
100006: flag
100008: FlagArmature
400000: base
400002: //RootNode
400004: Flag
400006: flag
400008: FlagArmature
2100000: Pole
2100002: Flag
4300000: Flag
7400000: FlagIdle
9500000: //RootNode
13700000: Flag
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 0.01
hasPreviousCalculatedGlobalScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 6c5a918bfc24b3c4193eb3f2f6ab8210
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -58,6 +58,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f2852ea1ce4fed248a8674e148d8b370, type: 3}
m_Name:
m_EditorClassIdentifier:
flag: {fileID: 8922702631685301373}
checkedFarbe: {fileID: 2100000, guid: a61496e49e783c8409b91568fe1a46aa, type: 2}
--- !u!1001 &8922702631685202649
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -133,3 +135,9 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 8922702631685202649}
m_PrefabAsset: {fileID: 0}
--- !u!1 &8922702631685301373 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 100004, guid: b39ed54baee884fbfaf04f4ccde3ff20,
type: 3}
m_PrefabInstance: {fileID: 8922702631685202649}
m_PrefabAsset: {fileID: 0}
......@@ -53,6 +53,8 @@ MonoBehaviour:
type: 3}
LoseMenu: {fileID: 2035817494363404885, guid: d6cb91a367580ec48ba8ca1c060e928b,
type: 3}
WinScreen: {fileID: 6403839977254625339, guid: a6d8957a14cb32547a232d5c81fb7ee1,
type: 3}
levelPreviewPrefab: {fileID: 2008977762756068435, guid: 903a55f733fad7f4994a6deff253b22d,
type: 3}
skipBombSelection: 0
This diff is collapsed.
This diff is collapsed.
fileFormatVersion: 2
guid: de12e0da4ca0cca499c60c6a62a48254
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571334, b: 0.3069219, a: 1}
m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571328, b: 0.3069217, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
......@@ -181,7 +181,7 @@ PrefabInstance:
- target: {fileID: 2538585548309394087, guid: c7fce6ae8c8f6c4c68e4eb23d70aa6f8,
type: 3}
propertyPath: m_LocalPosition.x
value: 16
value: 16.5
objectReference: {fileID: 0}
- target: {fileID: 2538585548309394087, guid: c7fce6ae8c8f6c4c68e4eb23d70aa6f8,
type: 3}
......@@ -983,12 +983,12 @@ PrefabInstance:
- target: {fileID: 8517243535879592964, guid: 5df05c0633a5dd64c882e42408b75dac,
type: 3}
propertyPath: m_LocalPosition.x
value: -5.85
value: -4.85
objectReference: {fileID: 0}
- target: {fileID: 8517243535879592964, guid: 5df05c0633a5dd64c882e42408b75dac,
type: 3}
propertyPath: m_LocalPosition.y
value: 7.85
value: 8.85
objectReference: {fileID: 0}
- target: {fileID: 8517243535879592964, guid: 5df05c0633a5dd64c882e42408b75dac,
type: 3}
......@@ -3672,12 +3672,12 @@ PrefabInstance:
- target: {fileID: 2538585548309394087, guid: 9414143b820e3794a8248155c9fbf1f2,
type: 3}
propertyPath: m_LocalPosition.x
value: 6
value: 7
objectReference: {fileID: 0}
- target: {fileID: 2538585548309394087, guid: 9414143b820e3794a8248155c9fbf1f2,
type: 3}
propertyPath: m_LocalPosition.y
value: -5
value: -4
objectReference: {fileID: 0}
- target: {fileID: 2538585548309394087, guid: 9414143b820e3794a8248155c9fbf1f2,
type: 3}
......@@ -4969,14 +4969,14 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1433885274362733645, guid: ca95ab9111487384891d803db2e75b67,
- target: {fileID: 1433885273798513686, guid: ca95ab9111487384891d803db2e75b67,
type: 3}
propertyPath: speed
propertyPath: m_LocalPosition.x
value: 4
objectReference: {fileID: 0}
- target: {fileID: 1433885273798513686, guid: ca95ab9111487384891d803db2e75b67,
- target: {fileID: 1433885274362733645, guid: ca95ab9111487384891d803db2e75b67,
type: 3}
propertyPath: m_LocalPosition.x
propertyPath: speed
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: []
......@@ -5239,12 +5239,12 @@ PrefabInstance:
- target: {fileID: 8517243535879592964, guid: 5df05c0633a5dd64c882e42408b75dac,
type: 3}
propertyPath: m_LocalPosition.x
value: -5.85
value: -4.85
objectReference: {fileID: 0}
- target: {fileID: 8517243535879592964, guid: 5df05c0633a5dd64c882e42408b75dac,
type: 3}
propertyPath: m_LocalPosition.y
value: 8.85
value: 9.85
objectReference: {fileID: 0}
- target: {fileID: 8517243535879592964, guid: 5df05c0633a5dd64c882e42408b75dac,
type: 3}
......@@ -5806,6 +5806,26 @@ PrefabInstance:
value:
objectReference: {fileID: 2160690945321569126, guid: fe79a1688bb4bc345a192ec9451ef8bf,
type: 3}
- target: {fileID: 2707152133387111790, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5,
type: 3}
propertyPath: m_LocalPosition.x
value: 3
objectReference: {fileID: 0}
- target: {fileID: 2707152133387111790, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5,
type: 3}
propertyPath: m_LocalPosition.y
value: 4
objectReference: {fileID: 0}
- target: {fileID: 2707152133282648010, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5,
type: 3}
propertyPath: m_LocalPosition.x
value: -8.9
objectReference: {fileID: 0}
- target: {fileID: 2707152133282648010, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5,
type: 3}
propertyPath: m_LocalPosition.y
value: 4.8
objectReference: {fileID: 0}
- target: {fileID: 2707152133282648011, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5,
type: 3}
propertyPath: m_BackGroundColor.r
......@@ -5826,26 +5846,6 @@ PrefabInstance:
propertyPath: m_ClearFlags
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2707152133282648010, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5,
type: 3}
propertyPath: m_LocalPosition.x
value: -8.9
objectReference: {fileID: 0}
- target: {fileID: 2707152133282648010, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5,
type: 3}
propertyPath: m_LocalPosition.y
value: 4.8
objectReference: {fileID: 0}
- target: {fileID: 2707152133387111790, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5,
type: 3}
propertyPath: m_LocalPosition.x
value: 3
objectReference: {fileID: 0}
- target: {fileID: 2707152133387111790, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5,
type: 3}
propertyPath: m_LocalPosition.y
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: feb91bbc6bd3ab6a08b69bcbd5cf58b5, type: 3}
--- !u!1 &1153599346
......@@ -7454,12 +7454,12 @@ PrefabInstance:
- target: {fileID: 2538585548309394087, guid: 9414143b820e3794a8248155c9fbf1f2,
type: 3}
propertyPath: m_LocalPosition.x
value: 7
value: 8
objectReference: {fileID: 0}
- target: {fileID: 2538585548309394087, guid: 9414143b820e3794a8248155c9fbf1f2,
type: 3}
propertyPath: m_LocalPosition.y
value: -5
value: -4
objectReference: {fileID: 0}
- target: {fileID: 2538585548309394087, guid: 9414143b820e3794a8248155c9fbf1f2,
type: 3}
......@@ -9625,12 +9625,12 @@ PrefabInstance:
- target: {fileID: 8517243535879592964, guid: 5df05c0633a5dd64c882e42408b75dac,
type: 3}
propertyPath: m_LocalPosition.x
value: -5.85
value: -4.85
objectReference: {fileID: 0}
- target: {fileID: 8517243535879592964, guid: 5df05c0633a5dd64c882e42408b75dac,
type: 3}
propertyPath: m_LocalPosition.y
value: 9.85
value: 10.85
objectReference: {fileID: 0}
- target: {fileID: 8517243535879592964, guid: 5df05c0633a5dd64c882e42408b75dac,
type: 3}
......@@ -9725,7 +9725,7 @@ PrefabInstance:
- target: {fileID: 2538585548309394087, guid: 9414143b820e3794a8248155c9fbf1f2,
type: 3}
propertyPath: m_LocalPosition.y
value: -6
value: -5
objectReference: {fileID: 0}
- target: {fileID: 2538585548309394087, guid: 9414143b820e3794a8248155c9fbf1f2,
type: 3}
......@@ -11012,10 +11012,15 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.size
value: 4
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: LevelTimeLimit
value: 120
value: 150
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
......@@ -11037,6 +11042,26 @@ PrefabInstance:
propertyPath: yMinHoehe
value: 3.5
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.data[0]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.data[1]
value: 4
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.data[2]
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.data[3]
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 655c31af15390a04b9e81f860a5652ad, type: 3}
--- !u!1001 &5087871263228485405
......
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571334, b: 0.3069219, a: 1}
m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571328, b: 0.3069217, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
......@@ -7005,6 +7005,11 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.size
value: 4
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: LevelTimeLimit
......@@ -7030,6 +7035,26 @@ PrefabInstance:
propertyPath: xMinHoehe
value: -35
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.data[0]
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.data[1]
value: 3
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.data[2]
value: 5
objectReference: {fileID: 0}
- target: {fileID: 4412409797423783345, guid: 655c31af15390a04b9e81f860a5652ad,
type: 3}
propertyPath: availableBombs.Array.data[3]
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 655c31af15390a04b9e81f860a5652ad, type: 3}
--- !u!1001 &995138747
......
......@@ -4,6 +4,9 @@ using UnityEngine;
public class Checkpoint : MonoBehaviour
{
public GameObject flag;
public Material checkedFarbe;
private void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == "Player")
......@@ -12,7 +15,12 @@ public class Checkpoint : MonoBehaviour
{
GameObject.FindGameObjectWithTag("Respawn").transform.position = transform.position;
}
}
Material[] myMaterials;
myMaterials = flag.GetComponent<Renderer>().materials;
myMaterials[1] = checkedFarbe;
flag.GetComponent<Renderer>().materials = myMaterials;
}
}
......
......@@ -34,7 +34,8 @@ public class Destructable : MonoBehaviour
{
if (Type == Globals.BoxType.Princess)
{
GameManager.Instance.TogglePause();
GameManager.Instance.GotThePrincess = true;
//GameManager.Instance.HudController.ActivateWinSreen();
Destroy(gameObject);
}
......
......@@ -22,10 +22,13 @@ public class GameManager : MonoBehaviour
public bool withoutTimer = false; //Bomben explodieren nicht nach ihren Timer
[SerializeField] private bool localSceneManager = false;
public float LevelTimeLimit = 10;
public Globals.BombType[] availableBombs;
public BombSelector bombSelector;
[SerializeField] private Camera mainCamera;
public bool GotThePrincess = false;
public GameObject GetPlayerInstance()
{
return playerInstance;
......@@ -59,6 +62,13 @@ public class GameManager : MonoBehaviour
public void SetRespawnImmediately(bool value)
{
HudController.skipBombSelection = value;
//Debug.Log("SetRespawnImmediately: " + value);
}
public void SetLevelInformation(LevelInformation info)
{
LevelTimeLimit = info.LevelTimeLimit;
availableBombs = info.availableBombs;
}
public void StartGame() {
......@@ -66,7 +76,6 @@ public class GameManager : MonoBehaviour
PauseGame(false);
isPlaying = true;
isPausable = true;
PauseGame(false);
HudController.DeactivateLevelSelection();
if (!withoutTimer)
{
......@@ -113,7 +122,7 @@ public class GameManager : MonoBehaviour
private void Start()
{
HudController.Init();
if (localSceneManager)
{
StartGame();
......@@ -163,5 +172,6 @@ public class GameManager : MonoBehaviour
Destroy(gameObject);
}
DontDestroyOnLoad(gameObject);
HudController.Init();
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Global;
public class LevelInformation : MonoBehaviour
{
......@@ -9,4 +10,5 @@ public class LevelInformation : MonoBehaviour
public float yMinHoehe = -50f;
public float xMaxHoehe = 50f;
public float xMinHoehe = -50f;
public Globals.BombType[] availableBombs;
}
......@@ -39,6 +39,8 @@ public class Timer : MonoBehaviour
public void SetTimer(float time)
{
seconds = time;
secondsLeft = time;
//Debug.Log("Timer.SetTimer; Seconds left: " + secondsLeft);
}
// Update is called once per frame
......@@ -48,6 +50,7 @@ public class Timer : MonoBehaviour
{
return;
}
// Debug.Log("Timer.FixedUpdate; Seconds left: " + secondsLeft);
secondsLeft -= Time.deltaTime;
if (timerTick != null)
......
......@@ -5,31 +5,53 @@ using UnityEngine;
public class Condition : MonoBehaviour
{
[SerializeField] private GameObject relevantGameObject;
[SerializeField] private bool replaceWithPlayer;
[SerializeField] private enum CompletionCondition { isActive, xPosBiggerThan };
private enum RelevantObject { SelectedGameObject, Player, BombSelectionMenu };
[SerializeField] private RelevantObject relevantObject = RelevantObject.SelectedGameObject;
private enum CompletionCondition { isActive, xPosBiggerThan };
[SerializeField] private CompletionCondition completionCondition = CompletionCondition.isActive;
[SerializeField] private float comparisonValue;
[SerializeField] private bool inverted = false;
private bool fulfilled = false;
void Start()
{
if (replaceWithPlayer)
GetObject(false);
}
private void GetObject(bool onlyIfNull)
{
if (onlyIfNull && relevantGameObject != null)
{
return;
}
switch(relevantObject)
{
case RelevantObject.Player:
relevantGameObject = GameManager.Instance.GetPlayerInstance();
break;
case RelevantObject.BombSelectionMenu:
relevantGameObject = GameManager.Instance.HudController.GetBombSelectionInstance();
break;
case RelevantObject.SelectedGameObject:
break;
default:
Debug.LogError("Case not handled: " + relevantObject);
break;
}
}
public bool IsFulfilled()
{
return CheckNoInvert() != inverted;
if (!fulfilled)
{
fulfilled = CheckNoInvert() != inverted;
}
return fulfilled;
}
private bool CheckNoInvert()
{
if (relevantGameObject == null && replaceWithPlayer)
{
relevantGameObject = GameManager.Instance.GetPlayerInstance();
}
GetObject(true);
if (!relevantGameObject) return false;
switch (completionCondition)
......
......@@ -6,7 +6,6 @@ public class TutorialElement : MonoBehaviour
{
public Condition showCondition, completionCondition;
public string text;
private bool completed = false;
public bool ShouldShow()
{
......@@ -15,10 +14,6 @@ public class TutorialElement : MonoBehaviour
public bool IsCompleted()
{
if (!completed)
{
completed = completionCondition.IsFulfilled();
}