category scene setup

This commit is contained in:
Rapandrasmus 2023-11-26 17:36:18 +01:00
parent f8a4f04fe6
commit 42bcf245b5
6 changed files with 741 additions and 387 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace HeavenStudio.Editor
{
public class GameSelectionCategory : MonoBehaviour
{
[SerializeField] private NewGameSelectionEvent _gameSelectionEventRef;
}
}

View file

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

View file

@ -0,0 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace HeavenStudio.Editor
{
public class GameSelectionCategoryManager : MonoBehaviour
{
[SerializeField] private GameSelectionCategory _categoryRef;
}
}

View file

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

View file

@ -458,8 +458,7 @@ namespace HeavenStudio.Editor
[Header("New Game Event Selection")]
[SerializeField] private GameObject _newGameEventSelector;
[SerializeField] private RectTransform _newEventsParent;
[SerializeField] private GameObject _newEventRef;
[SerializeField] private GameSelectionCategory _cateGoryRef;
private bool _usingOld = false;
@ -486,12 +485,11 @@ namespace HeavenStudio.Editor
private void NewAddEvents(int index = 0)
{
if (!EventCaller.FXOnlyGames().Contains(SelectedMinigame))
/*if (!EventCaller.FXOnlyGames().Contains(SelectedMinigame))
{
NewGameSelectionEvent sg = Instantiate(_newEventRef, _newEventsParent).GetComponent<NewGameSelectionEvent>();
sg.SetText("Switch Game");
sg.gameObject.SetActive(true);
if (index == 0) sg.SetTextColor(EditorTheme.theme.properties.EventSelectedCol.Hex2RGB());
}
else
{
@ -504,18 +502,15 @@ namespace HeavenStudio.Editor
var action = SelectedMinigame.actions[i];
if (action.actionName == "switchGame" || action.hidden) continue;
NewGameSelectionEvent g = Instantiate(_newEventRef, _newEventsParent).GetComponent<NewGameSelectionEvent>();
//NewGameSelectionEvent g = Instantiate(_newEventRef, _newEventsParent).GetComponent<NewGameSelectionEvent>();
g.SetText(action.displayName);
if (action.parameters != null && action.parameters.Count > 0)
g.SetActiveGearIcon(true);
if (index - 1 == i)
g.SetTextColor(EditorTheme.theme.properties.EventSelectedCol.Hex2RGB());
g.gameObject.SetActive(true);
}
}*/
}
private void NewDestroyEvents()
@ -525,10 +520,10 @@ namespace HeavenStudio.Editor
transform.GetChild(i).GetChild(0).gameObject.SetActive(false);
}
for (int i = 0; i < _newEventsParent.childCount; i++)
/*for (int i = 0; i < _newEventsParent.childCount; i++)
{
Destroy(_newEventsParent.GetChild(i).gameObject);
}
}*/
}
public void Disable()