godot-particles/Materials/base.gd

20 lines
686 B
GDScript

extends Resource
# Resource is Godot's base class for lightweight data objects that aren't in the scene tree,
# extending from Resource is better than extending from a Node so we don't have Godot rendering
# hundred of thousand of nodes every frame.
class_name GameMaterial
# The name of the material to use in the UI
@export var name: String
# Color to represent the material into the scene
@export var color: Color
# Material attributes
@export var density: float = INF
# update methods works on the logic on what this material has to do. This has to be overriden by
# subclasses implementing `GameMaterial`
func update(grid, y, x) -> void:
pass # each subclass overrides this