mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 12:16:14 +01:00
fixing
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=19 format=3 uid="uid://bikdn7ep2vpxw"]
|
||||
[gd_scene load_steps=23 format=3 uid="uid://bikdn7ep2vpxw"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Train.gd" id="1_mcmgl"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1mymb38wqdg6" path="res://Nodes/train.tscn" id="2_xoa1a"]
|
||||
@@ -13,6 +13,10 @@
|
||||
[ext_resource type="Texture2D" uid="uid://djsergj3l4t2c" path="res://o_walking_ball2.png" id="9_rt6ws"]
|
||||
[ext_resource type="Texture2D" uid="uid://ctssikrodjqvc" path="res://o_walking_powder2.png" id="11_eefgn"]
|
||||
[ext_resource type="Texture2D" uid="uid://nctqw3vt5q0y" path="res://o_walking_coal2.png" id="12_581v4"]
|
||||
[ext_resource type="PackedScene" uid="uid://bkpnrgcfr1jgl" path="res://Nodes/Bin.tscn" id="14_n2rwc"]
|
||||
[ext_resource type="PackedScene" uid="uid://byo1m0n20yl45" path="res://Nodes/cannon.tscn" id="15_sof53"]
|
||||
[ext_resource type="PackedScene" uid="uid://cet80w4yr8rse" path="res://Storage.tscn" id="16_7dojn"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhivunrkj87cy" path="res://Nodes/engine.tscn" id="17_regf7"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_dijw3"]
|
||||
size = Vector3(1, 3.77669, 24)
|
||||
@@ -112,3 +116,26 @@ frames = SubResource("SpriteFrames_ltjyh")
|
||||
animation = &"walking_coal"
|
||||
speed_scale = 2.0
|
||||
playing = true
|
||||
|
||||
[node name="Bin" parent="." instance=ExtResource("14_n2rwc")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.18577, 0.622175, 10.6544)
|
||||
|
||||
[node name="Cannon" parent="." instance=ExtResource("15_sof53")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.90697, 1.80346, 0.245877)
|
||||
|
||||
[node name="Cannon2" parent="." instance=ExtResource("15_sof53")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.90697, 1.80346, -5.83086)
|
||||
|
||||
[node name="Storage" parent="." instance=ExtResource("16_7dojn")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.30738, 0.293261, -10.1586)
|
||||
|
||||
[node name="Storage2" parent="." instance=ExtResource("16_7dojn")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.67656, 0.293261, -1.79235)
|
||||
currentType = 1
|
||||
|
||||
[node name="Storage3" parent="." instance=ExtResource("16_7dojn")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.79878, 0.293261, 6.13508)
|
||||
currentType = 2
|
||||
|
||||
[node name="Engine" parent="." instance=ExtResource("17_regf7")]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 2.86451, 1.17834, 10.1923)
|
||||
|
||||
@@ -21,7 +21,6 @@ size_flags_horizontal = 4
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
custom_minimum_size = Vector2(15, 0)
|
||||
layout_mode = 1
|
||||
anchors_preset = 13
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
@@ -30,7 +29,6 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VSlider" type="VSlider" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 13
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
@@ -48,7 +46,6 @@ editable = false
|
||||
scrollable = false
|
||||
|
||||
[node name="VSlider2" type="VSlider" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 13
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
|
||||
@@ -38,7 +38,8 @@ func _ready():
|
||||
p2_train.is_P1 = false
|
||||
p1_train.hit.connect(_on_hit_player)
|
||||
p2_train.hit.connect(_on_hit_player)
|
||||
p1_train.current_speed = 3
|
||||
p1_train.current_speed = 6
|
||||
p2_train.current_speed = 6
|
||||
|
||||
func getMapSize(node, is_start):
|
||||
if node == StartNode && not is_start:
|
||||
@@ -101,7 +102,7 @@ func mapSimulation(delta):
|
||||
|
||||
func fightSimulation():
|
||||
#FIGHT SIMULATION
|
||||
print(p1_train.current_distance - p2_train.current_distance)
|
||||
#print(p1_train.current_distance - p2_train.current_distance)
|
||||
if(p1_node == p2_node && abs(p1_train.current_distance - p2_train.current_distance) < 0.5):
|
||||
if(fight_state == CHILL):
|
||||
fight_state = FIGHTING
|
||||
|
||||
@@ -38,5 +38,6 @@ func shoot():
|
||||
currentStashValue -= 1
|
||||
currentPowderStashValue = 0
|
||||
currentState = STATE.INACTIVE
|
||||
print("pew")
|
||||
return true
|
||||
return false
|
||||
|
||||
@@ -3,7 +3,7 @@ class_name TrainEngine
|
||||
|
||||
|
||||
enum STATE {RUNNING, DEAD}
|
||||
const maxSpeed = 6
|
||||
const maxSpeed = 10
|
||||
const refuelRate = 0.5
|
||||
|
||||
@onready var train = get_parent() as Train
|
||||
@@ -32,8 +32,8 @@ func interact(player):
|
||||
|
||||
func _process(delta):
|
||||
if not train.is_dead():
|
||||
train.current_speed -= 0.1 * delta
|
||||
print(train.current_speed)
|
||||
train.current_speed -= 0.1 * delta * 0.25
|
||||
print("Player ",train.is_P1,train.current_speed)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ enum TYPE {AMMO, GUNPOWDER, COAL}
|
||||
func _ready():
|
||||
var root = get_tree().root.get_child(0)
|
||||
#root.ammo_pickup.connect(_on_signal_storing)
|
||||
maxStashValue = 5
|
||||
currentStashValue = 5
|
||||
maxStashValue = 10
|
||||
currentStashValue = 10
|
||||
|
||||
func interact(player):
|
||||
if currentStashValue >= 1:
|
||||
|
||||
Reference in New Issue
Block a user