-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
the camera literally has a smooth follow checkbox wtf - added smooth camera - removed walls - added space background for reference - added support for moving camera and touch position on input manager
- Loading branch information
1 parent
33d3743
commit f0d77ad
Showing
6 changed files
with
95 additions
and
59 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/space-wallpaper-5.jpg-e298f425bede8d53820df581acad687d.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Images/space-wallpaper-5.jpg" | ||
dest_files=[ "res://.import/space-wallpaper-5.jpg-e298f425bede8d53820df581acad687d.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=0 | ||
flags/filter=true | ||
flags/mipmaps=false | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,19 @@ | ||
[gd_scene load_steps=6 format=2] | ||
[gd_scene load_steps=4 format=2] | ||
|
||
[ext_resource path="res://Scripts/Player.gd" type="Script" id=1] | ||
[ext_resource path="res://icon.png" type="Texture" id=2] | ||
|
||
[sub_resource type="CircleShape2D" id=1] | ||
radius = 15.6796 | ||
|
||
[sub_resource type="RectangleShape2D" id=2] | ||
extents = Vector2( 4.14182, 352.581 ) | ||
|
||
[sub_resource type="RectangleShape2D" id=3] | ||
extents = Vector2( 614.659, 5.0593 ) | ||
[ext_resource path="res://Images/space-wallpaper-5.jpg" type="Texture" id=1] | ||
[ext_resource path="res://Nodes/Player.tscn" type="PackedScene" id=2] | ||
[ext_resource path="res://Scripts/CameraFollow.gd" type="Script" id=3] | ||
|
||
[node name="Game" type="Node2D"] | ||
|
||
[node name="Player" type="RigidBody2D" parent="."] | ||
position = Vector2( 150, 150 ) | ||
mass = 0.170408 | ||
gravity_scale = 0.0 | ||
linear_damp = 1.7 | ||
script = ExtResource( 1 ) | ||
drag_speed = 100 | ||
hold_speed = 2 | ||
maximum_drag_force = 8000 | ||
drag_force_minimum = 50.0 | ||
drag_release_time = 10.0 | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"] | ||
shape = SubResource( 1 ) | ||
|
||
[node name="Sprite" type="Sprite" parent="Player"] | ||
scale = Vector2( 0.2, 0.2 ) | ||
texture = ExtResource( 2 ) | ||
|
||
[node name="Timer" type="Timer" parent="Player"] | ||
|
||
[node name="Walls" type="Node" parent="."] | ||
editor/display_folded = true | ||
|
||
[node name="Left" type="StaticBody2D" parent="Walls"] | ||
position = Vector2( 0, 300 ) | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Left"] | ||
shape = SubResource( 2 ) | ||
|
||
[node name="Right" type="StaticBody2D" parent="Walls"] | ||
position = Vector2( 1023.88, 300 ) | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Right"] | ||
shape = SubResource( 2 ) | ||
|
||
[node name="Top" type="StaticBody2D" parent="Walls"] | ||
position = Vector2( 500, 0 ) | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Top"] | ||
shape = SubResource( 3 ) | ||
[node name="space-wallpaper-5" type="Sprite" parent="."] | ||
scale = Vector2( 2, 2 ) | ||
texture = ExtResource( 1 ) | ||
|
||
[node name="Bottom" type="StaticBody2D" parent="Walls"] | ||
position = Vector2( 500, 599.46 ) | ||
[node name="Player" parent="." instance=ExtResource( 2 )] | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Bottom"] | ||
shape = SubResource( 3 ) | ||
[node name="MainCamera" type="Camera2D" parent="."] | ||
current = true | ||
smoothing_enabled = true | ||
smoothing_speed = 7.4 | ||
script = ExtResource( 3 ) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[gd_scene load_steps=4 format=2] | ||
|
||
[ext_resource path="res://Scripts/Player.gd" type="Script" id=1] | ||
[ext_resource path="res://icon.png" type="Texture" id=2] | ||
|
||
[sub_resource type="CircleShape2D" id=1] | ||
radius = 15.6796 | ||
|
||
[node name="Player" type="RigidBody2D"] | ||
mass = 0.170408 | ||
gravity_scale = 0.0 | ||
linear_damp = 1.7 | ||
script = ExtResource( 1 ) | ||
drag_speed = 100 | ||
hold_speed = 2 | ||
maximum_drag_force = 8000 | ||
drag_force_minimum = 50.0 | ||
drag_release_time = 10.0 | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
shape = SubResource( 1 ) | ||
|
||
[node name="Sprite" type="Sprite" parent="."] | ||
scale = Vector2( 0.2, 0.2 ) | ||
texture = ExtResource( 2 ) | ||
|
||
[node name="Timer" type="Timer" parent="."] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends Camera2D | ||
|
||
var player | ||
|
||
func _ready(): | ||
player = get_parent().get_node("Player") | ||
|
||
func _process(delta): | ||
set_position(player.get_position()) |
This file contains 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