Honker Railway

This commit is contained in:
Page Asgardius 2024-08-16 13:54:37 -07:00
parent a43a3eb6dd
commit f6b36c722c
23 changed files with 505 additions and 30 deletions

15
gamepad.gd Normal file
View file

@ -0,0 +1,15 @@
extends Node
var file
func _init(event):
if event is InputEventKey || event is InputEventMouse:
Global.gamepad = 0
elif str(Input.get_joy_name(0)).begins_with("Nintendo Switch"):
Global.gamepad = 2
elif str(Input.get_joy_name(0)).begins_with("Sony Computer Entertainment") || str(Input.get_joy_name(0)).begins_with("PS4") || str(Input.get_joy_name(0)).begins_with("PS5"):
Global.gamepad = 3
elif Global.gamepad == 0 && str(Input.get_joy_name(0)).is_empty():
Global.gamepad = 1
if event is InputEventMouse:
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
else:
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)

View file

@ -23,7 +23,7 @@ var cstats = [[800, 200, 52, 12, 136, 25, 800], [1094, 200, 54, 7, 106, 48, 600]
var dstats = [[800, 200, 52, 12, 136, 25, 800], [1094, 200, 54, 7, 106, 48, 600], [null], [1143, 200, 59, 5, 117, 18, 650], [null], [null], [null], [null], [null], [1026, 200, 87, 7, 105, 49, 115]]
var mstats = [[null, null, null, null, null, null, null], [null, null, null, null, null, null, null], [null, null, null, null, null, null, null], [null, null, null, null, null, null, null], [null, null, null, null, null, null, null], [null, null, null, null, null, null, null], [null, null, null, null, null, null, null], [null, null, null, null, null, null, null], [null, null, null, null, null, null, null], [null, null, null, null, null, null, null]]
var cdialog = []
const places = [[[["res://levels/Ceres/map.tscn", 5, false], [null, null, false]], [["res://levels/Testrooms/bullethell.tscn", 11, true], ["res://levels/Testrooms/lilytest.tscn", 6, false]], [["res://levels/Testrooms/dialogtest.tscn", 19, false], ["res://levels/Testrooms/testspawn.tscn", 2 ,false]]], [null, null, null, null, null, null, null, null, null, null, null, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, ["res://levels/Ceres/L20.tscn", 3, true]]]]
const places = [[[["res://levels/Ceres/map.tscn", 5, false], [null, null, false]], [["res://levels/Testrooms/bullethell.tscn", 11, true], ["res://levels/Testrooms/lilytest.tscn", 6, false]], [["res://levels/Testrooms/dialogtest.tscn", 19, false], ["res://levels/Testrooms/testspawn.tscn", 2 ,false]]], [null, null, null, null, null, null, null, null, [null, null, null, null, null, null, null, null, null, null, null, ["res://levels/Ceres/honkerrailway.tscn", 19, false]], null, null, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, ["res://levels/Ceres/L20.tscn", 3, true]]]]
var cplace = [0,2,1]
var dplace = [null, null, null]
const pbbullets = ["res://sprites/common/bullet/fireball.tscn", "res://sprites/common/bullet/sword.tscn", null, "res://sprites/common/bullet/arrow.tscn", null, null, null, null, null, "res://sprites/common/bullet/snowflake.tscn"]
@ -52,8 +52,7 @@ const sfxtracks = ["res://sfx/braindamage.wav", "res://sfx/gaugefill.wav", "res:
var debug = false
const release = "R0.1.11-dev"
var sk = false
var xm = 0
var ym = 0
var gamepad = 0
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.

View file

@ -0,0 +1,20 @@
extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready():
if !Global.debug:
_statrebase()
Global.live = 1
#pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _statrebase():
for i in 4:
if Global.party[i][0] != null:
for j in 7:
Global.cstats[Global.party[i][0]][j] = Global.basestats[Global.party[i][0]][j] * Global.level[Global.dparty[i][0]]

View file

@ -0,0 +1,237 @@
[gd_scene load_steps=19 format=3 uid="uid://c4ldh7ydn78bh"]
[ext_resource type="Script" path="res://levels/Ceres/honkerrailway.gd" id="1_75qhf"]
[ext_resource type="Texture2D" uid="uid://l26qimo56l1w" path="res://sprites/ceres/items/hkr.png" id="2_qaay0"]
[ext_resource type="Texture2D" uid="uid://c1jjhut8fuf1w" path="res://sprites/ceres/railway/sprite.png" id="3_4r2wm"]
[ext_resource type="PackedScene" uid="uid://cehe6sm8ly06u" path="res://sprites/common/player/player.tscn" id="3_uvwc3"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nytv7"]
size = Vector2(20, 761)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wkumn"]
size = Vector2(1283, 20)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_dw13o"]
size = Vector2(224, 409)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hyd1a"]
size = Vector2(86, 256)
[sub_resource type="Animation" id="Animation_i5rhc"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_8my4d"]
resource_name = "eidle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [6]
}
[sub_resource type="Animation" id="Animation_op07l"]
resource_name = "ewalk"
length = 0.3
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [7, 6, 8]
}
[sub_resource type="Animation" id="Animation_cajcr"]
resource_name = "nidle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.2),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [3]
}
[sub_resource type="Animation" id="Animation_7lhgw"]
resource_name = "nwalk"
length = 0.3
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [4, 3, 5]
}
[sub_resource type="Animation" id="Animation_w3ius"]
resource_name = "sidle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_u56r5"]
resource_name = "swalk"
length = 0.3
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [1, 0, 2]
}
[sub_resource type="Animation" id="Animation_isodq"]
resource_name = "widle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.2),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [9]
}
[sub_resource type="Animation" id="Animation_letwb"]
resource_name = "wwalk"
length = 0.3
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [10, 9, 11]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_mh65y"]
_data = {
"RESET": SubResource("Animation_i5rhc"),
"eidle": SubResource("Animation_8my4d"),
"ewalk": SubResource("Animation_op07l"),
"nidle": SubResource("Animation_cajcr"),
"nwalk": SubResource("Animation_7lhgw"),
"sidle": SubResource("Animation_w3ius"),
"swalk": SubResource("Animation_u56r5"),
"widle": SubResource("Animation_isodq"),
"wwalk": SubResource("Animation_letwb")
}
[node name="Honkerrailway" type="Node2D"]
script = ExtResource("1_75qhf")
metadata/_edit_horizontal_guides_ = [0.0]
[node name="ColorRect" type="ColorRect" parent="."]
custom_minimum_size = Vector2(1280, 720)
offset_right = 1280.0
offset_bottom = 720.0
color = Color(0.839216, 0.658824, 0.32549, 1)
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2(-11, 361.5)
shape = SubResource("RectangleShape2D_nytv7")
[node name="StaticBody2D2" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D2"]
position = Vector2(1293, 358)
shape = SubResource("RectangleShape2D_nytv7")
[node name="StaticBody2D3" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D3"]
position = Vector2(641.5, -9)
shape = SubResource("RectangleShape2D_wkumn")
[node name="StaticBody2D4" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D4"]
position = Vector2(644, 731)
shape = SubResource("RectangleShape2D_wkumn")
[node name="StaticBody2D5" type="StaticBody2D" parent="."]
position = Vector2(635, 214)
[node name="Sprite2D" type="Sprite2D" parent="StaticBody2D5"]
texture = ExtResource("2_qaay0")
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D5"]
position = Vector2(1, -4.5)
shape = SubResource("RectangleShape2D_dw13o")
[node name="Railwaygirl" type="CharacterBody2D" parent="."]
position = Vector2(473, 133)
[node name="Sprite2D" type="Sprite2D" parent="Railwaygirl"]
texture = ExtResource("3_4r2wm")
hframes = 3
vframes = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="Railwaygirl"]
shape = SubResource("RectangleShape2D_hyd1a")
[node name="AnimationPlayer" type="AnimationPlayer" parent="Railwaygirl"]
libraries = {
"": SubResource("AnimationLibrary_mh65y")
}
[node name="Player" parent="." instance=ExtResource("3_uvwc3")]
position = Vector2(633, 590)

View file

@ -56,3 +56,9 @@ func _on_lilytest_pressed() -> void:
Global.dplace = [0, 0, 0]
Global.live = 1
get_tree().change_scene_to_file("res://levels/ui/gameplay.tscn")
func _on_dialogtest_pressed() -> void:
Global.dplace = [1, 8, 11]
Global.live = 1
get_tree().change_scene_to_file("res://levels/ui/gameplay.tscn")

View file

@ -67,7 +67,7 @@ text = "MENU_MAP"
layout_mode = 2
theme_override_font_sizes/font_size = 32
theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs")
text = "BUTTON_PLACEHOLDER"
text = "Honker Railway"
[node name="Bullethell" type="Button" parent="VBoxContainer"]
layout_mode = 2
@ -95,4 +95,5 @@ text = "BUTTON_RETURN"
[connection signal="pressed" from="VBoxContainer/L20" to="." method="_on_l_20_pressed"]
[connection signal="pressed" from="VBoxContainer/Lilytest" to="." method="_on_lilytest_pressed"]
[connection signal="pressed" from="VBoxContainer/Dialogtest" to="." method="_on_dialogtest_pressed"]
[connection signal="pressed" from="VBoxContainer/Back" to="." method="_on_back_pressed"]

View file

@ -1,5 +1,6 @@
extends Control
const gamepadtest = preload("res://gamepad.gd")
var joyname
var lxaxis
var lyaxis
@ -56,7 +57,15 @@ func _process(delta):
func _input(event):
if Input.is_key_pressed(KEY_ESCAPE) || (Input.is_joy_button_pressed(0,JOY_BUTTON_A) && (Input.is_joy_button_pressed(0,JOY_BUTTON_B))):
get_tree().change_scene_to_file("res://levels/ui/debug.tscn")
joyname.set_text("Current Device: "+str(Input.get_joy_name(0))+"\nIf drift threshold is 0.2 or higher, your gamepad need new sticks")
gamepadtest.new(event)
if Global.gamepad == 1:
joyname.set_text("Current Device: "+str(Input.get_joy_name(0))+"\nController Type: Western"+"\nIf drift threshold is 0.2 or higher, your gamepad need new sticks")
elif Global.gamepad == 2:
joyname.set_text("Current Device: "+str(Input.get_joy_name(0))+"\nController Type: Japanese"+"\nIf drift threshold is 0.2 or higher, your gamepad need new sticks")
elif Global.gamepad == 3:
joyname.set_text("Current Device: "+str(Input.get_joy_name(0))+"\nController Type: Geo"+"\nIf drift threshold is 0.2 or higher, your gamepad need new sticks")
elif Global.gamepad == 0:
joyname.set_text("Current Device: "+str(Input.get_joy_name(0))+"\nController Type: Keyboard"+"\nIf drift threshold is 0.2 or higher, your gamepad need new sticks")
lxaxis.set_text("Left X Axis "+str(Input.get_joy_axis(0,JOY_AXIS_LEFT_X)))
lyaxis.set_text("Left Y Axis "+str(Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)))
rxaxis.set_text("Right X Axis "+str(Input.get_joy_axis(0,JOY_AXIS_RIGHT_X)))

View file

@ -1,4 +1,5 @@
extends Node2D
const gamepadtest = preload("res://gamepad.gd")
var level
var player
var music
@ -58,21 +59,7 @@ func _process(delta):
#velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta
func _input(event):
Global.xm = 0
Global.ym = 0
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:
Global.xm = Input.get_joy_axis(0,JOY_AXIS_LEFT_X)
Global.ym = Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
else:
if Input.is_action_pressed("ui_left"):
Global.xm = -1
if Input.is_action_pressed("ui_right"):
Global.xm = 1
if Input.is_action_pressed("ui_up"):
Global.ym = -1
if Input.is_action_pressed("ui_down"):
Global.ym = 1
gamepadtest.new(event)
if Input.is_action_just_pressed("Pause") && Global.cdialog == []:
_pausemenu()
#Global.exitgame = true

View file

@ -75,7 +75,7 @@ ui_down={
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":91,"physical_keycode":0,"key_label":0,"unicode":91,"location":0,"echo":false,"script":null)
]
}
shoot={
button0={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)

BIN
sprites/ceres/items/hkr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View 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

Binary file not shown.

View file

@ -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():

View file

@ -2,8 +2,20 @@
TEXT_DISCLAIMER;Disclaimer\nPlaying with fireworks inside a videogame can give hours of fun,\nbut in real life is dangerous\nLife insurance exists only on fiction;Descargo de responsabilidad\nJugar con explosivos dentro de un videojuego puede dar horas de diversión\npero en la vida real es peligroso\nLos seguros de vida solamente existen en la ficción;免責事項\nビデオゲームの中で花火で遊ぶと何時間も楽しめます。\nしかし現実では危険である\n生命保険はフィクションの上にのみ存在する
TEXT_WIP;This game is under development\nMore content will be added in following releases;Este juego está en desarrollo\nMás contenido se agregará en los siguientes lanzamientos;このゲームは現在開発中です\n今後のリリースではさらにコンテンツが追加される予定です
TEXT_CONTINUE;Press Enter or B to continue;Presiona Intro o B para continuar;Enter または B を押して続行します
TEXT_CONTINUE_KB;Press Enter to continue;Presiona Intro para continuar;Enterを押して続行します
TEXT_CONTINUE_JA;Press A to continue;Presiona A para continuar;Aを押して続行します
TEXT_CONTINUE_US;Press B to continue;Presiona B para continuar;Bを押して続行します
TEXT_CONTINUE_GEO;Press ○ to continue;Presiona ○ para continuar;○を押して続行します
TEXT_START;Press Enter or B to start;Presiona Intro o B para iniciar;EnterまたはBを押して開始します
TEXT_START_KB;Press Enter to start;Presiona Intro para iniciar;Enterを押して開始
TEXT_START_JP;Press A to start;Presiona A para iniciar;Aを押して開始
TEXT_START_US;Press B to start;Presiona B para iniciar;Bを押して開始
TEXT_START_GEO;Press ○ to start;Presiona ○ para iniciar;○を押して開始
TEXT_EXIT;Press Escape or A to exit;Presiona Escape o A para salir;終了するにはEscまたはAを押してください
TEXT_EXIT_KB;Press Escape to exit;Presiona Escape para salir;終了するにはEscキーを押してください
TEXT_EXIT_JP;Press B to exit;Presiona B para salir;終了するにはBキーを押してください
TEXT_EXIT_US;Press A to exit;Presiona A para salir;終了するにはAキーを押してください
TEXT_EXIT_GEO;Press X to exit;Presiona X para salir;終了するにはXキーを押してください
GAME_NAME;Midori in the Magic School;Midori in the Magic School;改造魔法学校のミドリ
BUTTON_START;Start;Iniciar;始める
BUTTON_DEBUG;Debug;Depurar;デバッグ

1 en es ja
2 TEXT_DISCLAIMER Disclaimer\nPlaying with fireworks inside a videogame can give hours of fun,\nbut in real life is dangerous\nLife insurance exists only on fiction Descargo de responsabilidad\nJugar con explosivos dentro de un videojuego puede dar horas de diversión\npero en la vida real es peligroso\nLos seguros de vida solamente existen en la ficción 免責事項\nビデオゲームの中で花火で遊ぶと何時間も楽しめます。\nしかし現実では危険である\n生命保険はフィクションの上にのみ存在する
3 TEXT_WIP This game is under development\nMore content will be added in following releases Este juego está en desarrollo\nMás contenido se agregará en los siguientes lanzamientos このゲームは現在開発中です\n今後のリリースではさらにコンテンツが追加される予定です
4 TEXT_CONTINUE Press Enter or B to continue Presiona Intro o B para continuar Enter または B を押して続行します
5 TEXT_CONTINUE_KB Press Enter to continue Presiona Intro para continuar Enterを押して続行します
6 TEXT_CONTINUE_JA Press A to continue Presiona A para continuar Aを押して続行します
7 TEXT_CONTINUE_US Press B to continue Presiona B para continuar Bを押して続行します
8 TEXT_CONTINUE_GEO Press ○ to continue Presiona ○ para continuar ○を押して続行します
9 TEXT_START Press Enter or B to start Presiona Intro o B para iniciar EnterまたはBを押して開始します
10 TEXT_START_KB Press Enter to start Presiona Intro para iniciar Enterを押して開始
11 TEXT_START_JP Press A to start Presiona A para iniciar Aを押して開始
12 TEXT_START_US Press B to start Presiona B para iniciar Bを押して開始
13 TEXT_START_GEO Press ○ to start Presiona ○ para iniciar ○を押して開始
14 TEXT_EXIT Press Escape or A to exit Presiona Escape o A para salir 終了するにはEscまたはAを押してください
15 TEXT_EXIT_KB Press Escape to exit Presiona Escape para salir 終了するにはEscキーを押してください
16 TEXT_EXIT_JP Press B to exit Presiona B para salir 終了するにはBキーを押してください
17 TEXT_EXIT_US Press A to exit Presiona A para salir 終了するにはAキーを押してください
18 TEXT_EXIT_GEO Press X to exit Presiona X para salir 終了するにはXキーを押してください
19 GAME_NAME Midori in the Magic School Midori in the Magic School 改造魔法学校のミドリ
20 BUTTON_START Start Iniciar 始める
21 BUTTON_DEBUG Debug Depurar デバッグ

View file

@ -4,11 +4,12 @@ extends Control
# Called when the node enters the scene tree for the first time.
var bgsound := AudioStreamPlayer.new()
var wait
const gamepadtest = preload("res://gamepad.gd")
#var galaxy = preload("res://backgounds/galaxy.tscn").instantiate()
#var wormhole = preload("res://backgounds/wormhole.tscn").instantiate()
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
#Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
#if (OS.get_name() != "Linux" && !OS.get_name().ends_with("BSD")) || OS.get_distribution_name().contains("Kali") || !OS.get_data_dir().begins_with("/home") || OS.get_environment("WSL_DISTRO_NAME").length() < 0:
# Global.sk = true
Global.gamelevel = null
@ -28,6 +29,7 @@ func _process(delta):
func _input(event):
# Mouse in viewport coordinates.
gamepadtest.new(event)
if Input.is_action_just_pressed("ui_accept"):
#print("Mouse Click/Unclick at: ", event.position)
get_tree().change_scene_to_file("res://levels/ui/tmenu.tscn")