rename to cannery and The Cannery, respectively

This commit is contained in:
AstrlJelly 2024-01-23 12:21:27 -05:00
parent bee4882c2d
commit 58238f0484
46 changed files with 47 additions and 165 deletions

View file

@ -51,5 +51,5 @@
"temp/": true,
"Temp/": true
},
"dotnet.defaultSolution": "HeavenStudio.sln"
"dotnet.defaultSolution": "HeavenStudio-AstrlJelly.sln"
}

View file

@ -716,7 +716,7 @@ GameObject:
- component: {fileID: 5813499711186931250}
- component: {fileID: 6610104882394386402}
m_Layer: 0
m_Name: rhythmCannery
m_Name: cannery
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View file

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

View file

@ -18,5 +18,5 @@ AudioImporter:
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -18,5 +18,5 @@ AudioImporter:
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -4,5 +4,5 @@ NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

View file

@ -1,123 +0,0 @@
fileFormatVersion: 2
guid: aedadf3d50bf65142a6f9dea9db3c4e6
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 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: 1
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
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName: mobcannery/common
assetBundleVariant:

View file

@ -5,7 +5,7 @@ using NaughtyBezierCurves;
using HeavenStudio.Util;
namespace HeavenStudio.Games.Scripts_RhythmCannery
namespace HeavenStudio.Games.Scripts_Cannery
{
public class Can : MonoBehaviour
{
@ -19,11 +19,11 @@ namespace HeavenStudio.Games.Scripts_RhythmCannery
[SerializeField] Sprite[] canSprites;
[SerializeField] Sprite cannedSprite;
RhythmCannery game;
Cannery game;
private void Awake()
{
game = RhythmCannery.instance;
game = Cannery.instance;
int random = Random.Range(0, 2);
Debug.Log(random);
sr.sprite = canSprites[random];
@ -42,7 +42,7 @@ namespace HeavenStudio.Games.Scripts_RhythmCannery
private void Hit(PlayerActionEvent caller, float state)
{
game.cannerAnim.DoScaledAnimationAsync("Can", 0.5f);
SoundByte.PlayOneShotGame("rhythmCannery/can");
SoundByte.PlayOneShotGame("cannery/can");
sr.sprite = cannedSprite;
}
}

View file

@ -7,15 +7,15 @@ using UnityEngine;
namespace HeavenStudio.Games.Loaders
{
using static Minigames;
public static class MobRhythmCanneryLoader
public static class MobCanneryLoader
{
public static Minigame AddGame(EventCaller eventCaller)
{
return new Minigame("rhythmCannery", "Rhythm Cannery", "554899", false, false, new List<GameAction>()
return new Minigame("cannery", "The Cannery", "554899", false, false, new List<GameAction>()
{
new GameAction("bop", "Bop")
{
function = delegate { RhythmCannery.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, eventCaller.currentEntity["auto"], eventCaller.currentEntity["toggle"]); },
function = delegate { Cannery.instance.Bop(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, eventCaller.currentEntity["auto"], eventCaller.currentEntity["toggle"]); },
parameters = new List<Param>()
{
new Param("toggle", true, "Bop", "Toggle if the alarm should bop for the duration of this event."),
@ -25,16 +25,16 @@ namespace HeavenStudio.Games.Loaders
new GameAction("can", "Can")
{
preFunction = delegate {
RhythmCannery.CanSFX(eventCaller.currentEntity.beat);
if (GameManager.instance.currentGame == "rhythmCannery") {
RhythmCannery.instance.SendCan(eventCaller.currentEntity.beat);
Cannery.CanSFX(eventCaller.currentEntity.beat);
if (GameManager.instance.currentGame == "cannery") {
Cannery.instance.SendCan(eventCaller.currentEntity.beat);
}
},
defaultLength = 2,
},
new GameAction("blackout", "Blackout")
{
function = delegate { RhythmCannery.instance.Blackout(); },
function = delegate { Cannery.instance.Blackout(); },
defaultLength = 0.5f,
},
}
@ -50,8 +50,8 @@ namespace HeavenStudio.Games.Loaders
namespace HeavenStudio.Games
{
using Jukebox;
using Scripts_RhythmCannery;
public class RhythmCannery : Minigame
using Scripts_Cannery;
public class Cannery : Minigame
{
[Header("Objects")]
[SerializeField] GameObject canGO;
@ -65,7 +65,7 @@ namespace HeavenStudio.Games
private bool alarmBop = true;
public static RhythmCannery instance;
public static Cannery instance;
void Awake()
{
@ -80,7 +80,7 @@ namespace HeavenStudio.Games
public override void OnGameSwitch(double beat)
{
List<RiqEntity> cans = GameManager.instance.Beatmap.Entities.FindAll(e => e.datamodel == "rhythmCannery/can" && beat > e.beat && beat < e.beat + 1);
List<RiqEntity> cans = GameManager.instance.Beatmap.Entities.FindAll(e => e.datamodel == "cannery/can" && beat > e.beat && beat < e.beat + 1);
foreach (var can in cans) {
SendCan(can.beat);
}
@ -101,27 +101,25 @@ namespace HeavenStudio.Games
public void Bop(double beat, float length, bool auto, bool bop)
{
alarmBop = auto;
if (!bop) return;
List<BeatAction.Action> actions = new();
for (int i = 0; i < length; i++)
{
actions.Add(new(beat + i, delegate { alarmAnim.DoScaledAnimationAsync("Bop", 0.5f); }));
if (bop) {
List<BeatAction.Action> actions = new();
for (int i = 0; i < length; i++) {
actions.Add(new(beat + i, delegate { alarmAnim.DoScaledAnimationAsync("Bop", 0.5f); }));
}
if (actions.Count > 0) BeatAction.New(this, actions);
}
if (actions.Count > 0) BeatAction.New(this, actions);
}
public static void CanSFX(double beat)
{
SoundByte.PlayOneShotGame("rhythmCannery/ding", beat);
SoundByte.PlayOneShotGame("cannery/ding", beat);
}
public void SendCan(double beat)
{
// dingAnim.DoScaledAnimationFromBeatAsync("Ding", 0.5f, beat);
// do the ding animation on the beat
BeatAction.New(this, new() { new(beat, delegate { dingAnim.DoScaledAnimationAsync("Ding", 0.5f); }) });
BeatAction.New(this, new() { new(beat, delegate { dingAnim.DoScaledAnimationFromBeatAsync("Ding", 0.5f, beat); }) });
Can newCan = Instantiate(canGO, transform).GetComponent<Can>();
newCan.startBeat = beat;

View file

@ -343,8 +343,8 @@ namespace HeavenStudio
Debug.LogWarning("Game loader AgbQuizShowLoader failed!");
}
Debug.Log("Running game loader MobRhythmCanneryLoader");
game = MobRhythmCanneryLoader.AddGame(eventCaller);
Debug.Log("Running game loader MobCanneryLoader");
game = MobCanneryLoader.AddGame(eventCaller);
if (game != null)
{
eventCaller.minigames.Add(game.name, game);

View file

@ -17,7 +17,6 @@ MonoBehaviour:
DenseViewWidthThreshold: 512
_disableAutoReloadInBackground: 0
ImportedScriptPaths:
- Assets/Scripts/Games/RhythmCannery/RhythmCannery.cs
- Assets/Scripts/Games/RhythmCannery/Can.cs
PathsToSkipImportEvent: []
PathsToIgnoreOverwriteSettingOnAttribute: []