Создана настройка времени игры. Настройка прокинута
This commit is contained in:
parent
77f5faf81e
commit
7747f4d1bb
@ -15,3 +15,4 @@ MonoBehaviour:
|
||||
groups:
|
||||
- {fileID: 11400000, guid: 46abc04d789400c4aaf30032a41ac671, type: 2}
|
||||
- {fileID: 11400000, guid: 33eedb5a0b075344197dbb7e1499e5cd, type: 2}
|
||||
- {fileID: 11400000, guid: 7df7a63a64fadd14996b1d4a199b5d7b, type: 2}
|
||||
|
||||
8
Assets/Data/Settings/Игровой процесс.meta
Normal file
8
Assets/Data/Settings/Игровой процесс.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a328f2a59d3662e429d22aafbb2a35b8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
40
Assets/Data/Settings/Игровой процесс/Время игры.asset
Normal file
40
Assets/Data/Settings/Игровой процесс/Время игры.asset
Normal file
@ -0,0 +1,40 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c97246c0e3a7eff46acd53fd591fb800, type: 3}
|
||||
m_Name: "\u0412\u0440\u0435\u043C\u044F \u0438\u0433\u0440\u044B"
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Setting
|
||||
Type: 2
|
||||
Id: PlayTime
|
||||
Alias: "\u0412\u0440\u0435\u043C\u044F \u0438\u0433\u0440\u044B"
|
||||
Description:
|
||||
BoolValue: 0
|
||||
IntValue: 0
|
||||
IntMin: 0
|
||||
IntMax: 0
|
||||
IntStep: 0
|
||||
FloatValue: 0
|
||||
FloatMin: 0
|
||||
FloatMax: 0
|
||||
FloatStep: 0
|
||||
StringValue:
|
||||
AllowedValues:
|
||||
- "\u041D\u0435\u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E"
|
||||
- "2 \u043C\u0438\u043D."
|
||||
- "3 \u043C\u0438\u043D."
|
||||
- "4 \u043C\u0438\u043D."
|
||||
- "5 \u043C\u0438\u043D."
|
||||
- "6 \u043C\u0438\u043D."
|
||||
- "7 \u043C\u0438\u043D."
|
||||
- "8 \u043C\u0438\u043D."
|
||||
- "9 \u043C\u0438\u043D."
|
||||
- "10 \u043C\u0438\u043D."
|
||||
SignalValue:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b422bfe158c008941ba66a4473f89807
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,18 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2ea1983628bbc4c4c8dfdc2a1637e058, type: 3}
|
||||
m_Name: "\u0413\u0440\u0443\u043F\u043F\u0430 \u0418\u0433\u0440\u043E\u0432\u043E\u0439\u041F\u0440\u043E\u0446\u0435\u0441\u0441"
|
||||
m_EditorClassIdentifier: Assembly-CSharp::SettingsGroup
|
||||
Name: "\u0418\u0433\u0440\u043E\u0432\u043E\u0439 \u043F\u0440\u043E\u0446\u0435\u0441\u0441"
|
||||
IconPath: SettingIcons/Gameplay
|
||||
Settings:
|
||||
- {fileID: 11400000, guid: b422bfe158c008941ba66a4473f89807, type: 2}
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7df7a63a64fadd14996b1d4a199b5d7b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/SettingIcons/Gameplay.png
(Stored with Git LFS)
Normal file
BIN
Assets/Resources/SettingIcons/Gameplay.png
(Stored with Git LFS)
Normal file
Binary file not shown.
130
Assets/Resources/SettingIcons/Gameplay.png.meta
Normal file
130
Assets/Resources/SettingIcons/Gameplay.png.meta
Normal file
@ -0,0 +1,130 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46dab9d90ce62254d8b54b68dba60035
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 1
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,4 +1,7 @@
|
||||
/// <summary>
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Для склонений валюты
|
||||
/// </summary>
|
||||
public class PluralizeUtil
|
||||
@ -42,4 +45,21 @@ public class PluralizeUtil
|
||||
_ => "жетонов"
|
||||
};
|
||||
}
|
||||
|
||||
public static int PlaytimeToMinutes(string playtime)
|
||||
{
|
||||
if (playtime == "Неограниченно") return 0;
|
||||
|
||||
try
|
||||
{
|
||||
string textNumber = playtime.Split(' ')[0];
|
||||
int minutes = int.Parse(textNumber);
|
||||
return minutes;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.Log($"Ошибка парсинга значения {playtime}");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ public static class G
|
||||
public static PlayerStateModel PlayerStateModel { get; private set; }
|
||||
public static DangersModel DangersModel { get; private set; }
|
||||
|
||||
public static EndGameConditionChecker EndGameChecker;
|
||||
|
||||
public static void Initialize(Player player, Health playerHealth, List<EnemyShip> enemyPrefabsToSpawn)
|
||||
{
|
||||
@ -15,6 +16,10 @@ public static class G
|
||||
ScoreModel = new ScoreModel(enemyPrefabsToSpawn);
|
||||
PlayerStateModel = new PlayerStateModel(player, playerHealth);
|
||||
DangersModel = new DangersModel();
|
||||
|
||||
string playtime = SettingsManager.GetString(SettingKey.PlayTime, "2 мин.");
|
||||
int sessionTimeMinutes = PluralizeUtil.PlaytimeToMinutes(playtime);
|
||||
EndGameChecker = new EndGameConditionChecker(WeaponModel, playerHealth, sessionTimeMinutes);
|
||||
}
|
||||
|
||||
public static void Clear()
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
public const string Freeplay = "Freeplay";
|
||||
public const string Valuta = "Valuta";
|
||||
|
||||
|
||||
//Игровой процесс
|
||||
public const string PlayTime = "PlayTime";
|
||||
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user