Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | abelgutierrez99 |
Hello,
I getting the error in the title but I don’t know why at the line that says: self.rng = RandomNumberGenerator.new()
extends Node
# This is the GameManager, the base of the game
func _ready():
var x = Colony.new(
Vector3(0, 0, 0), # origin
1, # xdim
1 # zdim
)
add_child(x)
pass
class Colony extends Spatial:
# origin
var origin : Vector3
# x dimension (loops start at 0 and ends in xdim-1 in general)
var xdim : int
# z dimension (loops start at 0 and ends in zdim-1 in general)
var zdim : int
# number of points in the xz plane
var xzdim : int
# camera
var camera : Camera
func _init(origin, xdim, zdim):
# random generator
self.rng = RandomNumberGenerator.new()
self.rng.randomize()
self.origin = origin
self.xdim = xdim
self.zdim = zdim
self.xzdim = xdim*zdim