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.
27 lines
618 B
C#
27 lines
618 B
C#
using System.Reflection;
|
|
using log4net;
|
|
using Managers;
|
|
using UnityEngine;
|
|
|
|
public class PlayingFieldDetection : MonoBehaviour
|
|
{
|
|
private static ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
private void OnTriggerExit(Collider collider)
|
|
{
|
|
if (collider.tag == "Ship")
|
|
{
|
|
if (!collider.TryGetComponent(out Ship ship))
|
|
{
|
|
Log.Error($"Collider: {collider} was tagged as Ship, but has no Ship component.");
|
|
return;
|
|
}
|
|
MatchManager.G.UpdateMatchCondition(new MatchConditionUpdate
|
|
{
|
|
Condition = WinCondition.Lives,
|
|
ship = ship,
|
|
count = -1
|
|
});
|
|
}
|
|
}
|
|
}
|