Texture igloo und iceblocks + iceblocks mit funktion und pingu anzeige

This commit is contained in:
2026-01-25 12:58:20 +01:00
parent 2a86b6211d
commit be2a52ab3d
27 changed files with 1895 additions and 33 deletions
+19 -15
View File
@@ -26,21 +26,7 @@ public class BearAwareness : MonoBehaviour
private void Update()
{
if (awareness >= (awarenessSlider.maxValue - 10))
{
SilderColor.color = Color.red;
}
else if (awareness >= (awarenessSlider.maxValue / 2))
{
SilderColor.color = Color.orange;
}
else if (awareness <= (awarenessSlider.maxValue / 2) )
{
SilderColor.color = Color.darkGreen;
}
ChangeSliderColor();
}
void IncreaseAwareness(int noice)
@@ -63,6 +49,24 @@ public class BearAwareness : MonoBehaviour
yield return new WaitForSeconds(5);
awarenessSlider.value -= 5;
awareness -= 5;
}
}
void ChangeSliderColor()
{
if (awareness >= (awarenessSlider.maxValue - 10))
{
SilderColor.color = Color.red;
}
else if (awareness >= (awarenessSlider.maxValue / 2))
{
SilderColor.color = Color.orange;
}
else if (awareness <= (awarenessSlider.maxValue / 2) )
{
SilderColor.color = Color.darkGreen;
}
}
}
+34 -6
View File
@@ -22,6 +22,8 @@ public class PlayerMove : MonoBehaviour
[SerializeField] private string inputNameHorizontal;
[SerializeField] private string inputNameVertical;
public Transform player;
private void Start()
@@ -40,9 +42,21 @@ public class PlayerMove : MonoBehaviour
if (horizontalInput != 0 && horizontal == true)
{
if (!standUp.ispushing)
if (!standUp.ispushing && horizontalInput == 1)
{
transform.rotation = Quaternion.Euler(0f, 0f, 90f);
player.rotation = Quaternion.Euler(90f, 90f, 0f);
}
else if (!standUp.ispushing && horizontalInput == -1)
{
player.rotation = Quaternion.Euler(90f, 260f, 0f);
}
else if (horizontalInput == 1)
{
player.rotation = Quaternion.Euler(0f, 90f, 0f);
}
else if (horizontalInput == -1)
{
player.rotation = Quaternion.Euler(0f, 260f, 0f);
}
vertical = false;
moveDirection = new Vector3(horizontalInput,0, 0);
@@ -55,9 +69,21 @@ public class PlayerMove : MonoBehaviour
}
else if (verticalInput != 0 && vertical == true)
{
if (!standUp.ispushing)
if (!standUp.ispushing && verticalInput == 1)
{
transform.rotation = Quaternion.Euler(90f, 0f, 0f);
player.rotation = Quaternion.Euler(90f, 0f, 0f);
}
else if (!standUp.ispushing && verticalInput == -1)
{
player.rotation = Quaternion.Euler(90f, 180f, 0f);
}
else if (verticalInput == 1)
{
player.rotation = Quaternion.Euler(0f, 0f, 0f);
}
else if (verticalInput == -1)
{
player.rotation = Quaternion.Euler(0f, 180f, 0f);
}
horizontal = false;
moveDirection = new Vector3(0, 0, verticalInput);
@@ -72,11 +98,13 @@ public class PlayerMove : MonoBehaviour
else
{
StartCoroutine(Slide(slide));
transform.rotation = Quaternion.Euler(0f, 0f, 0f);
if (!standUp.ispushing)
{
player.rotation = Quaternion.Euler(0f, 0f, 0f);
}
}
transform.Translate(moveDirection * speed * Time.deltaTime, Space.World);
}