1
This commit is contained in:
25
Unity/Scripts/WorldChunk/IWorldBound.cs
Normal file
25
Unity/Scripts/WorldChunk/IWorldBound.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
namespace BITKit.WorldChunk
|
||||
{
|
||||
public interface IWorldChunk
|
||||
{
|
||||
Rect GetRect();
|
||||
void SetActive(bool active);
|
||||
}
|
||||
public abstract class WorldChunk : MonoBehaviour, IWorldChunk
|
||||
{
|
||||
public static readonly List<IWorldChunk> chunks=new();
|
||||
public abstract Rect GetRect();
|
||||
public abstract void SetActive(bool active);
|
||||
void OnEnable()
|
||||
{
|
||||
chunks.Add(this);
|
||||
}
|
||||
void OnDisable()
|
||||
{
|
||||
chunks.Remove(this);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user