HKI Core
HKI Core
Loc
LocalizationSystem.cs
Go to the documentation of this file.
1
#pragma warning disable 0414
2
using
UnityEngine
;
3
using
System
.Collections.Generic;
4
using
HKI
.
Core
.
Init
;
5
using
HKI
.
Core
.
Settings
;
6
7
namespace
HKI
.Core.Loc
8
{
12
public
class
LocalizationSystem
: ScriptableObject,
IInit
13
{
14
// Public variables
15
[SerializeField]
TextLocalization
TextLocalizationTemplate = null;
16
[SerializeField]
AudioLocalization
AudioLocalizationTemplate = null;
17
18
[SerializeField] List<TextLocalization> TextLocalizationContainer =
new
List<TextLocalization>();
19
[SerializeField] List<AudioLocalization> AudioLocalizationContainer =
new
List<AudioLocalization>();
20
21
// Init function
22
public
void
Init
()
23
{
24
25
}
26
27
// Inteface function
28
public
TextLocalization
FindTextLocalization
(
string
tag)
29
{
30
for
(
int
i = TextLocalizationContainer.Count - 1; i >= 0; i--)
31
{
32
if
(TextLocalizationContainer[i].name == tag)
33
return
TextLocalizationContainer[i];
34
}
35
36
return
null;
37
}
38
39
public
AudioLocalization
FindAudioLocalization
(
string
tag)
40
{
41
for
(
int
i = AudioLocalizationContainer.Count - 1; i >= 0; i--)
42
{
43
if
(AudioLocalizationContainer[i].name == tag)
44
return
AudioLocalizationContainer[i];
45
}
46
47
return
null;
48
}
49
}
50
}
HKI.Core
HKI.Core.Init.IInit
This interface allows the initialization of anything by the Initialzer.
Definition:
IInit.cs:8
HKI.Core.Loc.TextLocalization
This ScriptableObject contains as a container for all text localization information.
Definition:
TextLocalization.cs:10
System
HKI.Core.Loc.LocalizationSystem
This ScriptableObject holds the data for all localization. Most of its functionality is implemented b...
Definition:
LocalizationSystem.cs:12
HKI.Core.Init
HKI.Core.Settings
HKI.Core.Loc.LocalizationSystem.FindAudioLocalization
AudioLocalization FindAudioLocalization(string tag)
Definition:
LocalizationSystem.cs:39
HKI.Core.Loc.LocalizationSystem.Init
void Init()
Definition:
LocalizationSystem.cs:22
UnityEngine
HKI.Core.Loc.LocalizationSystem.FindTextLocalization
TextLocalization FindTextLocalization(string tag)
Definition:
LocalizationSystem.cs:28
HKI
HKI.Core.Loc.AudioLocalization
This ScriptableObject contains as a container for all audio localization information.
Definition:
AudioLocalization.cs:11
Generated by
1.8.13