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,101 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.InputSystem;
//[CustomEditor(typeof(GameManager))]
public class GameManagerEditor : UnityEditor.Editor
{
private GameManager gameManager;
//Game Mode
private SerializedProperty currentGameModeProperty;
//Single Player
private SerializedProperty inScenePlayerProperty;
private SerializedProperty singlePlayerCameraModeProperty;
//Local Multiplayer
private SerializedProperty playerPrefabProperty;
private SerializedProperty numberOfPlayersProperty;
private SerializedProperty spawnRingCenterProperty;
private SerializedProperty spawnRingRadiusProperty;
void OnEnable()
{
//Game Mode
currentGameModeProperty = serializedObject.FindProperty("currentGameMode");
//Single Player
inScenePlayerProperty = serializedObject.FindProperty("inScenePlayer");
singlePlayerCameraModeProperty = serializedObject.FindProperty("singlePlayerCameraMode");
//Local Multiplayer
playerPrefabProperty = serializedObject.FindProperty("playerPrefab");
numberOfPlayersProperty = serializedObject.FindProperty("numberOfPlayers");
spawnRingCenterProperty = serializedObject.FindProperty("spawnRingCenter");
spawnRingRadiusProperty = serializedObject.FindProperty("spawnRingRadius");
}
public override void OnInspectorGUI()
{
gameManager = (GameManager)target;
serializedObject.Update();
DrawGameModeGUI();
DrawSpaceGUI(3);
EditorGUILayout.LabelField("Initialization Mode Settings", EditorStyles.boldLabel);
if(gameManager.currentGameMode == GameMode.SinglePlayer)
{
DrawSinglePlayerGUI();
}
if(gameManager.currentGameMode == GameMode.LocalMultiplayer)
{
DrawLocalMultiplayerGUI();
}
serializedObject.ApplyModifiedProperties();
}
void DrawGameModeGUI()
{
EditorGUILayout.LabelField("Game Mode", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(currentGameModeProperty);
}
void DrawSinglePlayerGUI()
{
EditorGUILayout.PropertyField(inScenePlayerProperty);
EditorGUILayout.PropertyField(singlePlayerCameraModeProperty);
}
void DrawLocalMultiplayerGUI()
{
EditorGUILayout.PropertyField(playerPrefabProperty);
EditorGUILayout.PropertyField(numberOfPlayersProperty);
EditorGUILayout.PropertyField(spawnRingCenterProperty);
EditorGUILayout.PropertyField(spawnRingRadiusProperty);
}
void DrawSpaceGUI(int amountOfSpace)
{
for(int i = 0; i < amountOfSpace; i++)
{
EditorGUILayout.Space();
}
}
}