перезагрузка

This commit is contained in:
2024-07-26 21:14:47 +03:00
parent 1040da0484
commit 95ced8e234
3910 changed files with 11273 additions and 3590179 deletions

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ae500b40028402740ad5d722bd47dabe
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ControlEffects : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2ecd6b9579651bb48b9d55df7fc27da2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,6 +0,0 @@
static public class GameSetting
{
static public int SelectedMap = 1;
static public bool OnePlayer = true;
static public bool isNight = false;
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 35593ea8fc133ea4eb12258491be3327
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,58 +0,0 @@
using TMPro;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
using System.Linq;
using UnityEngine.InputSystem.Utilities;
public class ScriptNumGamepad : MonoBehaviour
{
[SerializeField] private TextMeshProUGUI[] PlayerGamepad;
[SerializeField] private TextMeshProUGUI[] PlayerGamepadConnect;
private void Start()
{
ChangeGamepadInfo();
}
private void Update()
{
InputSystem.onDeviceChange +=
(device, change) =>
{
if ((device.name.Equals("Keyboard") || device.name.Equals("Mouse")) != true)
{
switch (change)
{
case InputDeviceChange.Added:
Debug.Log("Added");
ChangeGamepadInfo();
break;
case InputDeviceChange.Removed:
Debug.Log("Removed");
ChangeGamepadInfo();
break;
}
}
};
}
private void ChangeGamepadInfo()
{
var allGamepads = Gamepad.all;
for (int i = 0; i < PlayerGamepad.Length; i++)
{
try
{
PlayerGamepad[i].text = allGamepads[i].name;
PlayerGamepadConnect[i].text = "Connected";
}
catch
{
PlayerGamepad[i].text = "Disconnected";
PlayerGamepadConnect[i].text = "Disconnected";
}
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 981455c989641cb4e8163b4bd36021b7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
using UnityEngine;
using UnityEngine.SceneManagement;
public class ScriptRestart : MonoBehaviour
{
public void Restart()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f33ddee681d6edc4b8256e368b7b7786
guid: 70a3291b94ab2f6458f4744ff7ce706c
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -1,10 +0,0 @@
using UnityEngine;
using UnityEngine.SceneManagement;
public class ScriptStartGame : MonoBehaviour
{
public void StartGame()
{
SceneManager.LoadScene(GameSetting.SelectedMap);
}
}

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 37e32468ad9546c468cf6e4a58bb8c00
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,38 +0,0 @@
using TMPro;
using UnityEngine;
public class ScriptMenuChangeNumberPlayers : MonoBehaviour
{
private TextMeshProUGUI text;
private void Awake()
{
text = gameObject.GetComponentInChildren<TextMeshProUGUI>();
}
private void Start()
{
if (GameSetting.OnePlayer)
{
text.text = "One Player";
}
else
{
text.text = "Two Player";
}
}
public void ChageNumberPlayersScript()
{
if (GameSetting.OnePlayer)
{
GameSetting.OnePlayer = false;
text.text = "Two Player";
}
else
{
GameSetting.OnePlayer = true;
text.text = "One Player";
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b6f64385e1cc12c41af39593bc7f68bb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,38 +0,0 @@
using TMPro;
using UnityEngine;
public class ScriptMenuChangeTime : MonoBehaviour
{
private TextMeshProUGUI text;
private void Awake()
{
text = gameObject.GetComponentInChildren<TextMeshProUGUI>();
}
private void Start()
{
if (GameSetting.isNight)
{
text.text = "Night";
}
else
{
text.text = "Day";
}
}
public void ChageNumberChangeTime()
{
if (GameSetting.isNight)
{
GameSetting.isNight = true;
text.text = "Night";
}
else
{
GameSetting.isNight = false;
text.text = "Day";
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 7e76c0215d817f7499896759a4f6c314
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,9 +0,0 @@
using UnityEngine;
public class ScriptMenuExitGame : MonoBehaviour
{
public void Exit()
{
Application.Quit();
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: e5e27c6445fe31c44809d2e2ae894700
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,53 +0,0 @@
using UnityEngine;
using UnityEngine.UI;
public class ScriptSelectMap : MonoBehaviour
{
[SerializeField] private Sprite [] images;
private Image currentImage;
private int maxNum;
private void Awake()
{
maxNum = images.Length;
currentImage = gameObject.GetComponent<Image>();
}
private void Start()
{
// todo
// придумать как убрать -1
ChangeMap();
}
private void ChangeMap()
{
currentImage.sprite = images[GameSetting.SelectedMap - 1];
}
public void ChangePlus()
{
if (GameSetting.SelectedMap == maxNum)
{
GameSetting.SelectedMap = 1;
}
else
{
GameSetting.SelectedMap++;
}
ChangeMap();
}
public void ChangeMinus()
{
if (GameSetting.SelectedMap == 1)
{
GameSetting.SelectedMap = maxNum;
}
else
{
GameSetting.SelectedMap--;
}
ChangeMap();
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: d2a1ac716f6f76544b3ea66128b6e25b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: