Commit 17f8d808 authored by Jonas's avatar Jonas

Merge branch 'master' of...

Merge branch 'master' of gitlab.fsi.hochschule-trier.de:GameDevWeek/sommersemester-2019/unity/touch-me-if-you-can
parents 27594497 4e6a0900
......@@ -10,7 +10,7 @@ public class ShowCountdown : MonoBehaviour
{
public TextMeshProUGUI delayTextField;
private float timer = 0;
private float _timer = 0;
// called zero
void Awake()
{
......@@ -32,28 +32,51 @@ public class ShowCountdown : MonoBehaviour
// Debug.Log(mode);
delayTextField.text = "funcs";
timer = 0;
_timer = 0;
StartCoroutine(UpdateDelayText());
}
IEnumerator UpdateDelayText() //TODO : Anpassen an Runden Countdown/Zwischen Runden
{
int dt = GameManager.instance.data.DelayTime - 1;
for (int i = 0; i < GameManager.instance.data.DelayTime; i++)
{
if(dt-i < 1)
continue;
delayTextField.text = (dt- i) + "";
for (int w = 0; w < 50; w++)
{
delayTextField.fontSize -= 2f;
yield return new WaitForSecondsRealtime(0.01f );
}
float sec = 1;
float framerate = (sec / Time.unscaledDeltaTime);
int dt = GameManager.instance.data.DelayTime-1;
WaitForSecondsRealtime waiting = new WaitForSecondsRealtime(0.06f);
for (int i = 0; i < GameManager.instance.data.DelayTime; i++)
{
delayTextField.text = dt + "";
for (float frame = 0; frame < 1; frame += 1 / framerate)
{
delayTextField.fontSize -= Mathf.Lerp(0, 1, frame) * 10;
//print(delayTextField.fontSize);
yield return waiting;
}
delayTextField.fontSize = 300;
dt--;
if (dt < 1)
{
delayTextField.text = "Go!";
continue;
}
}
delayTextField.fontSize = 300;
}
delayTextField.text = "GO!";
/*int dt = GameManager.instance.data.DelayTime - 1;
for (int i = 0; i < GameManager.instance.data.DelayTime; i++)
{
if(dt-i < 1)
continue;
delayTextField.text = (dt- i) + "";
for (int w = 0; w < 50; w++)
{
delayTextField.fontSize -= 2f;
yield return new WaitForSecondsRealtime(0.01f );
}
delayTextField.fontSize = 300;
}
delayTextField.text = "GO!";*/
}
......
......@@ -690,6 +690,8 @@ GameObject:
- component: {fileID: 770186383286899028}
- component: {fileID: 532940879910498657}
- component: {fileID: 3201751554819008786}
- component: {fileID: 1041388776}
- component: {fileID: 1041388781}
m_Layer: 8
m_Name: body
m_TagString: BodyPlayer
......@@ -706,7 +708,7 @@ Transform:
m_GameObject: {fileID: 6045165005171275833}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 3, y: 3, z: 3}
m_Children:
- {fileID: 7201478858573411899}
m_Father: {fileID: 0}
......@@ -792,6 +794,45 @@ MonoBehaviour:
m_EditorClassIdentifier:
mutation1: {fileID: 11400000, guid: 3a533c310414823458ca2a6ea6c6ddce, type: 2}
mutation2: {fileID: 11400000, guid: 674a68f9f71d2b640914ad1f3be2cbc0, type: 2}
--- !u!114 &1041388776
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6045165005171275833}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c5dcddde29f5d3747912be55aba7420a, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1041388781
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6045165005171275833}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Actions: {fileID: -944628639613478452, guid: 60fb516279b74524f91fcc9af2cfc4ae,
type: 3}
m_NotificationBehavior: 0
m_UIInputModule: {fileID: 0}
m_DeviceLostEvent:
m_PersistentCalls:
m_Calls: []
m_DeviceRegainedEvent:
m_PersistentCalls:
m_Calls: []
m_NeverAutoSwitchControlSchemes: 0
m_DefaultControlScheme: Gamepad
m_DefaultActionMap: 38732b26-d9e3-4196-a316-9054667e9b3d
m_SplitScreenIndex: -1
m_Camera: {fileID: 0}
--- !u!1 &6917490051661084803
GameObject:
m_ObjectHideFlags: 0
......
......@@ -95,6 +95,7 @@ GameObject:
- component: {fileID: 9070284434229523640}
- component: {fileID: 7286349345975393423}
- component: {fileID: 6099359186389172106}
- component: {fileID: 1029178051}
m_Layer: 8
m_Name: head
m_TagString: HeadPlayer
......@@ -111,7 +112,7 @@ Transform:
m_GameObject: {fileID: 6363572820684086373}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.1229997, y: -0.5966866, z: 0.8825981}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 4, y: 4, z: 4}
m_Children:
- {fileID: 4386303693745616587}
m_Father: {fileID: 0}
......@@ -138,7 +139,7 @@ Rigidbody:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6363572820684086373}
serializedVersion: 2
m_Mass: 1
m_Mass: 0.4
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
......@@ -159,8 +160,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
canMove: 1
moveSpeed: 5
maxSpeed: 10
moveSpeed: 10
maxSpeed: 20
--- !u!114 &6099359186389172106
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -175,3 +176,30 @@ MonoBehaviour:
m_EditorClassIdentifier:
mutation1: {fileID: 11400000, guid: c64ba09c4b1c0eb479ec633963cb7215, type: 2}
mutation2: {fileID: 11400000, guid: 296440bd939672349ab89b6dd84e58fe, type: 2}
--- !u!114 &1029178051
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6363572820684086373}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Actions: {fileID: -944628639613478452, guid: 60fb516279b74524f91fcc9af2cfc4ae,
type: 3}
m_NotificationBehavior: 0
m_UIInputModule: {fileID: 0}
m_DeviceLostEvent:
m_PersistentCalls:
m_Calls: []
m_DeviceRegainedEvent:
m_PersistentCalls:
m_Calls: []
m_NeverAutoSwitchControlSchemes: 0
m_DefaultControlScheme: Keyboard
m_DefaultActionMap: 480005df-eb34-4300-80ff-96103380a4f8
m_SplitScreenIndex: -1
m_Camera: {fileID: 0}
This diff is collapsed.
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