mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 16:00:08 +01:00
missing demo files
This commit is contained in:
BIN
2d/isometric/bastiles.res
Normal file
BIN
2d/isometric/bastiles.res
Normal file
Binary file not shown.
BIN
2d/isometric/dungeon.scn
Normal file
BIN
2d/isometric/dungeon.scn
Normal file
Binary file not shown.
21
2d/isometric/engine.cfg
Normal file
21
2d/isometric/engine.cfg
Normal file
@@ -0,0 +1,21 @@
|
||||
[application]
|
||||
|
||||
name="Isometric Game"
|
||||
main_scene="res://dungeon.scn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[image_loader]
|
||||
|
||||
filter=false
|
||||
gen_mipmaps=false
|
||||
|
||||
[input]
|
||||
|
||||
move_up=[key(Up)]
|
||||
move_left=[key(Left)]
|
||||
move_right=[key(Right)]
|
||||
move_bottom=[key(Down)]
|
||||
|
||||
[rasterizer]
|
||||
|
||||
use_pixel_snap=true
|
||||
BIN
2d/isometric/icon.png
Normal file
BIN
2d/isometric/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
BIN
2d/isometric/isotiles.png
Normal file
BIN
2d/isometric/isotiles.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 217 KiB |
BIN
2d/isometric/tileset.scn
Normal file
BIN
2d/isometric/tileset.scn
Normal file
Binary file not shown.
43
2d/isometric/troll.gd
Normal file
43
2d/isometric/troll.gd
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
extends KinematicBody2D
|
||||
|
||||
# This is a simple collision demo showing how
|
||||
# the kinematic cotroller works.
|
||||
# move() will allow to move the node, and will
|
||||
# always move it to a non-colliding spot,
|
||||
# as long as it starts from a non-colliding spot too.
|
||||
|
||||
|
||||
#pixels / second
|
||||
const MOTION_SPEED=160
|
||||
|
||||
func _fixed_process(delta):
|
||||
|
||||
var motion = Vector2()
|
||||
|
||||
if (Input.is_action_pressed("move_up")):
|
||||
motion+=Vector2(0,-1)
|
||||
if (Input.is_action_pressed("move_bottom")):
|
||||
motion+=Vector2(0,1)
|
||||
if (Input.is_action_pressed("move_left")):
|
||||
motion+=Vector2(-1,0)
|
||||
if (Input.is_action_pressed("move_right")):
|
||||
motion+=Vector2(1,0)
|
||||
|
||||
motion = motion.normalized() * MOTION_SPEED * delta
|
||||
motion = move(motion)
|
||||
|
||||
#make character slide nicely through the world
|
||||
var slide_attempts = 4
|
||||
while(is_colliding() and slide_attempts>0):
|
||||
motion = get_collision_normal().slide(motion)
|
||||
motion=move(motion)
|
||||
slide_attempts-=1
|
||||
|
||||
|
||||
func _ready():
|
||||
# Initalization here
|
||||
set_fixed_process(true)
|
||||
pass
|
||||
|
||||
|
||||
BIN
2d/isometric/troll.png
Normal file
BIN
2d/isometric/troll.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
BIN
2d/isometric/troll.scn
Normal file
BIN
2d/isometric/troll.scn
Normal file
Binary file not shown.
Reference in New Issue
Block a user