This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends MeshInstance3D | |
@export var _grid_size := 2 | |
# Which of the array of quads to change (must be between 0 and _grid_size * _grid_size): | |
@export var _quad_to_change := 1 | |
var _array_mesh : ArrayMesh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Godot 3.5.2 | |
class_name Gravity | |
extends Node | |
export var gravity_constant := 10000.0 | |
var _moving_masses : Array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@icon("res://editor/icons/state_machine.svg") | |
class_name StateMachine | |
extends Node | |
@export var _host_path : NodePath # If unset, the host is self | |
var _host : Node | |
enum Mode { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class_name Ambulator | |
extends StateMachine | |
@export var _speed := 16.0 | |
@export var _jump_impulse := 200.0 | |
@export var _max_speed := 50.0 | |
@export var _gravity_multiplier := 0.1 | |
@export var _snap_length := 20.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reads the lowest four bits from the input's blue channel and uses them to | |
// pick a substitute colour from a palette texture. | |
// | |
// The palette texture should be 16 pixels wide and 1 pixel high, with the | |
// colours arranged with index 0 at the left and index 15 at the right. | |
// | |
// This version is for Godot 4. | |
shader_type canvas_item; | |
render_mode blend_disabled, unshaded, skip_vertex_transform; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Area2D | |
@export var _walk_speed := 50.0 | |
@export var _jump_speed := 300.0 | |
var _gravity : float = ProjectSettings.get_setting("physics/2d/default_gravity") | |
@onready var _tilemap := Global.tilemap | |
var _velocity : Vector2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
[AddComponentMenu("Chassis/Hover Chassis")] | |
public class HoverChassis : Chassis | |
{ | |
[SerializeField] protected Transform m_CentreOfMass; | |
[SerializeField] protected Transform m_TurningForcePosition; | |
[SerializeField] protected Transform m_RaycastPoint; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Target | |
export var _bullet_scene : PackedScene | |
export var _firing_timer_path : NodePath | |
onready var _firing_timer := get_node(_firing_timer_path) as Timer | |
onready var _original_firing_time := _firing_timer.wait_time | |
export var _speed = 100.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reads the lowest four bits from the input's blue channel and uses them to | |
// pick a substitute colour from a palette texture. | |
// | |
// The palette texture should be 16 pixels wide and 1 pixel high, with the | |
// colours arranged with index 0 at the left and index 15 at the right. | |
shader_type canvas_item; | |
render_mode blend_disabled, unshaded, skip_vertex_transform; | |
uniform sampler2D palette; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class_name Pickup | |
extends RigidBody2D | |
export(Globals.PickupType) var type : int setget , get_type | |
export var sprite : NodePath | |
onready var sprite_node : AnimatedSprite = get_node(sprite) setget , get_sprite | |
# These should be translated strings, but let's keep it simple for now: |
NewerOlder