diff --git a/final/17-Attack demo with Heartbeast/end/.import/bg.png-ca4dd02b5a08671d1e8200d74b5e8347.stex b/final/17-Attack demo with Heartbeast/end/.import/bg.png-ca4dd02b5a08671d1e8200d74b5e8347.stex new file mode 100644 index 0000000..693738d Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/.import/bg.png-ca4dd02b5a08671d1e8200d74b5e8347.stex differ diff --git a/final/17-Attack demo with Heartbeast/end/.import/buddy_green.png-2eb85c58aef2a5294e97d930fe09f0e5.stex b/final/17-Attack demo with Heartbeast/end/.import/buddy_green.png-2eb85c58aef2a5294e97d930fe09f0e5.stex new file mode 100644 index 0000000..e742062 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/.import/buddy_green.png-2eb85c58aef2a5294e97d930fe09f0e5.stex differ diff --git a/final/17-Attack demo with Heartbeast/end/.import/foe_pink.png-e53b2a7e2ae7e41f1caa814d90a4f307.stex b/final/17-Attack demo with Heartbeast/end/.import/foe_pink.png-e53b2a7e2ae7e41f1caa814d90a4f307.stex new file mode 100644 index 0000000..df63a37 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/.import/foe_pink.png-e53b2a7e2ae7e41f1caa814d90a4f307.stex differ diff --git a/final/17-Attack demo with Heartbeast/end/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/final/17-Attack demo with Heartbeast/end/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex new file mode 100644 index 0000000..16fb345 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex differ diff --git a/final/17-Attack demo with Heartbeast/end/.import/shadow.png-7ac08bc6ed7dcf19791e52a1c588d64c.stex b/final/17-Attack demo with Heartbeast/end/.import/shadow.png-7ac08bc6ed7dcf19791e52a1c588d64c.stex new file mode 100644 index 0000000..01415d3 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/.import/shadow.png-7ac08bc6ed7dcf19791e52a1c588d64c.stex differ diff --git a/final/17-Attack demo with Heartbeast/end/.import/shadow.png-9b88bc6b24165e21f04edb7eaa0e0cce.stex b/final/17-Attack demo with Heartbeast/end/.import/shadow.png-9b88bc6b24165e21f04edb7eaa0e0cce.stex new file mode 100644 index 0000000..01415d3 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/.import/shadow.png-9b88bc6b24165e21f04edb7eaa0e0cce.stex differ diff --git a/final/17-Attack demo with Heartbeast/end/.import/spear_enemy.png-b325bd4ecef242c2d8570488a23b715b.stex b/final/17-Attack demo with Heartbeast/end/.import/spear_enemy.png-b325bd4ecef242c2d8570488a23b715b.stex new file mode 100644 index 0000000..772786a Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/.import/spear_enemy.png-b325bd4ecef242c2d8570488a23b715b.stex differ diff --git a/final/17-Attack demo with Heartbeast/end/.import/sword_enemy.png-41731279fc65f79e376db0eb84917f2f.stex b/final/17-Attack demo with Heartbeast/end/.import/sword_enemy.png-41731279fc65f79e376db0eb84917f2f.stex new file mode 100644 index 0000000..5149fe6 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/.import/sword_enemy.png-41731279fc65f79e376db0eb84917f2f.stex differ diff --git a/final/17-Attack demo with Heartbeast/end/.import/sword_player.png-fa08b35650d3d8263f7b1e08cb6ba3c8.stex b/final/17-Attack demo with Heartbeast/end/.import/sword_player.png-fa08b35650d3d8263f7b1e08cb6ba3c8.stex new file mode 100644 index 0000000..aaf641d Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/.import/sword_player.png-fa08b35650d3d8263f7b1e08cb6ba3c8.stex differ diff --git a/final/17-Attack demo with Heartbeast/end/Game.tscn b/final/17-Attack demo with Heartbeast/end/Game.tscn new file mode 100644 index 0000000..dea3af7 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/Game.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://art/bg.png" type="Texture" id=1] +[ext_resource path="res://characters/player/Player.tscn" type="PackedScene" id=2] +[ext_resource path="res://characters/enemy/Enemy.tscn" type="PackedScene" id=3] + +[node name="Game" type="Node"] + +[node name="bg" type="Sprite" parent="."] + +position = Vector2( 511.5, 320.5 ) +scale = Vector2( 0.748902, 0.832031 ) +texture = ExtResource( 1 ) +_sections_unfolded = [ "Transform" ] +__meta__ = { +"_edit_lock_": true +} + +[node name="Player" parent="." instance=ExtResource( 2 )] + +position = Vector2( 329, 444 ) + +[node name="Enemy" parent="." instance=ExtResource( 3 )] + +position = Vector2( 699, 371 ) + +[node name="Enemy2" parent="." instance=ExtResource( 3 )] + +position = Vector2( 622, 559 ) + +[node name="Enemy3" parent="." instance=ExtResource( 3 )] + +position = Vector2( 133, 365 ) +max_health = 4 + + diff --git a/final/17-Attack demo with Heartbeast/end/art/bg.png b/final/17-Attack demo with Heartbeast/end/art/bg.png new file mode 100644 index 0000000..4756bd6 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/art/bg.png differ diff --git a/final/17-Attack demo with Heartbeast/end/art/bg.png.import b/final/17-Attack demo with Heartbeast/end/art/bg.png.import new file mode 100644 index 0000000..a930a04 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/art/bg.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/bg.png-ca4dd02b5a08671d1e8200d74b5e8347.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/end/characters/Character.gd b/final/17-Attack demo with Heartbeast/end/characters/Character.gd new file mode 100644 index 0000000..bf1ca29 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/Character.gd @@ -0,0 +1,105 @@ +extends KinematicBody2D + +signal health_changed +signal died + +export(String) var weapon_scene_path = "res://characters/weapons/spear/Spear.tscn" + +var weapon = null +var weapon_path = "" + +onready var animation_player = $AnimationPlayer + +enum STATES {IDLE, WALK, ATTACK, STAGGER, DIE, DEAD} +var current_state = null +var previous_state = null + +var speed = 400 +var look_direction = Vector2(1, 0) +var move_direction = Vector2() +var input_direction = Vector2() + + +export var max_health = 1 +var health + + +func _ready(): + health = max_health + + # Weapon setup + var weapon_instance = load(weapon_scene_path).instance() + var weapon_anchor = $WeaponSpawnPoint/WeaponAnchorPoint + weapon_anchor.add_child(weapon_instance) + + weapon = weapon_anchor.get_child(0) + + weapon_path = weapon.get_path() + weapon.connect("attack_finished", self, "_on_Weapon_attack_finished") + + _change_state(IDLE) + + + +func _physics_process(delta): + + # Movement + if current_state == IDLE: + if input_direction: + _change_state(WALK) + + if current_state == WALK: + move_direction = input_direction + + if move_direction.x: + look_direction.x = move_direction.x + $WeaponSpawnPoint.scale.x = look_direction.x + if move_direction.y: + look_direction.y = move_direction.y + + if not move_direction: + _change_state(IDLE) + + var velocity = move_direction * speed * delta + move_and_collide(velocity) + + +func _change_state(new_state): + previous_state = current_state + current_state = new_state + + # initialize/enter the state + match new_state: + IDLE: + animation_player.play("idle") + ATTACK: + # see Weapon.gd for damage management + weapon.attack() + STAGGER: + animation_player.play("take_damage") + DEAD: + queue_free() + + +func take_damage(count): + if current_state == DEAD: + return + + health -= count + if health <= 0: + health = 0 + _change_state(DEAD) + emit_signal("died") + return + + _change_state(STAGGER) + emit_signal("health_changed", health) + + +func _on_AnimationPlayer_animation_finished( name ): + if name == "take_damage": + _change_state(IDLE) + + +func _on_Weapon_attack_finished(): + _change_state(IDLE) diff --git a/final/17-Attack demo with Heartbeast/end/characters/Character.tscn b/final/17-Attack demo with Heartbeast/end/characters/Character.tscn new file mode 100644 index 0000000..b168b22 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/Character.tscn @@ -0,0 +1,123 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://characters/Character.gd" type="Script" id=1] +[ext_resource path="res://characters/shared/shadow.png" type="Texture" id=2] +[ext_resource path="res://characters/player/buddy_green.png" type="Texture" id=3] +[ext_resource path="res://characters/DebugCharacter.gd" type="Script" id=4] + +[sub_resource type="Animation" id=1] + +resource_name = "_setup" +length = 1.0 +loop = false +step = 0.1 + +[sub_resource type="Animation" id=2] + +resource_name = "idle" +length = 1.0 +loop = false +step = 0.1 + +[sub_resource type="Animation" id=3] + +resource_name = "take_damage" +length = 0.6 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("Body:self_modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0, 0.6 ), +"transitions": PoolRealArray( 0.390557, 1 ), +"update": 0, +"values": [ Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ) ] +} + +[sub_resource type="RectangleShape2D" id=4] + +custom_solver_bias = 0.0 +extents = Vector2( 19.9141, 16 ) +_sections_unfolded = [ "Resource" ] + +[node name="Character" type="KinematicBody2D" groups=[ +"character", +]] + +input_pickable = false +collision_layer = 1 +collision_mask = 1 +collision/safe_margin = 0.08 +script = ExtResource( 1 ) +_sections_unfolded = [ "Collision", "collision" ] +weapon_scene_path = "res://characters/weapons/spear/Spear.tscn" +max_health = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] + +playback_process_mode = 1 +playback_default_blend_time = 0.0 +root_node = NodePath("..") +anims/_setup = SubResource( 1 ) +anims/idle = SubResource( 2 ) +anims/take_damage = SubResource( 3 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" + +[node name="Shadow" type="Sprite" parent="."] + +scale = Vector2( 0.546225, 0.546225 ) +texture = ExtResource( 2 ) +_sections_unfolded = [ "Transform" ] + +[node name="Body" type="Sprite" parent="."] + +scale = Vector2( 0.446435, 0.446435 ) +texture = ExtResource( 3 ) +offset = Vector2( 0, -69 ) +_sections_unfolded = [ "Offset", "Transform", "Visibility" ] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +position = Vector2( 0, -15.8886 ) +shape = SubResource( 4 ) + +[node name="WeaponSpawnPoint" type="Node2D" parent="."] + +position = Vector2( 0, -30 ) +_sections_unfolded = [ "Transform" ] + +[node name="WeaponAnchorPoint" type="Node2D" parent="WeaponSpawnPoint"] + +_sections_unfolded = [ "Transform" ] + +[node name="DisplayDebugInfo" type="Label" parent="."] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_left = -46.0 +margin_top = -84.0 +margin_right = 47.0 +margin_bottom = -68.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +mouse_filter = 2 +size_flags_horizontal = 1 +size_flags_vertical = 4 +text = "Debug info" +align = 1 +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 +script = ExtResource( 4 ) + +[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"] + + diff --git a/final/17-Attack demo with Heartbeast/end/characters/DebugCharacter.gd b/final/17-Attack demo with Heartbeast/end/characters/DebugCharacter.gd new file mode 100644 index 0000000..0a21e4a --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/DebugCharacter.gd @@ -0,0 +1,9 @@ +extends Label + +onready var Character = $'..' + +func _ready(): + visible = false + +func _physics_process(delta): + text = str(Character.current_state) \ No newline at end of file diff --git a/final/17-Attack demo with Heartbeast/end/characters/enemy/Enemy.gd b/final/17-Attack demo with Heartbeast/end/characters/enemy/Enemy.gd new file mode 100644 index 0000000..abe4648 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/enemy/Enemy.gd @@ -0,0 +1,67 @@ +extends "res://characters/Character.gd" + +export(int) var patrol_distance = 200 +var start_position = Vector2() +var end_position = Vector2() + +enum STATES_MIND {WAIT, MOVE, ACT} +var current_mind_state = WAIT +var previous_mind_state = null + +var last_move_direction = Vector2() + +onready var wait_timer = $WaitTimer +onready var attack_timer = $AttackTimer + +var first_ai_cycle = true + +func _ready(): + speed = 240 + start_position = position + end_position = start_position + Vector2(patrol_distance, 0) + + _change_mind_state(WAIT) + randomize() + wait_timer.stop() + wait_timer.wait_time = randf() * 3 + wait_timer.start() + + +func _physics_process(delta): + if current_mind_state == MOVE: + if input_direction.x == 1 and position.x > end_position.x \ + or input_direction.x == -1 and position.x < start_position.x: + last_move_direction = input_direction + _change_mind_state(WAIT) + + +func _change_mind_state(new_state): + previous_mind_state = current_mind_state + current_mind_state = new_state + + match current_mind_state: + WAIT: + input_direction = Vector2() + wait_timer.wait_time = 1.0 + wait_timer.start() + MOVE: + input_direction.x = -last_move_direction.x + if last_move_direction.x == 0: + input_direction.x = 1 + wait_timer.stop() + + +func _on_WaitTimer_timeout(): + wait_timer.stop() + if first_ai_cycle: + first_ai_cycle = false + _change_mind_state(MOVE) + return + + _change_state(ATTACK) + _change_mind_state(ACT) + + +func _on_Weapon_attack_finished(): + _change_mind_state(MOVE) + _change_state(IDLE) diff --git a/final/17-Attack demo with Heartbeast/end/characters/enemy/Enemy.tscn b/final/17-Attack demo with Heartbeast/end/characters/enemy/Enemy.tscn new file mode 100644 index 0000000..2db536c --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/enemy/Enemy.tscn @@ -0,0 +1,45 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://characters/Character.tscn" type="PackedScene" id=1] +[ext_resource path="res://characters/enemy/Enemy.gd" type="Script" id=2] +[ext_resource path="res://characters/enemy/foe_pink.png" type="Texture" id=3] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 20.2295, 16 ) + +[node name="Enemy" instance=ExtResource( 1 )] + +script = ExtResource( 2 ) +max_health = 2 +patrol_distance = 200 + +[node name="Body" parent="."] + +texture = ExtResource( 3 ) +offset = Vector2( 0, -129 ) + +[node name="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) + +[node name="WeaponSpawnPoint" parent="."] + +position = Vector2( 0, -42 ) + +[node name="DisplayDebugInfo" parent="."] + +margin_top = -134.0 +margin_bottom = -120.0 + +[node name="WaitTimer" type="Timer" parent="."] + +process_mode = 1 +wait_time = 1.0 +one_shot = false +autostart = false + +[connection signal="timeout" from="WaitTimer" to="." method="_on_WaitTimer_timeout"] + + diff --git a/final/17-Attack demo with Heartbeast/end/characters/enemy/foe_pink.png b/final/17-Attack demo with Heartbeast/end/characters/enemy/foe_pink.png new file mode 100644 index 0000000..b91a0a0 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/characters/enemy/foe_pink.png differ diff --git a/final/17-Attack demo with Heartbeast/end/characters/enemy/foe_pink.png.import b/final/17-Attack demo with Heartbeast/end/characters/enemy/foe_pink.png.import new file mode 100644 index 0000000..fc2e410 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/enemy/foe_pink.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/foe_pink.png-e53b2a7e2ae7e41f1caa814d90a4f307.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/end/characters/player/Player.gd b/final/17-Attack demo with Heartbeast/end/characters/player/Player.gd new file mode 100644 index 0000000..9963756 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/player/Player.gd @@ -0,0 +1,21 @@ +extends "res://characters/Character.gd" + + +func _input(event): + if event.is_action_pressed("attack"): + if current_state in [ATTACK, STAGGER, DIE, DEAD]: + return + _change_state(ATTACK) + + +func _physics_process(delta): + input_direction = Vector2() + + if Input.is_action_pressed("move_left"): + input_direction.x = -1 + elif Input.is_action_pressed("move_right"): + input_direction.x = 1 + elif Input.is_action_pressed("move_up"): + input_direction.y = -1 + elif Input.is_action_pressed("move_down"): + input_direction.y = 1 diff --git a/final/17-Attack demo with Heartbeast/end/characters/player/Player.tscn b/final/17-Attack demo with Heartbeast/end/characters/player/Player.tscn new file mode 100644 index 0000000..6bd74bc --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/player/Player.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://characters/Character.tscn" type="PackedScene" id=1] +[ext_resource path="res://characters/player/Player.gd" type="Script" id=2] + +[node name="Player" instance=ExtResource( 1 )] + +script = ExtResource( 2 ) +weapon_scene_path = "res://characters/weapons/sword/Sword.tscn" + +[node name="WeaponAnchorPoint" parent="WeaponSpawnPoint"] + +position = Vector2( 46, 8.1054 ) + + diff --git a/final/17-Attack demo with Heartbeast/end/characters/player/buddy_green.png b/final/17-Attack demo with Heartbeast/end/characters/player/buddy_green.png new file mode 100644 index 0000000..b5f7f41 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/characters/player/buddy_green.png differ diff --git a/final/17-Attack demo with Heartbeast/end/characters/player/buddy_green.png.import b/final/17-Attack demo with Heartbeast/end/characters/player/buddy_green.png.import new file mode 100644 index 0000000..1ef8e1b --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/player/buddy_green.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/buddy_green.png-2eb85c58aef2a5294e97d930fe09f0e5.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/end/characters/shared/health.gd b/final/17-Attack demo with Heartbeast/end/characters/shared/health.gd new file mode 100644 index 0000000..6eac464 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/shared/health.gd @@ -0,0 +1,22 @@ +# Manages a character's health and death. Used by the UI to draw lifebars on any character or enemy +extends Node + +signal dead + +export var life = 0 +export var max_life = 10 +export var armor = 0 + + +func take_damage(damage): + life = life - damage + armor + if life < 0: + emit('dead') + +func heal(amount): + life += amount + if life > max_life: + life = max_life + +func get_health_ratio(): + return life / max_life \ No newline at end of file diff --git a/final/17-Attack demo with Heartbeast/end/characters/shared/shadow.png b/final/17-Attack demo with Heartbeast/end/characters/shared/shadow.png new file mode 100644 index 0000000..77e6466 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/characters/shared/shadow.png differ diff --git a/final/17-Attack demo with Heartbeast/end/characters/shared/shadow.png.import b/final/17-Attack demo with Heartbeast/end/characters/shared/shadow.png.import new file mode 100644 index 0000000..c343588 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/shared/shadow.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/shadow.png-7ac08bc6ed7dcf19791e52a1c588d64c.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/Weapon.gd b/final/17-Attack demo with Heartbeast/end/characters/weapons/Weapon.gd new file mode 100644 index 0000000..f45e78f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/weapons/Weapon.gd @@ -0,0 +1,55 @@ +extends Area2D + +signal attack_finished + +onready var animation_player = $AnimationPlayer + +enum STATES {IDLE, ATTACK} +var current_state = IDLE + +export(int) var damage = 1 + + +func _ready(): + set_physics_process(false) + + +func _physics_process(delta): + var overlapping_bodies = get_overlapping_bodies() + if not overlapping_bodies: + return + + for body in overlapping_bodies: + if not body.is_in_group("character"): + return + if is_owner(body): + return + + body.take_damage(damage) + set_physics_process(false) + + +func is_owner(node): + return node.weapon_path == get_path() + + +func _change_state(new_state): + current_state = new_state + + # Initialize the new state + match new_state: + ATTACK: + set_physics_process(true) + IDLE: + set_physics_process(false) + + +func attack(): + animation_player.play("attack") + _change_state(ATTACK) + + +func _on_AnimationPlayer_animation_finished( name ): + if name == "attack": + _change_state(IDLE) + emit_signal("attack_finished") diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/Weapon.tscn b/final/17-Attack demo with Heartbeast/end/characters/weapons/Weapon.tscn new file mode 100644 index 0000000..d753c76 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/weapons/Weapon.tscn @@ -0,0 +1,177 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://characters/weapons/Weapon.gd" type="Script" id=1] +[ext_resource path="res://characters/weapons/sword/sword_enemy.png" type="Texture" id=2] + +[sub_resource type="Animation" id=1] + +resource_name = "_setup" +length = 1.0 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:rotation_deg") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath(".:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath(".:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ) ] +} +tracks/4/type = "value" +tracks/4/path = NodePath(".:visible") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} +tracks/5/type = "value" +tracks/5/path = NodePath("CollisionPolygon2D:disabled") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} + +[sub_resource type="Animation" id=2] + +resource_name = "attack" +length = 0.4 +loop = false +step = 0.05 +tracks/0/type = "value" +tracks/0/path = NodePath(".:visible") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0, 0.35, 0.4 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 1, +"values": [ true, true, false ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("CollisionPolygon2D:disabled") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/keys = { +"times": PoolRealArray( 0, 0.35, 0.4 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 1, +"values": [ false, false, true ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Sprite:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/keys = { +"times": PoolRealArray( 0, 0.05, 0.2 ), +"transitions": PoolRealArray( 1, 0.473309, 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ), Vector2( 1.3, 1.3 ), Vector2( 1, 1 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath(".:rotation_deg") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/keys = { +"times": PoolRealArray( 0, 0.15, 0.3 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ -100.102, 98.7122, 90.0 ] +} + +[node name="Weapon" type="Area2D" groups=[ +"weapon", +]] + +rotation = 1.72285 +input_pickable = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +monitorable = false +audio_bus_override = false +audio_bus_name = "Master" +script = ExtResource( 1 ) +_sections_unfolded = [ "Collision", "Transform", "Visibility" ] +damage = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="." groups=[ +"weapon", +]] + +playback_process_mode = 1 +playback_default_blend_time = 0.0 +root_node = NodePath("..") +anims/_setup = SubResource( 1 ) +anims/attack = SubResource( 2 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] + +position = Vector2( 1.90735e-06, 0 ) +build_mode = 0 +polygon = PoolVector2Array( 26, -13, 26, 13, 129, 13, 160, 0, 130, -13 ) +one_way_collision = true + +[node name="Sprite" type="Sprite" parent="."] + +scale = Vector2( 1.02945, 1.02945 ) +texture = ExtResource( 2 ) +offset = Vector2( 72, 0 ) +_sections_unfolded = [ "Offset", "Transform" ] + +[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"] + + diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/spear/Spear.tscn b/final/17-Attack demo with Heartbeast/end/characters/weapons/spear/Spear.tscn new file mode 100644 index 0000000..7e1e542 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/weapons/spear/Spear.tscn @@ -0,0 +1,149 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://characters/weapons/Weapon.tscn" type="PackedScene" id=1] +[ext_resource path="res://characters/weapons/spear/spear_enemy.png" type="Texture" id=2] + +[sub_resource type="Animation" id=1] + +resource_name = "_setup" +length = 1.0 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:rotation_deg") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath(".:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath(".:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ) ] +} +tracks/4/type = "value" +tracks/4/path = NodePath(".:visible") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} +tracks/5/type = "value" +tracks/5/path = NodePath("CollisionPolygon2D:disabled") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} + +[sub_resource type="Animation" id=2] + +resource_name = "attack" +length = 1.2 +loop = false +step = 0.05 +tracks/0/type = "value" +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0, 0.15, 0.3, 0.35, 0.4, 0.45, 0.55, 0.55, 0.6, 0.75, 1.1 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 5.29456, 1, 1, 1, 1, 2.46314, 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ), Vector2( -11.0626, 7.31512 ), Vector2( -13.7383, 5.24251 ), Vector2( -14.6302, 2.92606 ), Vector2( -14.6302, 0 ), Vector2( -13.8042, -3.9014 ), Vector2( 103.387, -2.38419e-06 ), Vector2( 98.998, 0 ), Vector2( 91.6829, 0 ), Vector2( 91.6829, 0 ), Vector2( 0, 0 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("CollisionPolygon2D:disabled") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ false ] +} +tracks/2/type = "value" +tracks/2/path = NodePath(".:rotation_deg") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/keys = { +"times": PoolRealArray( 0, 0.05, 0.3, 0.35, 0.4, 0.45, 0.55, 0.6 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ), +"update": 0, +"values": [ 0.0, -2.88659, 1.92508, 0.962542, 0.0, -0.896525, 0.0, 0.0 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Sprite:scale") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/keys = { +"times": PoolRealArray( 0.3, 0.45, 0.55, 0.65 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ), Vector2( 1, 1 ), Vector2( 1, 1.4 ), Vector2( 1, 1 ) ] +} + +[node name="Spear" instance=ExtResource( 1 )] + +rotation = 0.0 + +[node name="AnimationPlayer" parent="."] + +anims/_setup = SubResource( 1 ) +anims/attack = SubResource( 2 ) + +[node name="CollisionPolygon2D" parent="."] + +polygon = PoolVector2Array( 33, 0, 54, 17, 98, 0, 55, -17 ) + +[node name="Sprite" parent="."] + +scale = Vector2( 1, 1 ) +texture = ExtResource( 2 ) +offset = Vector2( -30, 0 ) + + diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/spear/spear_enemy.png b/final/17-Attack demo with Heartbeast/end/characters/weapons/spear/spear_enemy.png new file mode 100644 index 0000000..9ede6cc Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/characters/weapons/spear/spear_enemy.png differ diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/spear/spear_enemy.png.import b/final/17-Attack demo with Heartbeast/end/characters/weapons/spear/spear_enemy.png.import new file mode 100644 index 0000000..3a97405 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/weapons/spear/spear_enemy.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/spear_enemy.png-b325bd4ecef242c2d8570488a23b715b.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/Sword.tscn b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/Sword.tscn new file mode 100644 index 0000000..22ac01b --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/Sword.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://characters/weapons/Weapon.tscn" type="PackedScene" id=1] +[ext_resource path="res://characters/weapons/sword/sword_player.png" type="Texture" id=2] + +[node name="Sword" instance=ExtResource( 1 )] + +rotation = 0.0 + +[node name="CollisionPolygon2D" parent="."] + +disabled = true + +[node name="Sprite" parent="."] + +texture = ExtResource( 2 ) + + diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_enemy.png b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_enemy.png new file mode 100644 index 0000000..d97d487 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_enemy.png differ diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_enemy.png.import b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_enemy.png.import new file mode 100644 index 0000000..00751d6 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_enemy.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sword_enemy.png-41731279fc65f79e376db0eb84917f2f.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_player.png b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_player.png new file mode 100644 index 0000000..c1cb52d Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_player.png differ diff --git a/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_player.png.import b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_player.png.import new file mode 100644 index 0000000..b750def --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/characters/weapons/sword/sword_player.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sword_player.png-fa08b35650d3d8263f7b1e08cb6ba3c8.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/end/icon.png b/final/17-Attack demo with Heartbeast/end/icon.png new file mode 100644 index 0000000..4beaa6b Binary files /dev/null and b/final/17-Attack demo with Heartbeast/end/icon.png differ diff --git a/final/17-Attack demo with Heartbeast/end/icon.png.flags b/final/17-Attack demo with Heartbeast/end/icon.png.flags new file mode 100644 index 0000000..5130fd1 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/icon.png.flags @@ -0,0 +1 @@ +gen_mipmaps=false diff --git a/final/17-Attack demo with Heartbeast/end/icon.png.import b/final/17-Attack demo with Heartbeast/end/icon.png.import new file mode 100644 index 0000000..42e94a3 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/icon.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-31-39.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-31-39.txt new file mode 100644 index 0000000..9d9b572 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-31-39.txt @@ -0,0 +1,8 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: WeaponSpawnPoint/Spear + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-32-12.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-32-12.txt new file mode 100644 index 0000000..fcf4fca --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-32-12.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-32-28.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-32-28.txt new file mode 100644 index 0000000..fcf4fca --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-32-28.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-32-59.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-32-59.txt new file mode 100644 index 0000000..fcf4fca --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-32-59.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-33-50.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-33-50.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-33-50.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-33-58.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-33-58.txt new file mode 100644 index 0000000..642888a --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-33-58.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.09 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-34-14.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-34-14.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-34-14.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-34-49.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-34-49.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-34-49.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-35-31.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-35-31.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-35-31.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-35-38.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-35-38.txt new file mode 100644 index 0000000..f72083f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-35-38.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.091 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-36-10.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-36-10.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-36-10.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-37-45.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-37-45.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-37-45.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-37-58.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-37-58.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-19-14-37-58.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-04-53.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-04-53.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-04-53.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-24-04.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-24-04.txt new file mode 100644 index 0000000..59822a6 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-24-04.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.095 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-24-42.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-24-42.txt new file mode 100644 index 0000000..7e97de9 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-24-42.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-25-15.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-25-15.txt new file mode 100644 index 0000000..7e97de9 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-25-15.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-25-34.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-25-34.txt new file mode 100644 index 0000000..7e97de9 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-25-34.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-26-13.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-26-13.txt new file mode 100644 index 0000000..7e97de9 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-26-13.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-29-22.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-29-22.txt new file mode 100644 index 0000000..7e97de9 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-29-22.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-35-01.txt b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-35-01.txt new file mode 100644 index 0000000..b61818a --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log-2017-10-20-11-35-01.txt @@ -0,0 +1,8 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.093 +OPENING: D:/Library/Dropbox/Transfer/godot_kickstarter/game/collabs/Attack demo with Heartbeast/start (D:::Library::Dropbox::Transfer::godot_kickstarter::game::collabs::Attack demo with Heartbeast::start) +running cmdline: "D:\Library\Downloads\Godot-Windows-x86_64-2017-10-16.cc7f224\godot1610.exe" "--path" "D:/Library/Dropbox/Transfer/godot_kickstarter/game/collabs/Attack demo with Heartbeast/start" "--editor" diff --git a/final/17-Attack demo with Heartbeast/end/logs/log.txt b/final/17-Attack demo with Heartbeast/end/logs/log.txt new file mode 100644 index 0000000..12cb772 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/logs/log.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.1 diff --git a/final/17-Attack demo with Heartbeast/end/project.godot b/final/17-Attack demo with Heartbeast/end/project.godot new file mode 100644 index 0000000..9da4b68 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/end/project.godot @@ -0,0 +1,42 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=3 + +[application] + +config/name="Attack demo with Heartbeast" +run/main_scene="res://Game.tscn" +config/icon="res://icon.png" + +[display] + +window/size/height=640 + +[gdnative] + +singletons=[ ] + +[input] + +move_left=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) + ] +move_right=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) + ] +move_up=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) + ] +move_down=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":3,"axis_value":1.0,"script":null) + ] +attack=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) + ] diff --git a/final/17-Attack demo with Heartbeast/start/.import/bg.png-ca4dd02b5a08671d1e8200d74b5e8347.stex b/final/17-Attack demo with Heartbeast/start/.import/bg.png-ca4dd02b5a08671d1e8200d74b5e8347.stex new file mode 100644 index 0000000..693738d Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/.import/bg.png-ca4dd02b5a08671d1e8200d74b5e8347.stex differ diff --git a/final/17-Attack demo with Heartbeast/start/.import/buddy_green.png-2eb85c58aef2a5294e97d930fe09f0e5.stex b/final/17-Attack demo with Heartbeast/start/.import/buddy_green.png-2eb85c58aef2a5294e97d930fe09f0e5.stex new file mode 100644 index 0000000..e742062 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/.import/buddy_green.png-2eb85c58aef2a5294e97d930fe09f0e5.stex differ diff --git a/final/17-Attack demo with Heartbeast/start/.import/foe_pink.png-e53b2a7e2ae7e41f1caa814d90a4f307.stex b/final/17-Attack demo with Heartbeast/start/.import/foe_pink.png-e53b2a7e2ae7e41f1caa814d90a4f307.stex new file mode 100644 index 0000000..df63a37 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/.import/foe_pink.png-e53b2a7e2ae7e41f1caa814d90a4f307.stex differ diff --git a/final/17-Attack demo with Heartbeast/start/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/final/17-Attack demo with Heartbeast/start/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex new file mode 100644 index 0000000..16fb345 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex differ diff --git a/final/17-Attack demo with Heartbeast/start/.import/shadow.png-7ac08bc6ed7dcf19791e52a1c588d64c.stex b/final/17-Attack demo with Heartbeast/start/.import/shadow.png-7ac08bc6ed7dcf19791e52a1c588d64c.stex new file mode 100644 index 0000000..01415d3 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/.import/shadow.png-7ac08bc6ed7dcf19791e52a1c588d64c.stex differ diff --git a/final/17-Attack demo with Heartbeast/start/.import/shadow.png-9b88bc6b24165e21f04edb7eaa0e0cce.stex b/final/17-Attack demo with Heartbeast/start/.import/shadow.png-9b88bc6b24165e21f04edb7eaa0e0cce.stex new file mode 100644 index 0000000..01415d3 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/.import/shadow.png-9b88bc6b24165e21f04edb7eaa0e0cce.stex differ diff --git a/final/17-Attack demo with Heartbeast/start/.import/spear_enemy.png-b325bd4ecef242c2d8570488a23b715b.stex b/final/17-Attack demo with Heartbeast/start/.import/spear_enemy.png-b325bd4ecef242c2d8570488a23b715b.stex new file mode 100644 index 0000000..772786a Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/.import/spear_enemy.png-b325bd4ecef242c2d8570488a23b715b.stex differ diff --git a/final/17-Attack demo with Heartbeast/start/.import/sword_enemy.png-41731279fc65f79e376db0eb84917f2f.stex b/final/17-Attack demo with Heartbeast/start/.import/sword_enemy.png-41731279fc65f79e376db0eb84917f2f.stex new file mode 100644 index 0000000..5149fe6 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/.import/sword_enemy.png-41731279fc65f79e376db0eb84917f2f.stex differ diff --git a/final/17-Attack demo with Heartbeast/start/.import/sword_player.png-fa08b35650d3d8263f7b1e08cb6ba3c8.stex b/final/17-Attack demo with Heartbeast/start/.import/sword_player.png-fa08b35650d3d8263f7b1e08cb6ba3c8.stex new file mode 100644 index 0000000..aaf641d Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/.import/sword_player.png-fa08b35650d3d8263f7b1e08cb6ba3c8.stex differ diff --git a/final/17-Attack demo with Heartbeast/start/Game.tscn b/final/17-Attack demo with Heartbeast/start/Game.tscn new file mode 100644 index 0000000..dea3af7 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/Game.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://art/bg.png" type="Texture" id=1] +[ext_resource path="res://characters/player/Player.tscn" type="PackedScene" id=2] +[ext_resource path="res://characters/enemy/Enemy.tscn" type="PackedScene" id=3] + +[node name="Game" type="Node"] + +[node name="bg" type="Sprite" parent="."] + +position = Vector2( 511.5, 320.5 ) +scale = Vector2( 0.748902, 0.832031 ) +texture = ExtResource( 1 ) +_sections_unfolded = [ "Transform" ] +__meta__ = { +"_edit_lock_": true +} + +[node name="Player" parent="." instance=ExtResource( 2 )] + +position = Vector2( 329, 444 ) + +[node name="Enemy" parent="." instance=ExtResource( 3 )] + +position = Vector2( 699, 371 ) + +[node name="Enemy2" parent="." instance=ExtResource( 3 )] + +position = Vector2( 622, 559 ) + +[node name="Enemy3" parent="." instance=ExtResource( 3 )] + +position = Vector2( 133, 365 ) +max_health = 4 + + diff --git a/final/17-Attack demo with Heartbeast/start/art/bg.png b/final/17-Attack demo with Heartbeast/start/art/bg.png new file mode 100644 index 0000000..4756bd6 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/art/bg.png differ diff --git a/final/17-Attack demo with Heartbeast/start/art/bg.png.import b/final/17-Attack demo with Heartbeast/start/art/bg.png.import new file mode 100644 index 0000000..a930a04 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/art/bg.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/bg.png-ca4dd02b5a08671d1e8200d74b5e8347.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/start/characters/Character.gd b/final/17-Attack demo with Heartbeast/start/characters/Character.gd new file mode 100644 index 0000000..22440b5 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/Character.gd @@ -0,0 +1,105 @@ +extends KinematicBody2D + +signal health_changed +signal died + +export(String) var weapon_scene_path = "res://characters/weapons/spear/Spear.tscn" + +var weapon = null +var weapon_path = "" + +onready var animation_player = $AnimationPlayer + +enum STATES {IDLE, WALK, ATTACK, STAGGER, DIE, DEAD} +var current_state = null +var previous_state = null + +var speed = 400 +var look_direction = Vector2(1, 0) +var move_direction = Vector2() +var input_direction = Vector2() + + +export var max_health = 1 +var health + + +func _ready(): + health = max_health + + # Weapon setup + var weapon_instance = load(weapon_scene_path).instance() + var weapon_anchor = $WeaponSpawnPoint/WeaponAnchorPoint + weapon_anchor.add_child(weapon_instance) + + weapon = weapon_anchor.get_child(0) + + weapon_path = weapon.get_path() + weapon.connect("attack_finished", self, "_on_Weapon_attack_finished") + + _change_state(IDLE) + + + +func _physics_process(delta): + + # Movement + if current_state == IDLE: + if input_direction: + _change_state(WALK) + + if current_state == WALK: + move_direction = input_direction + + if move_direction.x: + look_direction.x = move_direction.x + $WeaponSpawnPoint.scale.x = look_direction.x + if move_direction.y: + look_direction.y = move_direction.y + + if not move_direction: + _change_state(IDLE) + + var velocity = move_direction * speed * delta + move_and_collide(velocity) + + +func _change_state(new_state): + previous_state = current_state + current_state = new_state + + # initialize/enter the state + match new_state: + IDLE: + animation_player.play("idle") + ATTACK: + # see Weapon.gd for damage management + weapon.attack() + STAGGER: + animation_player.play("take_damage") + DEAD: + queue_free() + + +func take_damage(count): + if current_state == DEAD: + return + + health -= count + if health <= 0: + health = 0 + _change_state(DEAD) + emit_signal("died") + return + + _change_state(STAGGER) + emit_signal("health_changed", health) + + +func _on_AnimationPlayer_animation_finished( name ): + if name == "take_damage": + _change_state(IDLE) + + +func _on_Weapon_attack_finished(): + _change_state(IDLE) diff --git a/final/17-Attack demo with Heartbeast/start/characters/Character.tscn b/final/17-Attack demo with Heartbeast/start/characters/Character.tscn new file mode 100644 index 0000000..b168b22 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/Character.tscn @@ -0,0 +1,123 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://characters/Character.gd" type="Script" id=1] +[ext_resource path="res://characters/shared/shadow.png" type="Texture" id=2] +[ext_resource path="res://characters/player/buddy_green.png" type="Texture" id=3] +[ext_resource path="res://characters/DebugCharacter.gd" type="Script" id=4] + +[sub_resource type="Animation" id=1] + +resource_name = "_setup" +length = 1.0 +loop = false +step = 0.1 + +[sub_resource type="Animation" id=2] + +resource_name = "idle" +length = 1.0 +loop = false +step = 0.1 + +[sub_resource type="Animation" id=3] + +resource_name = "take_damage" +length = 0.6 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("Body:self_modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0, 0.6 ), +"transitions": PoolRealArray( 0.390557, 1 ), +"update": 0, +"values": [ Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ) ] +} + +[sub_resource type="RectangleShape2D" id=4] + +custom_solver_bias = 0.0 +extents = Vector2( 19.9141, 16 ) +_sections_unfolded = [ "Resource" ] + +[node name="Character" type="KinematicBody2D" groups=[ +"character", +]] + +input_pickable = false +collision_layer = 1 +collision_mask = 1 +collision/safe_margin = 0.08 +script = ExtResource( 1 ) +_sections_unfolded = [ "Collision", "collision" ] +weapon_scene_path = "res://characters/weapons/spear/Spear.tscn" +max_health = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] + +playback_process_mode = 1 +playback_default_blend_time = 0.0 +root_node = NodePath("..") +anims/_setup = SubResource( 1 ) +anims/idle = SubResource( 2 ) +anims/take_damage = SubResource( 3 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" + +[node name="Shadow" type="Sprite" parent="."] + +scale = Vector2( 0.546225, 0.546225 ) +texture = ExtResource( 2 ) +_sections_unfolded = [ "Transform" ] + +[node name="Body" type="Sprite" parent="."] + +scale = Vector2( 0.446435, 0.446435 ) +texture = ExtResource( 3 ) +offset = Vector2( 0, -69 ) +_sections_unfolded = [ "Offset", "Transform", "Visibility" ] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +position = Vector2( 0, -15.8886 ) +shape = SubResource( 4 ) + +[node name="WeaponSpawnPoint" type="Node2D" parent="."] + +position = Vector2( 0, -30 ) +_sections_unfolded = [ "Transform" ] + +[node name="WeaponAnchorPoint" type="Node2D" parent="WeaponSpawnPoint"] + +_sections_unfolded = [ "Transform" ] + +[node name="DisplayDebugInfo" type="Label" parent="."] + +anchor_left = 0.0 +anchor_top = 0.0 +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_left = -46.0 +margin_top = -84.0 +margin_right = 47.0 +margin_bottom = -68.0 +rect_pivot_offset = Vector2( 0, 0 ) +rect_clip_content = false +mouse_filter = 2 +size_flags_horizontal = 1 +size_flags_vertical = 4 +text = "Debug info" +align = 1 +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 +script = ExtResource( 4 ) + +[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"] + + diff --git a/final/17-Attack demo with Heartbeast/start/characters/DebugCharacter.gd b/final/17-Attack demo with Heartbeast/start/characters/DebugCharacter.gd new file mode 100644 index 0000000..0a21e4a --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/DebugCharacter.gd @@ -0,0 +1,9 @@ +extends Label + +onready var Character = $'..' + +func _ready(): + visible = false + +func _physics_process(delta): + text = str(Character.current_state) \ No newline at end of file diff --git a/final/17-Attack demo with Heartbeast/start/characters/enemy/Enemy.gd b/final/17-Attack demo with Heartbeast/start/characters/enemy/Enemy.gd new file mode 100644 index 0000000..abe4648 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/enemy/Enemy.gd @@ -0,0 +1,67 @@ +extends "res://characters/Character.gd" + +export(int) var patrol_distance = 200 +var start_position = Vector2() +var end_position = Vector2() + +enum STATES_MIND {WAIT, MOVE, ACT} +var current_mind_state = WAIT +var previous_mind_state = null + +var last_move_direction = Vector2() + +onready var wait_timer = $WaitTimer +onready var attack_timer = $AttackTimer + +var first_ai_cycle = true + +func _ready(): + speed = 240 + start_position = position + end_position = start_position + Vector2(patrol_distance, 0) + + _change_mind_state(WAIT) + randomize() + wait_timer.stop() + wait_timer.wait_time = randf() * 3 + wait_timer.start() + + +func _physics_process(delta): + if current_mind_state == MOVE: + if input_direction.x == 1 and position.x > end_position.x \ + or input_direction.x == -1 and position.x < start_position.x: + last_move_direction = input_direction + _change_mind_state(WAIT) + + +func _change_mind_state(new_state): + previous_mind_state = current_mind_state + current_mind_state = new_state + + match current_mind_state: + WAIT: + input_direction = Vector2() + wait_timer.wait_time = 1.0 + wait_timer.start() + MOVE: + input_direction.x = -last_move_direction.x + if last_move_direction.x == 0: + input_direction.x = 1 + wait_timer.stop() + + +func _on_WaitTimer_timeout(): + wait_timer.stop() + if first_ai_cycle: + first_ai_cycle = false + _change_mind_state(MOVE) + return + + _change_state(ATTACK) + _change_mind_state(ACT) + + +func _on_Weapon_attack_finished(): + _change_mind_state(MOVE) + _change_state(IDLE) diff --git a/final/17-Attack demo with Heartbeast/start/characters/enemy/Enemy.tscn b/final/17-Attack demo with Heartbeast/start/characters/enemy/Enemy.tscn new file mode 100644 index 0000000..2db536c --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/enemy/Enemy.tscn @@ -0,0 +1,45 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://characters/Character.tscn" type="PackedScene" id=1] +[ext_resource path="res://characters/enemy/Enemy.gd" type="Script" id=2] +[ext_resource path="res://characters/enemy/foe_pink.png" type="Texture" id=3] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 20.2295, 16 ) + +[node name="Enemy" instance=ExtResource( 1 )] + +script = ExtResource( 2 ) +max_health = 2 +patrol_distance = 200 + +[node name="Body" parent="."] + +texture = ExtResource( 3 ) +offset = Vector2( 0, -129 ) + +[node name="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) + +[node name="WeaponSpawnPoint" parent="."] + +position = Vector2( 0, -42 ) + +[node name="DisplayDebugInfo" parent="."] + +margin_top = -134.0 +margin_bottom = -120.0 + +[node name="WaitTimer" type="Timer" parent="."] + +process_mode = 1 +wait_time = 1.0 +one_shot = false +autostart = false + +[connection signal="timeout" from="WaitTimer" to="." method="_on_WaitTimer_timeout"] + + diff --git a/final/17-Attack demo with Heartbeast/start/characters/enemy/foe_pink.png b/final/17-Attack demo with Heartbeast/start/characters/enemy/foe_pink.png new file mode 100644 index 0000000..b91a0a0 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/characters/enemy/foe_pink.png differ diff --git a/final/17-Attack demo with Heartbeast/start/characters/enemy/foe_pink.png.import b/final/17-Attack demo with Heartbeast/start/characters/enemy/foe_pink.png.import new file mode 100644 index 0000000..fc2e410 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/enemy/foe_pink.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/foe_pink.png-e53b2a7e2ae7e41f1caa814d90a4f307.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/start/characters/player/Player.gd b/final/17-Attack demo with Heartbeast/start/characters/player/Player.gd new file mode 100644 index 0000000..9963756 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/player/Player.gd @@ -0,0 +1,21 @@ +extends "res://characters/Character.gd" + + +func _input(event): + if event.is_action_pressed("attack"): + if current_state in [ATTACK, STAGGER, DIE, DEAD]: + return + _change_state(ATTACK) + + +func _physics_process(delta): + input_direction = Vector2() + + if Input.is_action_pressed("move_left"): + input_direction.x = -1 + elif Input.is_action_pressed("move_right"): + input_direction.x = 1 + elif Input.is_action_pressed("move_up"): + input_direction.y = -1 + elif Input.is_action_pressed("move_down"): + input_direction.y = 1 diff --git a/final/17-Attack demo with Heartbeast/start/characters/player/Player.tscn b/final/17-Attack demo with Heartbeast/start/characters/player/Player.tscn new file mode 100644 index 0000000..6bd74bc --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/player/Player.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://characters/Character.tscn" type="PackedScene" id=1] +[ext_resource path="res://characters/player/Player.gd" type="Script" id=2] + +[node name="Player" instance=ExtResource( 1 )] + +script = ExtResource( 2 ) +weapon_scene_path = "res://characters/weapons/sword/Sword.tscn" + +[node name="WeaponAnchorPoint" parent="WeaponSpawnPoint"] + +position = Vector2( 46, 8.1054 ) + + diff --git a/final/17-Attack demo with Heartbeast/start/characters/player/buddy_green.png b/final/17-Attack demo with Heartbeast/start/characters/player/buddy_green.png new file mode 100644 index 0000000..b5f7f41 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/characters/player/buddy_green.png differ diff --git a/final/17-Attack demo with Heartbeast/start/characters/player/buddy_green.png.import b/final/17-Attack demo with Heartbeast/start/characters/player/buddy_green.png.import new file mode 100644 index 0000000..1ef8e1b --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/player/buddy_green.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/buddy_green.png-2eb85c58aef2a5294e97d930fe09f0e5.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/start/characters/shared/health.gd b/final/17-Attack demo with Heartbeast/start/characters/shared/health.gd new file mode 100644 index 0000000..6eac464 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/shared/health.gd @@ -0,0 +1,22 @@ +# Manages a character's health and death. Used by the UI to draw lifebars on any character or enemy +extends Node + +signal dead + +export var life = 0 +export var max_life = 10 +export var armor = 0 + + +func take_damage(damage): + life = life - damage + armor + if life < 0: + emit('dead') + +func heal(amount): + life += amount + if life > max_life: + life = max_life + +func get_health_ratio(): + return life / max_life \ No newline at end of file diff --git a/final/17-Attack demo with Heartbeast/start/characters/shared/shadow.png b/final/17-Attack demo with Heartbeast/start/characters/shared/shadow.png new file mode 100644 index 0000000..77e6466 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/characters/shared/shadow.png differ diff --git a/final/17-Attack demo with Heartbeast/start/characters/shared/shadow.png.import b/final/17-Attack demo with Heartbeast/start/characters/shared/shadow.png.import new file mode 100644 index 0000000..c343588 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/shared/shadow.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/shadow.png-7ac08bc6ed7dcf19791e52a1c588d64c.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/Weapon.gd b/final/17-Attack demo with Heartbeast/start/characters/weapons/Weapon.gd new file mode 100644 index 0000000..1fc7f45 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/weapons/Weapon.gd @@ -0,0 +1,41 @@ +extends Area2D + +signal attack_finished + +onready var animation_player = $AnimationPlayer + +enum STATES {IDLE, ATTACK} +var current_state = IDLE + +export(int) var damage = 1 + + +func _ready(): + set_physics_process(false) + + +func attack(): + # Called from the character, when it switches to the ATTACK state + pass + + +func _change_state(new_state): + current_state = new_state + # Initialize the new state + + +func _physics_process(delta): + # Get colliding bodies + + # For each body, check if it's an enemy + # If so, damage it and stop physics process for this attack + # Otherwise it damages targets on every tick + pass + + +func is_owner(node): + # Return true if the node is the weapon's owner + pass + + +# Write AnimationPlayer callback when the attack animation ends diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/Weapon.tscn b/final/17-Attack demo with Heartbeast/start/characters/weapons/Weapon.tscn new file mode 100644 index 0000000..d753c76 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/weapons/Weapon.tscn @@ -0,0 +1,177 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://characters/weapons/Weapon.gd" type="Script" id=1] +[ext_resource path="res://characters/weapons/sword/sword_enemy.png" type="Texture" id=2] + +[sub_resource type="Animation" id=1] + +resource_name = "_setup" +length = 1.0 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:rotation_deg") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath(".:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath(".:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ) ] +} +tracks/4/type = "value" +tracks/4/path = NodePath(".:visible") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} +tracks/5/type = "value" +tracks/5/path = NodePath("CollisionPolygon2D:disabled") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} + +[sub_resource type="Animation" id=2] + +resource_name = "attack" +length = 0.4 +loop = false +step = 0.05 +tracks/0/type = "value" +tracks/0/path = NodePath(".:visible") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0, 0.35, 0.4 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 1, +"values": [ true, true, false ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("CollisionPolygon2D:disabled") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/keys = { +"times": PoolRealArray( 0, 0.35, 0.4 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 1, +"values": [ false, false, true ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Sprite:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/keys = { +"times": PoolRealArray( 0, 0.05, 0.2 ), +"transitions": PoolRealArray( 1, 0.473309, 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ), Vector2( 1.3, 1.3 ), Vector2( 1, 1 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath(".:rotation_deg") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/keys = { +"times": PoolRealArray( 0, 0.15, 0.3 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ -100.102, 98.7122, 90.0 ] +} + +[node name="Weapon" type="Area2D" groups=[ +"weapon", +]] + +rotation = 1.72285 +input_pickable = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +monitorable = false +audio_bus_override = false +audio_bus_name = "Master" +script = ExtResource( 1 ) +_sections_unfolded = [ "Collision", "Transform", "Visibility" ] +damage = 1 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="." groups=[ +"weapon", +]] + +playback_process_mode = 1 +playback_default_blend_time = 0.0 +root_node = NodePath("..") +anims/_setup = SubResource( 1 ) +anims/attack = SubResource( 2 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] + +position = Vector2( 1.90735e-06, 0 ) +build_mode = 0 +polygon = PoolVector2Array( 26, -13, 26, 13, 129, 13, 160, 0, 130, -13 ) +one_way_collision = true + +[node name="Sprite" type="Sprite" parent="."] + +scale = Vector2( 1.02945, 1.02945 ) +texture = ExtResource( 2 ) +offset = Vector2( 72, 0 ) +_sections_unfolded = [ "Offset", "Transform" ] + +[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"] + + diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/spear/Spear.tscn b/final/17-Attack demo with Heartbeast/start/characters/weapons/spear/Spear.tscn new file mode 100644 index 0000000..7e1e542 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/weapons/spear/Spear.tscn @@ -0,0 +1,149 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://characters/weapons/Weapon.tscn" type="PackedScene" id=1] +[ext_resource path="res://characters/weapons/spear/spear_enemy.png" type="Texture" id=2] + +[sub_resource type="Animation" id=1] + +resource_name = "_setup" +length = 1.0 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:rotation_deg") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath(".:scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ) ] +} +tracks/3/type = "value" +tracks/3/path = NodePath(".:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ) ] +} +tracks/4/type = "value" +tracks/4/path = NodePath(".:visible") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} +tracks/5/type = "value" +tracks/5/path = NodePath("CollisionPolygon2D:disabled") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} + +[sub_resource type="Animation" id=2] + +resource_name = "attack" +length = 1.2 +loop = false +step = 0.05 +tracks/0/type = "value" +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/keys = { +"times": PoolRealArray( 0, 0.15, 0.3, 0.35, 0.4, 0.45, 0.55, 0.55, 0.6, 0.75, 1.1 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 5.29456, 1, 1, 1, 1, 2.46314, 1 ), +"update": 0, +"values": [ Vector2( 0, 0 ), Vector2( -11.0626, 7.31512 ), Vector2( -13.7383, 5.24251 ), Vector2( -14.6302, 2.92606 ), Vector2( -14.6302, 0 ), Vector2( -13.8042, -3.9014 ), Vector2( 103.387, -2.38419e-06 ), Vector2( 98.998, 0 ), Vector2( 91.6829, 0 ), Vector2( 91.6829, 0 ), Vector2( 0, 0 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("CollisionPolygon2D:disabled") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ false ] +} +tracks/2/type = "value" +tracks/2/path = NodePath(".:rotation_deg") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/keys = { +"times": PoolRealArray( 0, 0.05, 0.3, 0.35, 0.4, 0.45, 0.55, 0.6 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ), +"update": 0, +"values": [ 0.0, -2.88659, 1.92508, 0.962542, 0.0, -0.896525, 0.0, 0.0 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Sprite:scale") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/keys = { +"times": PoolRealArray( 0.3, 0.45, 0.55, 0.65 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ), Vector2( 1, 1 ), Vector2( 1, 1.4 ), Vector2( 1, 1 ) ] +} + +[node name="Spear" instance=ExtResource( 1 )] + +rotation = 0.0 + +[node name="AnimationPlayer" parent="."] + +anims/_setup = SubResource( 1 ) +anims/attack = SubResource( 2 ) + +[node name="CollisionPolygon2D" parent="."] + +polygon = PoolVector2Array( 33, 0, 54, 17, 98, 0, 55, -17 ) + +[node name="Sprite" parent="."] + +scale = Vector2( 1, 1 ) +texture = ExtResource( 2 ) +offset = Vector2( -30, 0 ) + + diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/spear/spear_enemy.png b/final/17-Attack demo with Heartbeast/start/characters/weapons/spear/spear_enemy.png new file mode 100644 index 0000000..9ede6cc Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/characters/weapons/spear/spear_enemy.png differ diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/spear/spear_enemy.png.import b/final/17-Attack demo with Heartbeast/start/characters/weapons/spear/spear_enemy.png.import new file mode 100644 index 0000000..3a97405 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/weapons/spear/spear_enemy.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/spear_enemy.png-b325bd4ecef242c2d8570488a23b715b.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/Sword.tscn b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/Sword.tscn new file mode 100644 index 0000000..22ac01b --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/Sword.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://characters/weapons/Weapon.tscn" type="PackedScene" id=1] +[ext_resource path="res://characters/weapons/sword/sword_player.png" type="Texture" id=2] + +[node name="Sword" instance=ExtResource( 1 )] + +rotation = 0.0 + +[node name="CollisionPolygon2D" parent="."] + +disabled = true + +[node name="Sprite" parent="."] + +texture = ExtResource( 2 ) + + diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_enemy.png b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_enemy.png new file mode 100644 index 0000000..d97d487 Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_enemy.png differ diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_enemy.png.import b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_enemy.png.import new file mode 100644 index 0000000..00751d6 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_enemy.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sword_enemy.png-41731279fc65f79e376db0eb84917f2f.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_player.png b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_player.png new file mode 100644 index 0000000..c1cb52d Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_player.png differ diff --git a/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_player.png.import b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_player.png.import new file mode 100644 index 0000000..b750def --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/characters/weapons/sword/sword_player.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sword_player.png-fa08b35650d3d8263f7b1e08cb6ba3c8.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/start/icon.png b/final/17-Attack demo with Heartbeast/start/icon.png new file mode 100644 index 0000000..4beaa6b Binary files /dev/null and b/final/17-Attack demo with Heartbeast/start/icon.png differ diff --git a/final/17-Attack demo with Heartbeast/start/icon.png.flags b/final/17-Attack demo with Heartbeast/start/icon.png.flags new file mode 100644 index 0000000..5130fd1 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/icon.png.flags @@ -0,0 +1 @@ +gen_mipmaps=false diff --git a/final/17-Attack demo with Heartbeast/start/icon.png.import b/final/17-Attack demo with Heartbeast/start/icon.png.import new file mode 100644 index 0000000..42e94a3 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/icon.png.import @@ -0,0 +1,24 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-31-39.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-31-39.txt new file mode 100644 index 0000000..9d9b572 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-31-39.txt @@ -0,0 +1,8 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: WeaponSpawnPoint/Spear + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-32-12.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-32-12.txt new file mode 100644 index 0000000..fcf4fca --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-32-12.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-32-28.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-32-28.txt new file mode 100644 index 0000000..fcf4fca --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-32-28.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-32-59.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-32-59.txt new file mode 100644 index 0000000..fcf4fca --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-32-59.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-33-50.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-33-50.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-33-50.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-33-58.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-33-58.txt new file mode 100644 index 0000000..642888a --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-33-58.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.09 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-34-14.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-34-14.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-34-14.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-34-49.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-34-49.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-34-49.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-35-31.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-35-31.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-35-31.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-35-38.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-35-38.txt new file mode 100644 index 0000000..f72083f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-35-38.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.091 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-36-10.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-36-10.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-36-10.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-37-45.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-37-45.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-37-45.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-37-58.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-37-58.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-19-14-37-58.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-11-04-53.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-11-04-53.txt new file mode 100644 index 0000000..271095f --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-11-04-53.txt @@ -0,0 +1,10 @@ +OpenGL ES 3.0 Renderer: Quadro M1000M/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +Registered interface Native mobile +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 +**ERROR**: Node not found: AttackTimer + At: scene\main\node.cpp:1518:Node::get_node() - Condition ' !node ' is true. returned: 0 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-11-19-15.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-11-19-15.txt new file mode 100644 index 0000000..59822a6 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-11-19-15.txt @@ -0,0 +1,6 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.095 diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-11-29-41.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-11-29-41.txt new file mode 100644 index 0000000..c434acb --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-11-29-41.txt @@ -0,0 +1,8 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.089 +OPENING: D:/Library/Dropbox/Transfer/godot_kickstarter/game/collabs/Attack demo with Heartbeast/end (D:::Library::Dropbox::Transfer::godot_kickstarter::game::collabs::Attack demo with Heartbeast::end) +running cmdline: "D:\Library\Downloads\Godot-Windows-x86_64-2017-10-16.cc7f224\godot1610.exe" "--path" "D:/Library/Dropbox/Transfer/godot_kickstarter/game/collabs/Attack demo with Heartbeast/end" "--editor" diff --git a/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-12-46-56.txt b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-12-46-56.txt new file mode 100644 index 0000000..74741d0 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log-2017-10-20-12-46-56.txt @@ -0,0 +1,8 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.099 +OPENING: D:/Library/Dropbox/Transfer/godot_kickstarter/game/collabs/Attack demo with Heartbeast/start (D:::Library::Dropbox::Transfer::godot_kickstarter::game::collabs::Attack demo with Heartbeast::start) +running cmdline: "D:\Library\Downloads\Godot-Windows-x86_64-2017-10-16.cc7f224\godot1610.exe" "--path" "D:/Library/Dropbox/Transfer/godot_kickstarter/game/collabs/Attack demo with Heartbeast/start" "--editor" diff --git a/final/17-Attack demo with Heartbeast/start/logs/log.txt b/final/17-Attack demo with Heartbeast/start/logs/log.txt new file mode 100644 index 0000000..dc479f4 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/logs/log.txt @@ -0,0 +1,8 @@ +OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 +GLES3: max ubo light: 409 +GLES3: max ubo reflections: 455, ubo size: 144 +WARNING: not found: gdnative/singletons +Registered interface Native mobile +SVG_GENERATION TIME: 0.098 +OPENING: D:/Library/Dropbox/Transfer/godot_kickstarter/game/collabs/Attack demo with Heartbeast/tutorial (D:::Library::Dropbox::Transfer::godot_kickstarter::game::collabs::Attack demo with Heartbeast::tutorial) +running cmdline: "D:\Library\Downloads\Godot-Windows-x86_64-2017-10-16.cc7f224\godot1610.exe" "--path" "D:/Library/Dropbox/Transfer/godot_kickstarter/game/collabs/Attack demo with Heartbeast/tutorial" "--editor" diff --git a/final/17-Attack demo with Heartbeast/start/project.godot b/final/17-Attack demo with Heartbeast/start/project.godot new file mode 100644 index 0000000..b831ca1 --- /dev/null +++ b/final/17-Attack demo with Heartbeast/start/project.godot @@ -0,0 +1,42 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=3 + +[application] + +config/name="Attack demo with Heartbeast (start)" +run/main_scene="res://Game.tscn" +config/icon="res://icon.png" + +[display] + +window/size/height=640 + +[gdnative] + +singletons=[ ] + +[input] + +move_left=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) + ] +move_right=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) + ] +move_up=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) + ] +move_down=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":3,"axis_value":1.0,"script":null) + ] +attack=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) + ]