mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 18:57:40 +02:00
Got rid of all hard-coded ForkLifter code from GameManager.
This commit is contained in:
8
Assets/Scripts/Games/ClappyTrio.meta
Normal file
8
Assets/Scripts/Games/ClappyTrio.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18fa454b7a49ea94fa7d33add3f9ebec
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
14
Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs
Normal file
14
Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RhythmHeavenMania.Games.ClappyTrio
|
||||
{
|
||||
public class ClappyTrio : MonoBehaviour
|
||||
{
|
||||
void Start()
|
||||
{
|
||||
Debug.Log("ClappyTrio");
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs.meta
Normal file
11
Assets/Scripts/Games/ClappyTrio/ClappyTrio.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7c8ebd2f1b0ce448acc55b6f6608e15
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -12,6 +12,8 @@ namespace RhythmHeavenMania.Games.ForkLifter
|
||||
|
||||
GameManager GameManager;
|
||||
|
||||
public List<GameManager.Event> allPlayerActions = new List<GameManager.Event>();
|
||||
|
||||
[Header("Objects")]
|
||||
public Animator handAnim;
|
||||
public GameObject flickedObject;
|
||||
@ -28,6 +30,28 @@ namespace RhythmHeavenMania.Games.ForkLifter
|
||||
private void Start()
|
||||
{
|
||||
GameManager = GameManager.instance;
|
||||
allPlayerActions = GameManager.Events.FindAll(c => c.eventName != "gulp" && c.eventName != "sigh" && c.eventName != "prepare" && c.eventName != "end");
|
||||
|
||||
/*List<Event> temp = new List<Event>();
|
||||
for (int i = 0; i < allPlayerActions.Count; i++)
|
||||
{
|
||||
if (i - 1 > 0)
|
||||
{
|
||||
if (Mathp.IsWithin(allPlayerActions[i - 1].spawnTime, allPlayerActions[i].spawnTime - 1f, allPlayerActions[i].spawnTime))
|
||||
{
|
||||
// do nothing lul
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Event e = (Event)allPlayerActions[i].Clone();
|
||||
e.spawnTime = allPlayerActions[i].spawnTime - 1;
|
||||
e.eventName = "prepare";
|
||||
|
||||
temp.Add(e);
|
||||
}
|
||||
|
||||
string s = JsonConvert.SerializeObject(temp);
|
||||
print(s);*/
|
||||
}
|
||||
|
||||
public void Flick(float beat, int type)
|
||||
|
@ -26,7 +26,7 @@ namespace RhythmHeavenMania.Games.ForkLifter
|
||||
{
|
||||
allPlayerActions = GameManager.instance.Events.FindAll(c => c.eventName != "gulp" && c.eventName != "sigh" && c.eventName != "prepare");
|
||||
|
||||
if (GameManager.instance.currentEventPlayer < allPlayerActions.Count)
|
||||
/*if (GameManager.instance.currentEventPlayer < allPlayerActions.Count)
|
||||
{
|
||||
switch (allPlayerActions[GameManager.instance.currentEventPlayer].eventName)
|
||||
{
|
||||
@ -51,7 +51,7 @@ namespace RhythmHeavenMania.Games.ForkLifter
|
||||
else
|
||||
{
|
||||
ForkLifter.instance.peaPreview.sprite = null;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public void Prepare()
|
||||
|
Reference in New Issue
Block a user