Skip to content

Commit

Permalink
added castle jumpn run
Browse files Browse the repository at this point in the history
  • Loading branch information
Predatorcero committed Nov 5, 2023
1 parent 1c213fd commit 87598c3
Show file tree
Hide file tree
Showing 13 changed files with 6,353 additions and 0 deletions.
Binary file not shown.
34 changes: 34 additions & 0 deletions images/2d_lights_and_shadows_neutral_point_light.webp.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dxtf3liooynyl"
path="res://.godot/imported/2d_lights_and_shadows_neutral_point_light.webp-72783d402e9a3e09a255505aceee72ae.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://images/2d_lights_and_shadows_neutral_point_light.webp"
dest_files=["res://.godot/imported/2d_lights_and_shadows_neutral_point_light.webp-72783d402e9a3e09a255505aceee72ae.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
32 changes: 32 additions & 0 deletions prototypes/game-baerlachTest/Key1.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
extends CharacterBody2D


const SPEED = 300.0
const JUMP_VELOCITY = -400.0

# Get the gravity from the project settings to be synced with RigidBody nodes.
var gravity = 0 #ProjectSettings.get_setting("physics/2d/default_gravity")

func appear():
visible = true
collision_layer = 1
collision_mask = 1

func _physics_process(delta):
# Add the gravity.
if not is_on_floor():
velocity.y += gravity * delta

# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY

# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var direction = Input.get_axis("ui_left", "ui_right")
if direction:
velocity.x = direction * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)

move_and_slide()
47 changes: 47 additions & 0 deletions prototypes/game-baerlachTest/Player.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
extends CharacterBody2D


@export var key1 = 0
@export var key2 = 0
@export var key3 = 0
func add_key1():
key1 = 1

func add_key2():
key2 = 1

func add_key3():
key3 = 1


func set_camera_zoom(zoom_level):
$Camera2D.zoom=Vector2(zoom_level,zoom_level)

const SPEED = 300.0
const JUMP_VELOCITY = -400.0

# Get the gravity from the project settings to be synced with RigidBody nodes.
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")





func _physics_process(delta):
# Add the gravity.
if not is_on_floor():
velocity.y += gravity * delta

# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY

# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var direction = Input.get_axis("ui_left", "ui_right")
if direction:
velocity.x = direction * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)

move_and_slide()
14 changes: 14 additions & 0 deletions prototypes/game-baerlachTest/blocker.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends RigidBody2D

func block():
collision_layer = 1
collision_mask = 1
visible = 1
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
14 changes: 14 additions & 0 deletions prototypes/game-baerlachTest/door1.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
extends RigidBody2D

func open(key):
if key == 1:
queue_free()

# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
Loading

0 comments on commit 87598c3

Please sign in to comment.