You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.1 KiB
24 lines
1.1 KiB
extends Node2D
|
|
|
|
const MotionLib = preload("res://scenes/Global/MotionLib.gd")
|
|
const RenderLib = preload("res://scenes/Global/RenderLib.gd")
|
|
const FightLib = preload("res://scenes/Global/FightLib.gd")
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
var player1 = FightLib.CharacterLineup.new()
|
|
var player2 = FightLib.CharacterLineup.new()
|
|
|
|
var m : MotionLib.MotionReport = FightLib.new().calculateFight(player1, player2)
|
|
var r : RenderLib.RenderReport = RenderLib.RenderReport.new(m)
|
|
|
|
for round in r.rounds:
|
|
var activeIndex = round.action
|
|
var reactiveIndex = 0 if round.action == 1 else 0
|
|
var orientation = "Left" if round.action == 1 else "Right"
|
|
|
|
print("%s Player {'Animation': '%s', 'hp_change': %f, 'stamina_change': %f}" % [orientation, round.animations[0].animation, round.animations[0].hp_change, round.animations[0].stamina_change])
|
|
if round.animations[1] != null:
|
|
print("Other Player {'Animation': '%s', 'hp_change': %f, 'stamina_change': %f}" % [round.animations[1].animation, round.animations[1].hp_change, round.animations[1].stamina_change])
|
|
print()
|