29 lines
801 B
C#
29 lines
801 B
C#
|
using Godot;
|
||
|
using System;
|
||
|
|
||
|
public class StreamContainer : Spatial
|
||
|
{
|
||
|
// scene nodes
|
||
|
private MeshInstance _bounds;
|
||
|
private Spatial _activeTiles;
|
||
|
|
||
|
// resources
|
||
|
private PackedScene _hexTileScene = GD.Load<PackedScene>("res://scenes/HexTile3D.tscn");
|
||
|
|
||
|
[Export] public Vector2 _dimensions = new Vector2(8, 4);
|
||
|
|
||
|
|
||
|
// Called when the node enters the scene tree for the first time.
|
||
|
public override void _Ready()
|
||
|
{
|
||
|
_bounds = GetNode<MeshInstance>("Bounds");
|
||
|
_activeTiles = GetNode<Spatial>("ActiveTiles");
|
||
|
|
||
|
Transform boundsTransform = Transform.Identity;
|
||
|
boundsTransform = boundsTransform.Scaled(new Vector3(_dimensions.x / 2, 1, _dimensions.y / 2));
|
||
|
_bounds.Transform = boundsTransform;
|
||
|
|
||
|
Update
|
||
|
}
|
||
|
}
|