-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#223 It doesn't move when pushed, but it exists. We also still need to make the area, and have the box actively check if it's inside its area.
- Loading branch information
1 parent
7165d3a
commit b1b234b
Showing
5 changed files
with
78 additions
and
6 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.
34 changes: 34 additions & 0 deletions
34
You, Me, and the End of the World/Images/box_placeholder.png.import
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/box_placeholder.png-2b32949113b99f81b2809c54c1526ca8.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Images/box_placeholder.png" | ||
dest_files=[ "res://.import/box_placeholder.png-2b32949113b99f81b2809c54c1526ca8.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
extends KinematicBody2D | ||
|
||
onready var isInArea | ||
var isTouchingPlayer | ||
var velocity = Vector2() | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
isInArea = true | ||
pass # Replace with function body. | ||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(delta): | ||
var collision = move_and_collide(velocity * delta) | ||
if collision and isInArea: | ||
print("move, sucka") | ||
# To make the other kinematicbody2d move as well | ||
collision.collider.move_and_slide(velocity * delta) | ||
pass |
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
15 changes: 15 additions & 0 deletions
15
You, Me, and the End of the World/tscn files/puzzleBox.tscn
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,15 @@ | ||
[gd_scene load_steps=3 format=2] | ||
|
||
[ext_resource path="res://Scripts/puzzleBox.gd" type="Script" id=1] | ||
[ext_resource path="res://Images/box_placeholder.png" type="Texture" id=2] | ||
|
||
[node name="box" type="KinematicBody2D"] | ||
scale = Vector2( 0.25, 0.25 ) | ||
script = ExtResource( 1 ) | ||
|
||
[node name="Sprite" type="Sprite" parent="."] | ||
texture = ExtResource( 2 ) | ||
|
||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] | ||
polygon = PoolVector2Array( 154.895, -39.6647, 155.904, 102.161, 26.696, 169.289, -155.508, 106.704, -156.012, -25.0278, 14.179, -117.795, 153.986, -40.5732 ) | ||
|