-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
732 additions
and
71 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
ManifestFileVersion: 0 | ||
CRC: 2386985233 | ||
CRC: 2742641410 | ||
AssetBundleManifest: | ||
AssetBundleInfos: | ||
Info_0: | ||
Name: shop | ||
Dependencies: {} | ||
Info_1: | ||
Name: loadingbar | ||
Dependencies: {} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
ManifestFileVersion: 0 | ||
CRC: 3049509670 | ||
Hashes: | ||
AssetFileHash: | ||
serializedVersion: 2 | ||
Hash: 2e5e38824854ae56f754be848fb8fa52 | ||
TypeTreeHash: | ||
serializedVersion: 2 | ||
Hash: 7c653b85788f9e6027325f678c0f4f02 | ||
HashAppended: 0 | ||
ClassTypes: | ||
- Class: 1 | ||
Script: {instanceID: 0} | ||
- Class: 4 | ||
Script: {instanceID: 0} | ||
- Class: 21 | ||
Script: {instanceID: 0} | ||
- Class: 23 | ||
Script: {instanceID: 0} | ||
- Class: 28 | ||
Script: {instanceID: 0} | ||
- Class: 48 | ||
Script: {instanceID: 0} | ||
- Class: 114 | ||
Script: {fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab, type: 3} | ||
- Class: 114 | ||
Script: {fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04, type: 3} | ||
- Class: 114 | ||
Script: {fileID: 11500000, guid: e27d931aa83cda344a1633cd123a82c9, type: 3} | ||
- Class: 115 | ||
Script: {instanceID: 0} | ||
- Class: 128 | ||
Script: {instanceID: 0} | ||
- Class: 212 | ||
Script: {instanceID: 0} | ||
- Class: 213 | ||
Script: {instanceID: 0} | ||
- Class: 224 | ||
Script: {instanceID: 0} | ||
- Class: 331 | ||
Script: {instanceID: 0} | ||
SerializeReferenceClassIdentifiers: | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.FaceInfo_Legacy | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.FontAssetCreationSettings | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.KerningTable | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.TMP_Character | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.TMP_FontFeatureTable | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.TMP_FontWeightPair | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.TMP_GlyphAdjustmentRecord | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.TMP_GlyphPairAdjustmentRecord | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.TMP_GlyphValueRecord | ||
- AssemblyName: Unity.TextMeshPro | ||
ClassName: TMPro.VertexGradient | ||
- AssemblyName: UnityEngine.CoreModule | ||
ClassName: UnityEngine.Events.PersistentCallGroup | ||
- AssemblyName: UnityEngine.TextCoreModule | ||
ClassName: UnityEngine.TextCore.FaceInfo | ||
- AssemblyName: UnityEngine.TextCoreModule | ||
ClassName: UnityEngine.TextCore.Glyph | ||
- AssemblyName: UnityEngine.TextCoreModule | ||
ClassName: UnityEngine.TextCore.GlyphMetrics | ||
- AssemblyName: UnityEngine.TextCoreModule | ||
ClassName: UnityEngine.TextCore.GlyphRect | ||
- AssemblyName: UnityEngine.UI | ||
ClassName: UnityEngine.UI.MaskableGraphic/CullStateChangedEvent | ||
Assets: | ||
- Assets/Prefabs/LoadingBar.prefab | ||
Dependencies: [] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
using LevelImposter.Core; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace LevelImposter.Builders | ||
{ | ||
/// <summary> | ||
/// Replaces String in the Translation Controller with Custom Text | ||
/// </summary> | ||
public class CustomTextBuilder : IElemBuilder | ||
{ | ||
private readonly Dictionary<string, StringNames> _customTextDB = new Dictionary<string, StringNames> | ||
{ | ||
{ "MedHello", StringNames.MedHello }, | ||
{ "SamplesPress", StringNames.SamplesPress }, | ||
{ "SamplesSelect", StringNames.SamplesSelect }, | ||
{ "MedETA", StringNames.MedETA }, | ||
{ "BadResult", StringNames.BadResult }, | ||
{ "SamplesThanks", StringNames.SamplesThanks }, | ||
{ "SamplesComplete", StringNames.SamplesComplete }, | ||
{ "More", StringNames.More }, | ||
{ "SamplesAdding", StringNames.SamplesAdding }, | ||
{ "TakeBreak", StringNames.TakeBreak }, | ||
{ "GrabCoffee", StringNames.GrabCoffee }, | ||
{ "DontNeedWait", StringNames.DontNeedWait }, | ||
{ "DoSomethingElse", StringNames.DoSomethingElse }, | ||
{ "ReactorNominal", StringNames.ReactorNominal }, | ||
{ "ReactorHoldToStop", StringNames.ReactorHoldToStop }, | ||
{ "ReactorWaiting", StringNames.ReactorWaiting }, | ||
}; | ||
|
||
public void Build(LIElement elem, GameObject obj) | ||
{ | ||
// Get Custom Text | ||
var customText = elem.properties.customText; | ||
if (customText == null || customText.Count <= 0) | ||
return; | ||
|
||
// ShipStatus | ||
var shipStatus = LIShipStatus.Instance; | ||
if (shipStatus == null) | ||
throw new MissingShipException(); | ||
|
||
// Replace Custom Text | ||
foreach (var (textID, text) in customText) | ||
{ | ||
// Skip Empty Text | ||
if (string.IsNullOrEmpty(textID) || string.IsNullOrEmpty(text)) | ||
continue; | ||
|
||
// Find String Name | ||
bool hasTextID = _customTextDB.TryGetValue(textID, out StringNames stringName); | ||
if (!hasTextID) | ||
{ | ||
LILogger.Warn($"Unknown custom text '{textID}'"); | ||
continue; | ||
} | ||
|
||
// Replace Text | ||
shipStatus.Renames.Add(stringName, text); | ||
LILogger.Info($"Custom Text '{stringName}' >>> '{text}'"); | ||
} | ||
|
||
} | ||
|
||
public void PostBuild() { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using LevelImposter.Core; | ||
using UnityEngine; | ||
|
||
namespace LevelImposter.Builders | ||
{ | ||
public class TriggerDeathBuilder : IElemBuilder | ||
{ | ||
public void Build(LIElement elem, GameObject obj) | ||
{ | ||
if (elem.type != "util-triggerdeath") | ||
return; | ||
|
||
// Colliders | ||
Collider2D[] colliders = obj.GetComponentsInChildren<Collider2D>(); | ||
foreach (Collider2D collider in colliders) | ||
collider.isTrigger = true; | ||
|
||
// Trigger Area | ||
LIDeathArea deathArea = obj.AddComponent<LIDeathArea>(); | ||
deathArea.SetCreateDeadBody(elem.properties.createDeadBody ?? true); | ||
} | ||
|
||
public void PostBuild() { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using LevelImposter.Core; | ||
using UnityEngine; | ||
|
||
namespace LevelImposter.Builders | ||
{ | ||
public class TriggerShakeBuilder : IElemBuilder | ||
{ | ||
public void Build(LIElement elem, GameObject obj) | ||
{ | ||
if (elem.type != "util-triggershake") | ||
return; | ||
|
||
// Colliders | ||
Collider2D[] colliders = obj.GetComponentsInChildren<Collider2D>(); | ||
foreach (Collider2D collider in colliders) | ||
collider.isTrigger = true; | ||
|
||
// Trigger Area | ||
LIShakeArea shakeArea = obj.AddComponent<LIShakeArea>(); | ||
shakeArea.SetParameters( | ||
elem.properties.shakeAmount ?? 0.03f, | ||
elem.properties.shakePeriod ?? 400.0f | ||
); | ||
} | ||
|
||
public void PostBuild() { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.