Commit 3f88f9e0 authored by Tommé Nöll's avatar Tommé Nöll
Browse files
parents 367bb7f2 cf3a9a85
......@@ -3153,40 +3153,6 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!84 &63295974
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 3
m_Width: 500
m_Height: 233
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 21
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1 &63575382
GameObject:
m_ObjectHideFlags: 0
......@@ -3525,11 +3491,6 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4391194054061318388, guid: 705ec54aa607bc34a84ab1b394757040,
type: 3}
propertyPath: respornNo
value: 4
objectReference: {fileID: 0}
- target: {fileID: 4391194054061318391, guid: 705ec54aa607bc34a84ab1b394757040,
type: 3}
propertyPath: m_Sprite
......@@ -3545,6 +3506,11 @@ PrefabInstance:
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4391194054061318388, guid: 705ec54aa607bc34a84ab1b394757040,
type: 3}
propertyPath: respornNo
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 705ec54aa607bc34a84ab1b394757040, type: 3}
--- !u!4 &66386426 stripped
......@@ -7106,6 +7072,40 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!84 &141309080
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 3
m_Width: 1575
m_Height: 886
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 21
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1 &144568831
GameObject:
m_ObjectHideFlags: 0
......@@ -7917,7 +7917,7 @@ PrefabInstance:
type: 3}
propertyPath: m_TargetTexture
value:
objectReference: {fileID: 63295974}
objectReference: {fileID: 141309080}
- target: {fileID: 8811539149977030266, guid: 388a7af523fdebaafad4a5d1ae1a896b,
type: 3}
propertyPath: m_LocalPosition.x
......@@ -7998,12 +7998,6 @@ PrefabInstance:
propertyPath: m_LocalPosition.z
value: -52.308826
objectReference: {fileID: 0}
- target: {fileID: 7087328957400987548, guid: 388a7af523fdebaafad4a5d1ae1a896b,
type: 3}
propertyPath: startMusic
value:
objectReference: {fileID: 11400000, guid: d1dea56ddee5d3b49ac636e4612e090e,
type: 2}
- target: {fileID: 8811539149977030267, guid: 388a7af523fdebaafad4a5d1ae1a896b,
type: 3}
propertyPath: m_BackGroundColor.r
......@@ -8019,6 +8013,12 @@ PrefabInstance:
propertyPath: m_BackGroundColor.b
value: 0.092559636
objectReference: {fileID: 0}
- target: {fileID: 7087328957400987548, guid: 388a7af523fdebaafad4a5d1ae1a896b,
type: 3}
propertyPath: startMusic
value:
objectReference: {fileID: 11400000, guid: d1dea56ddee5d3b49ac636e4612e090e,
type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 388a7af523fdebaafad4a5d1ae1a896b, type: 3}
--- !u!1 &162821714
......@@ -345324,6 +345324,23 @@ MonoBehaviour:
grub3: {fileID: 125909014}
roots: {fileID: 815982746}
save: {fileID: 11400000, guid: 2b99c830cf6b3ab468f7b160e4625661, type: 2}
camShake: {fileID: 1189248385}
cameraShake:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1189248385}
m_MethodName: StartShake
m_Mode: 4
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 3
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!1 &747074148
GameObject:
m_ObjectHideFlags: 0
......@@ -367386,6 +367403,27 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1189248384 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8811539149977030262, guid: 388a7af523fdebaafad4a5d1ae1a896b,
type: 3}
m_PrefabInstance: {fileID: 160780067}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1189248385
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1189248384}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 06f4b3c3fa5588b4e9006efdbf018d4c, type: 3}
m_Name:
m_EditorClassIdentifier:
shakeDuration: 0
shakeMagnitude: 0.1
dampingSpeed: 1
--- !u!1 &1192067932
GameObject:
m_ObjectHideFlags: 0
......@@ -41,6 +41,7 @@ public class CameraShake : MonoBehaviour
{
shakeDuration = 0f;
transform.localPosition = initialPosition;
gameObject.GetComponent<CameraShake>().enabled = false;
}
}
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class Objective1 : MonoBehaviour
{
......@@ -11,13 +12,27 @@ public class Objective1 : MonoBehaviour
public Save save;
public CameraShake camShake;
public UnityEvent cameraShake;
private bool done;
private void Awake()
{
done = false;
}
// Update is called once per frame
void Update()
{
if(grub1 == null && grub2 == null && grub3 == null)
if(grub1 == null && grub2 == null && grub3 == null && !done)
{
camShake.enabled = true;
cameraShake.Invoke();
roots.SetActive(false);
save.pilzZustand = 1;
done = true;
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class Objective2 : MonoBehaviour
{
......@@ -9,14 +10,21 @@ public class Objective2 : MonoBehaviour
public Save save;
private void OnTriggerEnter2D(Collider2D collision)
public CameraShake camShake;
public UnityEvent cameraShake;
private bool done;
private void OnTriggerEnter2D(Collider2D collision)
{
Debug.Log("Test");
if(collision.gameObject == stone)
{
deathZone.SetActive(false);
camShake.enabled = true;
cameraShake.Invoke();
deathZone.SetActive(false);
save.pilzZustand = 2;
}
done = true;
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class Objective3 : MonoBehaviour
{
......@@ -8,12 +9,21 @@ public class Objective3 : MonoBehaviour
public Save save;
// Update is called once per frame
public CameraShake camShake;
public UnityEvent cameraShake;
private bool done;
// Update is called once per frame
void Update()
{
if(!light.activeSelf)
{
save.pilzZustand = 3;
}
camShake.enabled = true;
cameraShake.Invoke();
save.pilzZustand = 3;
done = true;
}
}
}
......@@ -47,6 +47,12 @@ public class Life : MonoBehaviour
life = value;
}
public void LoseLife()
{
life -= 1;
health.LifeLost(life);
}
private void OnCollisionEnter2D(Collision2D other)
{
if (other.gameObject.layer == hazardLayer || other.gameObject.layer == enemyLayer)
......
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