This can be seen as the initial state of the project after the released demo.
The changes include:
- New ship models
- Singleton manager structure to keep project scaleable in the future
- Managing players, their settings, character choices, statistics, match setups, controls etc. in a separate decoupled scene
- Main menu with transitions to the arena scene
- Beginnings of a custom audio solution
- Logging with Log4Net
It is really a complete overhaul of the projects structure and management.
44 lines
791 B
C#
44 lines
791 B
C#
using System.Linq;
|
|
using System.Reflection;
|
|
using log4net;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
namespace Managers
|
|
{
|
|
public class AVEffectsManager : MonoBehaviour
|
|
{
|
|
private static ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
|
|
public static AVEffectsManager G { get; private set; }
|
|
|
|
[HideInInspector]
|
|
public AudioLibrary audioLibrary;
|
|
|
|
private AudioSource centralAudioSource;
|
|
|
|
// Start is called before the first frame update
|
|
void Awake()
|
|
{
|
|
G = this;
|
|
Log.Info("Awake");
|
|
if (gameObject.TryGetComponent(out AudioLibrary al))
|
|
{
|
|
audioLibrary = al;
|
|
}
|
|
}
|
|
|
|
void Start()
|
|
{
|
|
centralAudioSource = audioLibrary.audios.First(a => a.tag == "music").audioSource;
|
|
centralAudioSource.Play();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public enum Music
|
|
{
|
|
|
|
} |