mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 22:33:42 +00:00
3fdf270aa9
Enable glow/bloom, color adjustments, and MSAA+FXAA across all three arenas so emissive ship/station accents actually bleed light and edges read cleanly. Expose the player-facing knobs (anti-aliasing mode, glow intensity, brightness) through a new Settings screen off the main menu, persisted via a VideoSettings autoload that scales each arena's own tuned Environment values on load rather than overwriting them.
36 lines
986 B
GDScript
36 lines
986 B
GDScript
class_name Arena
|
|
extends Node3D
|
|
|
|
# A reusable stadium: terrain, lighting, environment, two team goals, and
|
|
# spawn markers. An arena holds no rules and no state — game modes query it
|
|
# for spawn transforms and goals, then spawn ships/ball themselves.
|
|
|
|
|
|
func _ready():
|
|
add_to_group("arena")
|
|
var world_env := get_node_or_null("WorldEnvironment") as WorldEnvironment
|
|
if world_env and world_env.environment:
|
|
VideoSettings.apply_to_environment(world_env.environment)
|
|
|
|
|
|
func get_ball_spawn() -> Transform3D:
|
|
return $BallSpawn.global_transform
|
|
|
|
|
|
func get_ship_spawns(team: int) -> Array[Transform3D]:
|
|
var spawns: Array[Transform3D] = []
|
|
var container := get_node_or_null("SpawnsTeam%d" % team)
|
|
if container:
|
|
for child in container.get_children():
|
|
if child is Marker3D:
|
|
spawns.append(child.global_transform)
|
|
return spawns
|
|
|
|
|
|
func get_goals() -> Array[Goal]:
|
|
var goals: Array[Goal] = []
|
|
for child in get_children():
|
|
if child is Goal:
|
|
goals.append(child)
|
|
return goals
|