11 lines
296 B
GDScript
11 lines
296 B
GDScript
class_name Global
|
|
|
|
# Returns the next damage instance (and increases by 1)
|
|
static var next_dmg_id : int = 0 :
|
|
get:
|
|
next_dmg_id += 1
|
|
return next_dmg_id
|
|
|
|
# Entrywise modulo
|
|
static func vec_mod(vec : Vector2, modulus : float):
|
|
return Vector2(fposmod(vec.x, modulus), fposmod(vec.y, modulus))
|