public override void OnInspectorGUI() { DrawDefaultInspector(); ChunkFiller chunkFiller = (ChunkFiller)target; if (GUILayout.Button("Fill chunk")) { chunkFiller.SpawnObjectsInZone(); } }
public override void _Ready() { Registry reg = new Registry(); PrimitiveResources.Register(reg); mesher = (GodotMesher)GetParent().FindNode("GameMesher"); mesher.SetRegistry(reg); chunkFiller = new ChunkFiller(1, 2); weltschmerz = new Weltschmerz(); Thread thread = new Thread(); thread.Start(this, nameof(Generate)); }
private void Start() { //get ref to ChunkFiller component chunkFiller = chunkFiller ?? GetComponent <ChunkFiller>(); //get camera's coordinates on the grid coords = new ChunkCoords(transform.position, EntityNetwork.CHUNK_SIZE); //start camera size at minimum size CamSize = minCamSize; //default follow target to shuttle if no target is set followTarget = followTarget ?? FindObjectOfType <Shuttle>(); LoadingController.AddListener(Initialise); }
public virtual void VmStart(ChunkFiller chunkFiller) { filler = chunkFiller; noise = chunkFiller.noise; }
public void SetMaterials(Registry registry) { chunkFiller = new ChunkFiller(registry.SelectByName("dirt").worldID, registry.SelectByName("grass").worldID); }