Created new minigame Buttons, Added base assets + all on canvas, Added lights for glow effect

This commit is contained in:
2026-05-19 23:06:07 +02:00
parent bca7c930c2
commit 9455cdb4e6
97 changed files with 1770 additions and 9287 deletions

View File

@@ -1,77 +0,0 @@
using System;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class WindController : MonoBehaviour, ITask
{
[Header("Settings větru")]
public float maxWindTorque = 8f;
public float windChangeSpeed = 0.6f;
public float gustInterval = 4f;
public float gustMultiplier = 2.0f;
public float CurrentWindTorque { get; private set; }
private float targetTorque;
private float gustTimer;
private Action<ITask> _onCompleted;
private Action<ITask> _onExit;
public string TaskID { get; set; }
public TaskType TaskType { get; set; }
public string TaskName { get; set; }
public (double, double) TaskLocation { get; set; }
public bool IsCompleted { get; private set; }
void Start()
{
PickNewTargetTorque();
gustTimer = gustInterval;
}
void Update()
{
CurrentWindTorque = Mathf.Lerp(CurrentWindTorque, targetTorque, Time.deltaTime * windChangeSpeed);
gustTimer -= Time.deltaTime;
if (gustTimer <= 0f)
{
float gust = UnityEngine.Random.Range(-maxWindTorque, maxWindTorque) * gustMultiplier;
targetTorque = Mathf.Clamp(gust, -maxWindTorque * gustMultiplier, maxWindTorque * gustMultiplier);
gustTimer = gustInterval;
Invoke(nameof(PickNewTargetTorque), 0.8f);
}
}
private void PickNewTargetTorque()
{
targetTorque = UnityEngine.Random.Range(-maxWindTorque, maxWindTorque);
}
public void Initialize(Action<ITask> onCompleted)
{
_onCompleted = onCompleted;
IsCompleted = false;
}
public void Complete()
{
if (IsCompleted) return;
IsCompleted = true;
_onCompleted?.Invoke(this);
}
public void ExitTask(Action<ITask> onExit)
{
_onExit = onExit;
_onExit?.Invoke(this);
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 58e3f22231584b9459fe7c44ee63e515