BITFALL/Assets/BITKit/Unity/Scripts/WorldChunk/WorldChunkManager.cs

39 lines
950 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
using NativeQuadTree;
using Unity.Mathematics;
namespace BITKit.WorldChunk
{
public class WorldChunkManager : MonoBehaviour
{
[SerializeField] private int2 worldSize;
[SerializeField] private int2 playerSize;
private Rect playerRect;
private void Start()
{
var quadTree = new NativeQuadTree<int>(new AABB2D(default, worldSize));
}
private void FixedUpdate()
{
var cameraPos = Camera.main.transform.position;
Vector2 position = new()
{
x = cameraPos.x - playerSize.x / 2,
y = cameraPos.z - playerSize.y / 2,
};
OnUpdate();
//ThreadHelper.Add(OnUpdate);
}
private void OnUpdate()
{
}
}
}