mirror of
				https://github.com/DerTyp7/defrain-shooter-unity.git
				synced 2025-10-31 05:27:07 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			532 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			532 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using UnityEngine;
 | |
| 
 | |
| 
 | |
| public class GameMaster : MonoBehaviour
 | |
| {
 | |
|     [Header("GameMaster")]
 | |
|     [SerializeField] private List<Team> teams = new List<Team>();
 | |
|     private void Start()
 | |
|     {
 | |
|         
 | |
|         CreateTeam("Orange");
 | |
|         CreateTeam("Blue");
 | |
|     }
 | |
| 
 | |
|     private void CreateTeam(string name, int score = 0)
 | |
|     {
 | |
|         Team team = new Team(name, score);
 | |
|         teams.Add(team);
 | |
|     }
 | |
|     
 | |
|     public List<Team> GetTeams()
 | |
|     {
 | |
|         return teams;
 | |
|     } 
 | |
| }
 | 
