tweak comments

This commit is contained in:
Teatov 2024-10-13 21:07:35 +10:00
parent 18ca7c6c09
commit 6cff7362fc
12 changed files with 15 additions and 15 deletions

View File

@ -28,7 +28,7 @@ func space_left() -> int:
return max_honeydew - honeydew
## Returns amount of honeydew that did not fit
## Returns amount of honeydew that did not fit.
func deposit_honeydew(amount: int) -> int:
var new_honeydew_amount := honeydew + amount
var leftover: int = 0

View File

@ -1,6 +1,6 @@
extends Marker3D
class_name BunchSpawner
## Spawns a bunch of specified nodes upon entering the tree
## Spawns a bunch of specified nodes upon entering the tree.
enum WhatToSpawn {
APHID,

View File

@ -1,5 +1,5 @@
extends Node
## Handles cursor confinement and animation
## Handles cursor confinement and animation.
const CURSOR_HOTSPOT = Vector2(32, 32)

View File

@ -1,5 +1,5 @@
extends CanvasLayer
## Handles displaying debug info
## Handles displaying debug info.
const LINE_WIDTH: float = 2
const MARKER_RADIUS: float = 0.2

View File

@ -1,5 +1,5 @@
extends Node
## Handles fullscreen toggling
## Handles fullscreen toggling.
var _is_fullscreen: bool = false

View File

@ -1,5 +1,5 @@
extends Node3D
## Handles mouse hovering over units
## Handles mouse hovering over units.
var hovered_node: Variant

View File

@ -1,5 +1,5 @@
extends Node
## Handles selection of units
## Handles selection of units.
const MIN_DRAG_DISTANCE: float = 15
const UNIT_SELECT_OFFSET: float = 0.25

View File

@ -1,5 +1,5 @@
extends Node
## Holds all the sound effects for quick use
## Holds all the sound effects for quick use.
var _pop_streams: Array[AudioStream] = [
preload("res://assets/audio/units/pop_1.wav"),

View File

@ -1,10 +1,10 @@
extends Node
## Holds references to nodes that other scripts reference
## Holds references to nodes that other scripts reference.
@onready var player_anthill: Anthill = $/root/World/Structures/Anthill
@onready var main_camera: MainCamera = $/root/World/MainCamera
# Unit holders
# Unit holders.
@onready var nitwits_holder: Node = $/root/World/Units/Nitwits
@onready var gatherers_holder: Node = $/root/World/Units/Gatherers
@onready var aphids_holder: Node = $/root/World/Units/Aphids

View File

@ -1,5 +1,5 @@
extends Node
## Holds references to all the menus
## Holds references to all the menus.
@onready var anthill_info: AnthillInfo = $/root/World/UI/AnthillInfo
@onready var buy_ants: BuyAnts = $/root/World/UI/BuyAnts

View File

@ -9,8 +9,8 @@ enum State {
const ZOOM_STEP: float = 0.1
const ZOOM_DAMP: float = 5
const ZOOM_VALUE_DEFAULT: float = 0.3
## How many pixels the mouse needs to be away
## from the screen edge to move the camera.
## How many pixels close to the screen edge
## the mouse needs to be to move the camera.
const SCREEN_EDGE_THRESHOLD: float = 10
const HEADING_SPEED: float = 0.75
const WORLD_LIMIT_DISTANCE: float = 150 / 2
@ -114,7 +114,7 @@ func _notification(what: int) -> void:
_window_out_of_focus = true
## Start gradually moving camera towards a position
## Start gradually moving camera towards a position.
func head_to(to: Vector3, zoom: float = ZOOM_VALUE_DEFAULT) -> void:
_heading_to_position = to
_heading_from_position = _target_position

View File

@ -1,6 +1,6 @@
extends AudioStreamPlayer3D
class_name SoundEffectsPlayer
## Wrapper of AudioStreamPlayer3D that has AudioStreamPlaybackPolyphonic
## Wrapper of AudioStreamPlayer3D that has AudioStreamPlaybackPolyphonic.
var _playback: AudioStreamPlaybackPolyphonic