This commit is contained in:
CortexCore
2023-11-15 23:54:54 +08:00
parent ee3ecec6cb
commit 3c837a4a33
356 changed files with 73756 additions and 26493 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace BITFALL.Placement
{
[Serializable]
public sealed class UnityPlacementServiceSingleton:PlacementServiceImplementation
{
protected override IPlacementService _placementServiceImplementation => UnityPlacementService.Singleton;
}
public class UnityPlacementService : MonoBehaviour,IPlacementService
{
public static IPlacementService Singleton { get; private set; }
[SerializeField] private UnityPlacementObject[] placementObjects;
public IPlacementObject CurrentPlacementObject { get; private set; }
public bool TryGetCurrentObject(out IPlacementObject placementObject)
{
placementObject = CurrentPlacementObject;
return placementObject != null;
}
public IPlacementObject[] PlacementObjects => placementObjects.Cast<IPlacementObject>().ToArray();
}
}