Commit 61cac139 authored by Christopher Benes's avatar Christopher Benes

MainCam fix

parents 074af41d 795b16cc
......@@ -20,7 +20,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: {x: 1449.7437, y: 847, z: 0}
value: {x: 1449.7437, y: -156, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
......@@ -28,8 +28,8 @@ AnimationClip:
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 22.11
value: {x: 1449.7437, y: 1907, z: 0}
time: 23.44
value: {x: 1449.7437, y: 2276, z: 0}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
......@@ -63,7 +63,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 22.11
m_StopTime: 23.44
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
......@@ -92,7 +92,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 22.11
time: 23.44
value: 1449.7437
inSlope: 0
outSlope: 0
......@@ -112,7 +112,7 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 847
value: -156
inSlope: 0
outSlope: 0
tangentMode: 136
......@@ -120,8 +120,8 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 22.11
value: 1907
time: 23.44
value: 2276
inSlope: 0
outSlope: 0
tangentMode: 136
......@@ -148,7 +148,7 @@ AnimationClip:
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 22.11
time: 23.44
value: 0
inSlope: 0
outSlope: 0
......
......@@ -34,8 +34,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1444, y: -1326}
m_SizeDelta: {x: 278.9, y: 87.5}
m_AnchoredPosition: {x: -1463, y: -815}
m_SizeDelta: {x: 536, y: 168}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923847483812386
CanvasRenderer:
......@@ -93,8 +93,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 10
m_fontSizeBase: 10
m_fontSize: 30
m_fontSizeBase: 30
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -194,8 +194,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1432.0002, y: -1451}
m_SizeDelta: {x: 334.5, y: 42.7}
m_AnchoredPosition: {x: -1440, y: -1058}
m_SizeDelta: {x: 643, y: 82}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923847492237805
CanvasRenderer:
......@@ -253,8 +253,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 10
m_fontSizeBase: 10
m_fontSize: 30
m_fontSizeBase: 30
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -354,8 +354,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1440, y: -1174.9001}
m_SizeDelta: {x: 311.6, y: 67.2}
m_AnchoredPosition: {x: -1456, y: -515}
m_SizeDelta: {x: 599, y: 129}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923847530600761
CanvasRenderer:
......@@ -414,8 +414,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontSize: 60
m_fontSizeBase: 60
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -515,8 +515,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1439, y: -1453.5}
m_SizeDelta: {x: 556.3, y: 105.8}
m_AnchoredPosition: {x: -1454, y: -1050}
m_SizeDelta: {x: 1069, y: 203}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923847579445390
CanvasRenderer:
......@@ -575,8 +575,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontSize: 60
m_fontSizeBase: 60
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -666,7 +666,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 411923847582123008}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1449.7437, y: 1907, z: 0}
m_LocalPosition: {x: 1449.7437, y: -156, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 411923848751897827}
......@@ -719,8 +719,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1439.2563, y: -1810.5}
m_SizeDelta: {x: 354.5, y: 161.7}
m_AnchoredPosition: {x: -1454, y: -1755}
m_SizeDelta: {x: 681, y: 311}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923847990966758
CanvasRenderer:
......@@ -778,8 +778,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 10
m_fontSizeBase: 10
m_fontSize: 30
m_fontSizeBase: 30
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -879,8 +879,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1441, y: -1272}
m_SizeDelta: {x: 354.5, y: 161.7}
m_AnchoredPosition: {x: -1458, y: -701}
m_SizeDelta: {x: 681, y: 311}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923848108348533
CanvasRenderer:
......@@ -942,8 +942,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 10
m_fontSizeBase: 10
m_fontSize: 30
m_fontSizeBase: 30
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -1043,8 +1043,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1436, y: -1619}
m_SizeDelta: {x: 354.5, y: 161.7}
m_AnchoredPosition: {x: -1448, y: -1378}
m_SizeDelta: {x: 681, y: 311}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923848145405176
CanvasRenderer:
......@@ -1102,8 +1102,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 10
m_fontSizeBase: 10
m_fontSize: 30
m_fontSizeBase: 30
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -1182,13 +1182,14 @@ GameObject:
- component: {fileID: 411923848164041268}
- component: {fileID: 411923848164041269}
- component: {fileID: 411923848164041266}
- component: {fileID: 224667883}
m_Layer: 5
m_Name: Credits 1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &411923848164041270
RectTransform:
m_ObjectHideFlags: 0
......@@ -1289,6 +1290,18 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &224667883
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 411923848164041271}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a2baf1c6d2febb24eab76fae5c32c299, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &411923848534346608
GameObject:
m_ObjectHideFlags: 0
......@@ -1323,8 +1336,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1436, y: -1753}
m_SizeDelta: {x: 556.3, y: 105.8}
m_AnchoredPosition: {x: -1448, y: -1626}
m_SizeDelta: {x: 1069, y: 203}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923848534346621
CanvasRenderer:
......@@ -1383,8 +1396,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontSize: 60
m_fontSizeBase: 60
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -1484,8 +1497,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1438, y: -1559.5}
m_SizeDelta: {x: 556.3, y: 105.8}
m_AnchoredPosition: {x: -1452, y: -1254}
m_SizeDelta: {x: 1069, y: 203}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923848544788390
CanvasRenderer:
......@@ -1544,8 +1557,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontSize: 60
m_fontSizeBase: 60
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -1645,8 +1658,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1409.1, y: -838}
m_SizeDelta: {x: 475.8, y: 267.7}
m_AnchoredPosition: {x: -1396, y: 133}
m_SizeDelta: {x: 2176, y: 1223}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923848751897825
CanvasRenderer:
......@@ -1793,8 +1806,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1436.5, y: -1651.5}
m_SizeDelta: {x: 556.3, y: 105.8}
m_AnchoredPosition: {x: -1449, y: -1431}
m_SizeDelta: {x: 1069, y: 203}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923849131600422
CanvasRenderer:
......@@ -1853,8 +1866,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontSize: 60
m_fontSizeBase: 60
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -1954,8 +1967,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1436, y: -1677}
m_SizeDelta: {x: 416.1, y: 107}
m_AnchoredPosition: {x: -1448, y: -1493}
m_SizeDelta: {x: 799, y: 206}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923849160027267
CanvasRenderer:
......@@ -2013,8 +2026,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 10
m_fontSizeBase: 10
m_fontSize: 30
m_fontSizeBase: 30
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......@@ -2114,8 +2127,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1441, y: -1305.5}
m_SizeDelta: {x: 556.3, y: 105.8}
m_AnchoredPosition: {x: -1458, y: -766}
m_SizeDelta: {x: 1069, y: 203}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &411923849266873760
CanvasRenderer:
......@@ -2174,8 +2187,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontSize: 60
m_fontSizeBase: 60
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
......
......@@ -670,7 +670,7 @@ MonoBehaviour:
F um das Element zu benutzen
E zum Speichern bei einem Checkpoint
E zum Interagieren bei einem Checkpoint, Elemente, usw.
T zum Teleportieren bei einem Checkpoint
......@@ -720,7 +720,7 @@ MonoBehaviour:
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: 93
m_firstOverflowCharacterIndex: 107
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
......@@ -743,12 +743,12 @@ MonoBehaviour:
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 4648838426561617750}
characterCount: 152
characterCount: 171
spriteCount: 0
spaceCount: 26
wordCount: 27
spaceCount: 28
wordCount: 29
linkCount: 0
lineCount: 5
lineCount: 6
pageCount: 1
materialCount: 1
m_havePropertiesChanged: 0
......
This diff is collapsed.
......@@ -74,6 +74,7 @@ public class PlayerAnimation : MonoBehaviour
switch (r_State.GetCurrentElement())
{
case InfusedElement.None:
print("RESET");
if(m_ScalingActive)ScaleReset();
if (m_RotationActive)
......@@ -84,8 +85,12 @@ public class PlayerAnimation : MonoBehaviour
break;
case InfusedElement.Air:
print("AIR");
m_CurrentAirCharges = r_State.GetCharges();
if (m_ScalingActive) ScalePlayer();
if (m_ScalingActive)
{
ScalePlayer();
}
/*if(m_isRotating) {
SetRotationOrbsActive(true, r_State.GetCharges());
......@@ -148,21 +153,27 @@ public class PlayerAnimation : MonoBehaviour
public void ScalePlayer()
{
m_CurrentAirCharges = r_State.GetCharges();
int diff = m_CurrentAirCharges - m_PreviousAirCharges;
//Debug.Log("current: " + currentCharges + " previous: " + m_PreviousCharges + " difference: " + diff);
if (!m_isAnimating || m_isAnimating)
{
if (diff > 0)
{
StartCoroutine(ScaleUp(m_PreviousAirCharges, m_CurrentAirCharges));
}
else
{
StartCoroutine(ScaleDown(m_PreviousAirCharges, m_CurrentAirCharges));
}
}
var scaleFactor = 1.0f + m_CurrentAirCharges * 0.2f;
var direction = Mathf.Sign(this.gameObject.transform.localScale.x);
var newScale = new Vector3(direction * scaleFactor * m_OriginScale.x, scaleFactor * m_OriginScale.x, 0.0f);
this.gameObject.transform.localScale = newScale;
m_PreviousAirCharges = m_CurrentAirCharges;
// m_CurrentAirCharges = r_State.GetCharges();
// int diff = m_CurrentAirCharges - m_PreviousAirCharges;
// //Debug.Log("current: " + currentCharges + " previous: " + m_PreviousCharges + " difference: " + diff);
// if (!m_isAnimating || m_isAnimating)
// {
// if (diff > 0)
// {
// StartCoroutine(ScaleUp(m_PreviousAirCharges, m_CurrentAirCharges));
// }
// else
// {
// StartCoroutine(ScaleDown(m_PreviousAirCharges, m_CurrentAirCharges));
// }
// }
//
// m_PreviousAirCharges = m_CurrentAirCharges;
}
private void ScaleReset()
......@@ -172,23 +183,23 @@ public class PlayerAnimation : MonoBehaviour
transform.localScale = s;
}
private IEnumerator ScaleUp(float from, float to)
{
m_isAnimating = true;
float newSize = m_SizePerCharge * Mathf.Abs((to - from));
transform.localScale += new Vector3(newSize * Mathf.Sign(transform.localScale.x), newSize, newSize);
yield return null;
m_isAnimating = false;
}
private IEnumerator ScaleDown(float from, float to)
{
m_isAnimating = true;
float newSize = m_SizePerCharge * Mathf.Abs((to - from));
transform.localScale -= new Vector3(newSize * Mathf.Sign(transform.localScale.x), newSize, newSize);
yield return null;
m_isAnimating = false;
}
// private IEnumerator ScaleUp(float from, float to)
// {
// m_isAnimating = true;
// float newSize = m_SizePerCharge * Mathf.Abs((to - from));
// transform.localScale += new Vector3(newSize * Mathf.Sign(transform.localScale.x), newSize, newSize);
// yield return null;
// m_isAnimating = false;
// }
//
// private IEnumerator ScaleDown(float from, float to)
// {
// m_isAnimating = true;
// float newSize = m_SizePerCharge * Mathf.Abs((to - from));
// transform.localScale -= new Vector3(newSize * Mathf.Sign(transform.localScale.x), newSize, newSize);
// yield return null;
// m_isAnimating = false;
// }
/*private IEnumerator ScaleUp(float from, float to)
......
......@@ -45,6 +45,11 @@ namespace _Game.Scripts.Player
_waterAttack.enabled = false;
}
private void OnDisable()
{
state.UpdateElement(InfusedElement.None);
}
private void Update()
{
if (Input.GetButtonDown("Fire1"))
......
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using EndMissionScript;
public class EndScreen : MonoBehaviour
{
// Start is calledcbefore the first frame update
public GameObject credits;
public GameObject HUD;
public GameObject PauseMenu;
private void OnTriggerEnter2D(Collider2D other)
{
if (EndMission.em.mission && other.tag.Equals("Player"))
{
credits.SetActive(true);
}
HUD.SetActive(false);
PauseMenu.SetActive(false);
}
}
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