chunk 1: core gameplay scripts scenes runtime assets

This commit is contained in:
2026-04-06 11:02:34 +03:00
parent fa0388bc79
commit 0d11a097d8
703 changed files with 2292651 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
using System.Collections.Generic;
using UnityEngine;
public class MissionManager : MonoBehaviour
{
public static MissionManager Instance { get; private set; }
public List<Mission> Missions { get; set; }
public int TotalXPEarned { get; set; }
private void Awake()
{
if (Instance == null)
{
Instance = this;
}
else
{
Destroy(gameObject);
}
}
private void Start()
{
// Populate the list of missions
Missions = new List<Mission>
{
new Mission("Complete Tutorial", "Finish the game tutorial", 100),
new Mission("Defeat 10 Enemies", "Defeat 10 enemies in combat", 200),
new Mission("Win 3 Matches", "Win 3 matches in multiplayer mode", 300)
};
}
public void CompleteMission(string missionName)
{
// Find the mission with the specified name
Mission mission = Missions.Find(m => m.Name == missionName);
if (mission != null && !mission.IsCompleted)
{
// Mark the mission as completed
mission.IsCompleted = true;
// Award XP to the player
TotalXPEarned += mission.XPReward;
}
}
}