Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,28 @@ func _process(delta):
PI/200)
if ($RightRay.is_colliding()):
rotate(-getSpeedFromPoint($RightRay.get_collision_point()))

move_and_slide(-velocity.rotated(rotation))

return

# Track TilesSet Camera
extends Node2D

func _ready():
set_camera_limits()

func set_camera_limits():
var map_limits = $Floor.get_used_rect()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var map_space = $Floor.get_used_rect()

var map_cellSize = $Floor.cell_size
$SnailPlayer/Camera2D.limit_bottom = map_limits.end.y * map_cellSize.y
$SnailPlayer/Camera2D.limit_top = map_limits.position.y * map_cellSize.y
$SnailPlayer/Camera2D.limit_right = map_limits.end.x * map_cellSize.x
$SnailPlayer/Camera2D.limit_left = map_limits.position.x * map_cellSize.x

# Title Menu
extends Control

func _on_StartGameButton_pressed():
get_tree().change_scene("res://circuits/Track.tscn")

func _on_QuitGameButton_pressed():
get_tree().quit()