Honker Railway
This commit is contained in:
parent
a43a3eb6dd
commit
f6b36c722c
23 changed files with 505 additions and 30 deletions
BIN
sprites/ceres/items/hkr.png
Normal file
BIN
sprites/ceres/items/hkr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
34
sprites/ceres/items/hkr.png.import
Normal file
34
sprites/ceres/items/hkr.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://l26qimo56l1w"
|
||||
path="res://.godot/imported/hkr.png-e7e858b03539f9896250e904d59b8261.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/ceres/items/hkr.png"
|
||||
dest_files=["res://.godot/imported/hkr.png-e7e858b03539f9896250e904d59b8261.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
|
BIN
sprites/ceres/railway/face.png
Normal file
BIN
sprites/ceres/railway/face.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
34
sprites/ceres/railway/face.png.import
Normal file
34
sprites/ceres/railway/face.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://8lqg3cg6om84"
|
||||
path="res://.godot/imported/face.png-b9bae23332934d621bac31483eaa2a75.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/ceres/railway/face.png"
|
||||
dest_files=["res://.godot/imported/face.png-b9bae23332934d621bac31483eaa2a75.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
|
BIN
sprites/ceres/railway/facehud.png
Normal file
BIN
sprites/ceres/railway/facehud.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
34
sprites/ceres/railway/facehud.png.import
Normal file
34
sprites/ceres/railway/facehud.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cdieuljnyhuhg"
|
||||
path="res://.godot/imported/facehud.png-b971c8f8c8c1f4009e87edfea9461744.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/ceres/railway/facehud.png"
|
||||
dest_files=["res://.godot/imported/facehud.png-b971c8f8c8c1f4009e87edfea9461744.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
|
BIN
sprites/ceres/railway/fullbody.png
Normal file
BIN
sprites/ceres/railway/fullbody.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
34
sprites/ceres/railway/fullbody.png.import
Normal file
34
sprites/ceres/railway/fullbody.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://6tioj5v0ubps"
|
||||
path="res://.godot/imported/fullbody.png-3262855caa1b6b18447b3893113668e3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/ceres/railway/fullbody.png"
|
||||
dest_files=["res://.godot/imported/fullbody.png-3262855caa1b6b18447b3893113668e3.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
|
BIN
sprites/ceres/railway/sprite.png
Normal file
BIN
sprites/ceres/railway/sprite.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
34
sprites/ceres/railway/sprite.png.import
Normal file
34
sprites/ceres/railway/sprite.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c1jjhut8fuf1w"
|
||||
path="res://.godot/imported/sprite.png-3ddcb22cebad3d4fb10da96cb267cd56.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/ceres/railway/sprite.png"
|
||||
dest_files=["res://.godot/imported/sprite.png-3ddcb22cebad3d4fb10da96cb267cd56.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
|
BIN
sprites/ceres/railway/sprite.xcf
Normal file
BIN
sprites/ceres/railway/sprite.xcf
Normal file
Binary file not shown.
|
@ -2,6 +2,8 @@ extends CharacterBody2D
|
|||
|
||||
|
||||
const SPEED = 300.0
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
const JUMP_VELOCITY = -400.0
|
||||
var angle = 2
|
||||
var sprite
|
||||
|
@ -26,22 +28,22 @@ func _ready():
|
|||
func _physics_process(delta):
|
||||
# Add the gravity.
|
||||
#var velocity = Vector2.ZERO
|
||||
#if Global.live == 1 || (Global.xm == 0 && Global.ym == 0):
|
||||
#if Global.live == 1 || (xm == 0 && ym == 0):
|
||||
if speed != null:
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * speed * Global.xm * delta)-Vector2.UP.rotated(rotation) * speed * Global.ym * delta
|
||||
velocity = (Vector2.RIGHT.rotated(rotation) * speed * xm * delta)-Vector2.UP.rotated(rotation) * speed * ym * delta
|
||||
#origmpos = get_viewport().get_mouse_position()
|
||||
#if Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) != 0:
|
||||
# velocity = Vector2.UP.rotated(rotation) * -400 * Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
position += velocity
|
||||
Global.playerx = position.x
|
||||
Global.playery = position.y
|
||||
if Global.ym > 0.3:
|
||||
if ym > 0.3:
|
||||
angle = 2
|
||||
elif Global.ym < -0.3:
|
||||
elif ym < -0.3:
|
||||
angle = 0
|
||||
elif Global.xm > 0.3:
|
||||
elif xm > 0.3:
|
||||
angle = 1
|
||||
elif Global.xm < -0.3:
|
||||
elif xm < -0.3:
|
||||
angle = 3
|
||||
if velocity.y != 0 || velocity.x != 0:
|
||||
if angle == 0:
|
||||
|
@ -64,10 +66,25 @@ func _physics_process(delta):
|
|||
move_and_slide()
|
||||
|
||||
func _input(event):
|
||||
xm = 0
|
||||
ym = 0
|
||||
if Global.live == 1:
|
||||
if Global.live == 1 && !Input.is_action_pressed("schar"):
|
||||
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
|
||||
xm = Input.get_joy_axis(0,JOY_AXIS_LEFT_X)
|
||||
ym = Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
|
||||
else:
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
xm = -1
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
xm = 1
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
ym = -1
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
ym = 1
|
||||
if Input.is_action_pressed("schar") && (Input.is_action_just_released("ui_up") || Input.is_action_just_released("ui_down") || Input.is_action_just_released("ui_left") || Input.is_action_just_released("ui_right")):
|
||||
_charswitch()
|
||||
if Input.is_action_just_pressed("shoot") && !bpress && Global.live == 1:
|
||||
if Input.is_action_just_pressed("button0") && !bpress && Global.live == 1:
|
||||
bpress = true
|
||||
var bullet
|
||||
if Global.debug:
|
||||
|
@ -87,7 +104,7 @@ func _input(event):
|
|||
new_pbullet.position = Vector2(position.x + rposition.x, position.y + rposition.y)
|
||||
if new_pbullet.position.x > 0 && new_pbullet.position.y > 0 && new_pbullet.position.x < 1280 && new_pbullet.position.y < 720:
|
||||
get_parent().add_child(new_pbullet)
|
||||
elif Input.is_action_just_released("shoot") && bpress:
|
||||
elif Input.is_action_just_released("button0") && bpress:
|
||||
bpress = false
|
||||
|
||||
func _charinit():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue