mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
fixing
This commit is contained in:
@@ -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