Sneaky Spirits

Start to work on Sneaky Spririts GBA
This commit is contained in:
Amy54Desu 2023-01-11 20:42:56 -05:00
parent 6432a587e5
commit 44a53cc353
4 changed files with 450 additions and 7 deletions

View file

@ -1,5 +1,68 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &342871442267255755
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3345437363889674638}
m_Layer: 0
m_Name: Arrow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &3345437363889674638
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 342871442267255755}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5230273791477394387}
- {fileID: 3725758780588345187}
- {fileID: 3271870006979916446}
m_Father: {fileID: 7380707858405245991}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1298519759613445260
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3374235489800584098}
m_Layer: 0
m_Name: Spawn Root
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3374235489800584098
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1298519759613445260}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.9177685, y: -2.5447583, z: -6.401953}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6485095134079790937}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1628995950578524637
GameObject:
m_ObjectHideFlags: 0
@ -70,7 +133,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
m_SortingOrder: -100
m_Sprite: {fileID: -4642526416399738743, guid: ca4775e289092c04791daaf42e19cacb, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
@ -4888,6 +4951,262 @@ ParticleSystemRenderer:
m_Mesh2: {fileID: 0}
m_Mesh3: {fileID: 0}
m_MaskInteraction: 0
--- !u!1 &2150974300048642304
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5230273791477394387}
m_Layer: 0
m_Name: Bow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5230273791477394387
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2150974300048642304}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3345437363889674638}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2616588123195539979
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3271870006979916446}
- component: {fileID: 5847197210697432339}
m_Layer: 0
m_Name: Button Prompt
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3271870006979916446
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2616588123195539979}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3345437363889674638}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &5847197210697432339
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2616588123195539979}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 5
m_Sprite: {fileID: -2030388055127388068, guid: ca4775e289092c04791daaf42e19cacb, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.95, y: 0.63}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &3083250712199563003
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3725758780588345187}
m_Layer: 0
m_Name: Arrow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3725758780588345187
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3083250712199563003}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 3345437363889674638}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5629288301496021772
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7783755712010897486}
m_Layer: 0
m_Name: Spirit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7783755712010897486
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5629288301496021772}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7380707858405245991}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5877611500169024775
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7380707858405245991}
- component: {fileID: 4574902522549252608}
m_Layer: 0
m_Name: Interactables
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7380707858405245991
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5877611500169024775}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1.8036634, y: -1.9249688, z: -1.9204786}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 7783755712010897486}
- {fileID: 3345437363889674638}
m_Father: {fileID: 6485095134079790937}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &4574902522549252608
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5877611500169024775}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 0
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &5978947520421643003
GameObject:
m_ObjectHideFlags: 0
@ -9826,7 +10145,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
m_SortingOrder: -100
m_Sprite: {fileID: 334154914554335797, guid: ca4775e289092c04791daaf42e19cacb, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
@ -9868,6 +10187,8 @@ Transform:
m_Children:
- {fileID: 4558759897136001682}
- {fileID: 648017749031410756}
- {fileID: 7380707858405245991}
- {fileID: 3374235489800584098}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -9883,9 +10204,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1f3e68a6616f5224ea69b11d1199ae63, type: 3}
m_Name:
m_EditorClassIdentifier:
SoundSequences: []
EligibleHits: []
scheduledInputs: []
firstEnable: 0
SpawnRoot: {fileID: 3374235489800584098}
SneakySpirit: {fileID: 5629288301496021772}
Arrow: {fileID: 342871442267255755}
--- !u!1 &7942869944722116910
GameObject:
m_ObjectHideFlags: 0
@ -9956,7 +10281,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
m_SortingOrder: -100
m_Sprite: {fileID: -5952566289195896545, guid: ca4775e289092c04791daaf42e19cacb, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
@ -10038,7 +10363,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 6
m_SortingOrder: -99
m_Sprite: {fileID: 7973861647424831005, guid: ca4775e289092c04791daaf42e19cacb, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
@ -10121,7 +10446,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
m_SortingOrder: -100
m_Sprite: {fileID: -497912792735699408, guid: ca4775e289092c04791daaf42e19cacb, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0

View file

@ -1,3 +1,4 @@
using HeavenStudio.Games.Scripts_SneakySpirits;
using HeavenStudio.Util;
using System;
using System.Collections.Generic;
@ -11,7 +12,21 @@ namespace HeavenStudio.Games.Loaders
public static Minigame AddGame(EventCaller eventCaller) {
return new Minigame("sneakySpirits", "Sneaky Spirits \n<color=#eb5454>[INITIALIZATION ONLY]</color>", "0058CE", false, false, new List<GameAction>()
{
});
new GameAction("spawn spirit", "Spawn Spirit")
{
defaultLength = 1f,
function = delegate { var e = eventCaller.currentEntity; SneakySpirits.instance.SpawnSpirit(e.beat, e["valA"]); },
parameters =
{
new Param("valA", new EntityTypes.Integer(1, 8, 8), "Length", "The length until you have to shoot the spirit")
}
}
},
new List<string>() { "agb", "aim" },
"agbobake", "en", "ver0",
new List<string>() {},
new List<string>() {}
);
}
}
}
@ -21,10 +36,18 @@ namespace HeavenStudio.Games
//using Scripts_SneakySpirits;
public class SneakySpirits : Minigame
{
public static SneakySpirits instance;
// references
[Header("References")]
public Transform SpawnRoot;
public GameObject SneakySpirit;
public GameObject Arrow;
// Start is called before the first frame update
void Awake()
{
instance = this;
}
// Update is called once per frame
@ -32,5 +55,23 @@ namespace HeavenStudio.Games
{
}
public void SpawnSpirit(float beat, int length)
{
CreateSpirit(beat, length);//, )
}
public GameObject CreateSpirit(float beat, int length)//, string awakeAnim)
{
GameObject mobj = GameObject.Instantiate(SneakySpirit, SpawnRoot);
WahSpirits mobjDat = mobj.GetComponent<WahSpirits>();
mobjDat.startBeat = beat;
mobjDat.numBeats = length;
mobj.SetActive(true);
return mobj;
}
}
}

View file

@ -0,0 +1,66 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using NaughtyBezierCurves;
using HeavenStudio.Util;
using System;
namespace HeavenStudio.Games.Scripts_SneakySpirits
{
public class WahSpirits : PlayerActionObject
{
public float startBeat;
public int numBeats;
// Start is called before the first frame update
PlayerActionEvent OnHit;
void Awake()
{
OnHit = SneakySpirits.instance.ScheduleInput(startBeat, numBeats, InputType.STANDARD_DOWN, SpiritHitOrNG, SpiritMiss, SpiritEmpty);
}
public void SpiritHitOrNG(PlayerActionEvent caller, float state)
{
if (GameManager.instance.currentGame != "sneakySpirits") return;
//hitting a normal object with the alt input
//WHEN SCORING THIS IS A MISS
if (state <= -1f || state >= 1f)
{
startBeat = Conductor.instance.songPositionInBeats;
Jukebox.PlayOneShot("miss");
SpiritNG();
}
else
{
SpiritHit();
}
OnHit.CanHit(false);
}
public void SpiritMiss(PlayerActionEvent caller)
{
Animator mobjAnim = GetComponent<Animator>();
mobjAnim.Play("Miss", -1, 0);
}
public void SpiritNG()
{
}
public void SpiritHit()
{
}
public void SpiritEmpty(PlayerActionEvent caller) { }
// Update is called once per frame
void Update()
{
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2a9f5c770dfec4949a3bf16442deee66
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: