Catch of the day 20240520 (#954)

* default color override

* reversions

* fixed the animations, committing one last time before the upscale

* minor errors

* the upscale doesn't work. also bugfixes

* couple things i missed
This commit is contained in:
playinful 2024-05-20 19:40:59 -04:00 committed by GitHub
parent 07ccfd7bfa
commit f3c5e7b3e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 87923 additions and 77537 deletions

View file

@ -58,7 +58,7 @@ GameObject:
- component: {fileID: 8426454068735829380}
- component: {fileID: 1802914307908322209}
m_Layer: 0
m_Name: CatchOfTheDay
m_Name: catchOfTheDay
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -78,6 +78,7 @@ Transform:
m_Children:
- {fileID: 4634833702056322427}
- {fileID: 7723273551500933620}
- {fileID: 2818073722642125740}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -98,6 +99,14 @@ MonoBehaviour:
Angler: {fileID: 1182995623549289263}
LakeScenePrefab: {fileID: 7031810916068253247, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
LakeSceneHolder: {fileID: 4634833702056322427}
_TopColors:
- {r: 0.70980394, g: 0.8705883, b: 0.8705883, a: 1}
- {r: 0.70980394, g: 0.8745099, b: 0.6784314, a: 1}
- {r: 0.8705883, g: 0.8705883, b: 0.6784314, a: 1}
_BottomColors:
- {r: 0.4666667, g: 0.7372549, b: 0.8196079, a: 1}
- {r: 0.3529412, g: 0.7137255, b: 0.48235297, a: 1}
- {r: 0.70980394, g: 0.627451, b: 0.41960788, a: 1}
AnglerTransform: {fileID: 4349535315128336147}
_StickyCanvas: {fileID: 2247341267177786474}
--- !u!1 &1618518225377962056
@ -973,6 +982,37 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &4390065670873110041
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2818073722642125740}
m_Layer: 0
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2818073722642125740
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4390065670873110041}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 8.883, y: -0.02, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8426454068735829380}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &4834162464390078830
GameObject:
m_ObjectHideFlags: 0
@ -3049,6 +3089,10 @@ PrefabInstance:
propertyPath: m_Layer
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2884346302206887626, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2884730572189615003, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: m_Layer
value: 0
@ -4389,6 +4433,10 @@ PrefabInstance:
propertyPath: m_Layer
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5550615216608200862, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5554715371012578784, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: m_Layer
value: 0
@ -4953,6 +5001,14 @@ PrefabInstance:
propertyPath: IsDummy
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6727980822855321933, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: XXXXXXXXXXXX
value:
objectReference: {fileID: 5603933457609349627}
- target: {fileID: 6727980822855321933, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: FishSchoolHolder
value:
objectReference: {fileID: 7497580079990425751}
- target: {fileID: 6731707513831972095, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: m_Layer
value: 0
@ -5113,6 +5169,10 @@ PrefabInstance:
propertyPath: m_Name
value: LakeScene
objectReference: {fileID: 0}
- target: {fileID: 7031810916068253247, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7033415981174504355, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: m_Layer
value: 0
@ -5129,6 +5189,10 @@ PrefabInstance:
propertyPath: m_Layer
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7075225906441527770, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: m_SortingOrder
value: -32768
objectReference: {fileID: 0}
- target: {fileID: 7075225906441527770, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
propertyPath: m_SpriteSortPoint
value: 0
@ -6087,8 +6151,18 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
--- !u!1 &5603933457609349627 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2884346302206887626, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
m_PrefabInstance: {fileID: 7332540138187890481}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6845776578194601929 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4234368678986115320, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
m_PrefabInstance: {fileID: 7332540138187890481}
m_PrefabAsset: {fileID: 0}
--- !u!4 &7497580079990425751 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 994920842471430054, guid: 85290dc3ea9c9e241b6da3b302a5da7c, type: 3}
m_PrefabInstance: {fileID: 7332540138187890481}
m_PrefabAsset: {fileID: 0}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 312cb925466f01449a182b3802d57f0a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 KiB

After

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6dbfdd7288e1f7248bc33e6399af1c1d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d0085a3172e614742968f6d0015257bb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -44,13 +44,13 @@ AnimatorStateMachine:
m_Position: {x: 250, y: 50, z: 0}
- serializedVersion: 1
m_State: {fileID: 5444674113483754503}
m_Position: {x: 250, y: 150, z: 0}
m_Position: {x: 250, y: 100, z: 0}
- serializedVersion: 1
m_State: {fileID: 6087527129450089231}
m_Position: {x: 250, y: 200, z: 0}
m_Position: {x: 250, y: 150, z: 0}
- serializedVersion: 1
m_State: {fileID: -3481407283309479541}
m_Position: {x: 480, y: 200, z: 0}
m_Position: {x: 480, y: 150, z: 0}
- serializedVersion: 1
m_State: {fileID: -3044003933807299578}
m_Position: {x: 250, y: 250, z: 0}
@ -71,19 +71,19 @@ AnimatorStateMachine:
m_Position: {x: 480, y: 300, z: 0}
- serializedVersion: 1
m_State: {fileID: 4356963092261834522}
m_Position: {x: 710, y: -10, z: 0}
m_Position: {x: 710, y: -60, z: 0}
- serializedVersion: 1
m_State: {fileID: -7755883792344508314}
m_Position: {x: 710, y: 50, z: 0}
m_Position: {x: 710, y: 0, z: 0}
- serializedVersion: 1
m_State: {fileID: -6929494436564138092}
m_Position: {x: 710, y: 100, z: 0}
m_Position: {x: 710, y: 50, z: 0}
- serializedVersion: 1
m_State: {fileID: 1808387700593548855}
m_Position: {x: 710, y: 150, z: 0}
m_Position: {x: 710, y: 100, z: 0}
- serializedVersion: 1
m_State: {fileID: 2073938479257593203}
m_Position: {x: 710, y: 200, z: 0}
m_Position: {x: 710, y: 150, z: 0}
- serializedVersion: 1
m_State: {fileID: -6188104657850371234}
m_Position: {x: 710, y: 250, z: 0}
@ -95,7 +95,7 @@ AnimatorStateMachine:
m_Position: {x: 710, y: 300, z: 0}
- serializedVersion: 1
m_State: {fileID: 4586150421227050101}
m_Position: {x: 940, y: 200, z: 0}
m_Position: {x: 940, y: 150, z: 0}
- serializedVersion: 1
m_State: {fileID: 1449823165430474521}
m_Position: {x: 940, y: 250, z: 0}
@ -141,6 +141,12 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: 6195784825912013836}
m_Position: {x: 480, y: 410, z: 0}
- serializedVersion: 1
m_State: {fileID: -8431802180753770814}
m_Position: {x: 250, y: 200, z: 0}
- serializedVersion: 1
m_State: {fileID: -3027920554451827922}
m_Position: {x: 710, y: 200, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
@ -151,6 +157,33 @@ AnimatorStateMachine:
m_ExitPosition: {x: 40, y: 150, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 2635217359475157101}
--- !u!1102 &-8431802180753770814
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Fish1_JustM
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1484694533059393672}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 6dbfdd7288e1f7248bc33e6399af1c1d, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-8410977862906674950
AnimatorStateTransition:
m_ObjectHideFlags: 1
@ -565,6 +598,33 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &-3027920554451827922
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Fish2_JustM
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: -1009147449646688414}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: d0085a3172e614742968f6d0015257bb, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &-1611024120095190332
AnimatorState:
serializedVersion: 6
@ -667,6 +727,28 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-1009147449646688414
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 4586150421227050101}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 1
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-983314641931359044
AnimatorState:
serializedVersion: 6
@ -846,6 +928,28 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &1484694533059393672
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -3481407283309479541}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 1
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1808387700593548855
AnimatorState:
serializedVersion: 6

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

After

Width:  |  Height:  |  Size: 194 KiB

View file

@ -1625,7 +1625,7 @@ TextureImporter:
width: 225
height: 118
alignment: 0
pivot: {x: 0, y: 0}
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
@ -1637,6 +1637,48 @@ TextureImporter:
indices:
edges: []
weights: []
- serializedVersion: 2
name: fish02_hook01m
rect:
serializedVersion: 2
x: 473
y: 1
width: 166
height: 118
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 2e06a04d8fd4d014c81722ae14d8428f
internalID: 1854878303
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: fish01_hook01m
rect:
serializedVersion: 2
x: 641
y: 1
width: 126
height: 110
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 302cf4eef490eff4d86fbe62ce86077b
internalID: -850896915
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
@ -1678,6 +1720,7 @@ TextureImporter:
fin03_07: 369149539
fin03_08: 1770331907
fish01_hook01: -1937665821
fish01_hook01m: -850896915
fish01_hook02: -650927591
fish01_out01: -633689759
fish01_out02: -1578983422
@ -1687,6 +1730,7 @@ TextureImporter:
fish01_wait03: -113083632
fish02_bite: -1276106060
fish02_hook01: -1447049888
fish02_hook01m: 1854878303
fish02_hook02: -291158108
fish02_pick01: -580183698
fish02_pick02: 2068174086

View file

@ -92,8 +92,27 @@ namespace HeavenStudio.Games.Loaders
new Param.CollapseParam((x, _) => (bool)x, new string[] { "fishDensity" })
}),
new Param("fishDensity", new EntityTypes.Float(0f, 1f, 1f), "Fish Density", "Set the density for the fish in the school."),
new Param("crossfade", true, "Crossfade", "Set whether or not this scene will fade smoothly into the next one."),
},
},
new GameAction("color", "Default Color Override")
{
function = delegate { var e = eventCaller.currentEntity; CatchOfTheDay.Instance.DefaultColorOverride(e["override"], e["topColorA"], e["bottomColorA"], e["topColorB"], e["bottomColorB"], e["topColorC"], e["bottomColorC"]); },
defaultLength = 0.5f,
parameters = new List<Param>()
{
new Param("override", true, "Override", "Set whether or not to use a set of overridden colors.", new List<Param.CollapseParam>()
{
new Param.CollapseParam((x, _) => (bool)x, new string[] { "topColorA", "bottomColorA", "topColorB", "bottomColorB", "topColorC", "bottomColorC" })
}),
new Param("topColorA", new Color(0.7098039f, 0.8705882f, 0.8705882f), "Top Color A", "Set the top color for Layout A."),
new Param("bottomColorA", new Color(0.4666667f, 0.7372549f, 0.8196079f), "Bottom Color A", "Set the bottom color for Layout A."),
new Param("topColorB", new Color(0.7098039f, 0.8745099f, 0.6784314f), "Top Color B", "Set the top color for Layout B."),
new Param("bottomColorB", new Color(0.3529412f, 0.7137255f, 0.482353f), "Bottom Color B", "Set the bottom color for Layout B."),
new Param("topColorC", new Color(0.8705883f, 0.8705883f, 0.6784314f), "Top Color C", "Set the top color for Layout C."),
new Param("bottomColorC", new Color(0.7098039f, 0.627451f, 0.4196079f), "Bottom Color C", "Set the bottom color for Layout C."),
}
},
new GameAction("moveAngler", "Move Angler")
{
function = delegate { var e = eventCaller.currentEntity; CatchOfTheDay.Instance.SetAnglerMovement(e); },
@ -171,6 +190,13 @@ namespace HeavenStudio.Games
[SerializeField] GameObject LakeScenePrefab;
[SerializeField] Transform LakeSceneHolder;
[SerializeField] Color[] _TopColors;
[SerializeField] Color[] _BottomColors;
private Color[] TopColorOverrides = null;
private Color[] BottomColorOverrides = null;
public Color[] TopColors => TopColorOverrides ?? _TopColors;
public Color[] BottomColors => BottomColorOverrides ?? _BottomColors;
public int? LastLayout;
public Dictionary<RiqEntity, LakeScene> ActiveLakes = new();
@ -269,8 +295,14 @@ namespace HeavenStudio.Games
}
public override void OnGameSwitch(double beat)
{
_AllFishes = null;
ActiveLakes = new Dictionary<RiqEntity, LakeScene>();
DestroyOrphanedLakes();
CleanupFishSounds();
FishSounds = new Dictionary<RiqEntity, MultiSound>();
TopColorOverrides = null;
BottomColorOverrides = null;
_AnglerIsMoving = _AnglerIsRotating = _AnglerIsScaling = false;
// set ann movement
foreach (RiqEntity e in EventCaller.GetAllInGameManagerList("catchOfTheDay", new string[] { "moveAngler" }).Where(e => e.beat <= beat).OrderBy(e => e.beat))
@ -278,6 +310,11 @@ namespace HeavenStudio.Games
SetAnglerMovement(e);
}
if (EventCaller.GetAllInGameManagerList("catchOfTheDay", new string[] { "color" }).LastOrDefault(e => e.beat <= beat) is RiqEntity colorEntity)
{
DefaultColorOverride(colorEntity["override"], colorEntity["topColorA"], colorEntity["bottomColorA"], colorEntity["topColorB"], colorEntity["bottomColorB"], colorEntity["topColorC"], colorEntity["bottomColorC"]);
}
// get active fishes
foreach (RiqEntity e in GetActiveFishes(beat))
{
@ -388,6 +425,19 @@ namespace HeavenStudio.Games
}
_StickyCanvas.Sticky = (bool)e["sticky"];
}
public void DefaultColorOverride(bool doOverride, Color topColorA, Color bottomColorA, Color topColorB, Color bottomColorB, Color topColorC, Color bottomColorC)
{
if (doOverride)
{
TopColorOverrides = new Color[] { topColorA, topColorB, topColorC };
BottomColorOverrides = new Color[] { bottomColorA, bottomColorB, bottomColorC };
}
else
{
TopColorOverrides = null;
BottomColorOverrides = null;
}
}
public void DoPickAnim()
{
@ -477,6 +527,8 @@ namespace HeavenStudio.Games
RiqEntity nextFish = GetNextFish(beat);
if (nextFish is not null)
{
if (EventCaller.GetAllInGameManagerList("catchOfTheDay", new string[] { "color" }).LastOrDefault(e => e.beat >= beat && e.beat <= nextFish.beat) is RiqEntity e)
DefaultColorOverride(e["override"], e["topColorA"], e["bottomColorA"], e["topColorB"], e["bottomColorB"], e["topColorC"], e["bottomColorC"]);
NewLake(nextFish);
return true;
}

View file

@ -24,9 +24,6 @@ namespace HeavenStudio.Games.Scripts_CatchOfTheDay
[SerializeField] public GameObject[] SchoolFishes;
[SerializeField] public ParticleSystem[] Bubbles;
[SerializeField] Color[] TopColors;
[SerializeField] Color[] BottomColors;
public RiqEntity Entity;
public PlayerActionEvent ReelAction;
public CatchOfTheDay Minigame;
@ -162,7 +159,7 @@ namespace HeavenStudio.Games.Scripts_CatchOfTheDay
}
else
{
SetBGColors(TopColors[layout], BottomColors[layout]);
SetBGColors(minigame.TopColors[layout], minigame.BottomColors[layout]);
}
float xOffset = UnityEngine.Random.Range(-0.5f, 0.5f);