Compare commits
53 Commits
3.3-2ce76f
...
3.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf94d62472 | ||
|
|
95d97d9001 | ||
|
|
53ea602c07 | ||
|
|
874d3bcc33 | ||
|
|
cbb5c94c6f | ||
|
|
44aefaecb6 | ||
|
|
7a7af4cf4e | ||
|
|
1916f87ac5 | ||
|
|
36e8b45bd4 | ||
|
|
89b64e33e2 | ||
|
|
2b10e6724e | ||
|
|
b9685cb369 | ||
|
|
d1f25ca4aa | ||
|
|
11a72411cc | ||
|
|
5057fcff50 | ||
|
|
d791cd9bda | ||
|
|
7d7c728227 | ||
|
|
5fb81434e7 | ||
|
|
c3c4fdf4fa | ||
|
|
9ea18370d3 | ||
|
|
f9333dce01 | ||
|
|
84a87a5128 | ||
|
|
7d64830cfe | ||
|
|
f08916c90f | ||
|
|
89978a7421 | ||
|
|
6ca2a45a21 | ||
|
|
57f8628b50 | ||
|
|
a4e8231f5a | ||
|
|
f71816ed31 | ||
|
|
ef069d49ae | ||
|
|
742ea87708 | ||
|
|
45f5417822 | ||
|
|
f28a09ea0d | ||
|
|
85c1805d33 | ||
|
|
7e129db12e | ||
|
|
7bfc57d1ae | ||
|
|
cd48c9a9cc | ||
|
|
244b759787 | ||
|
|
6875a21545 | ||
|
|
694ee7fa36 | ||
|
|
6e3db7c64d | ||
|
|
2d4d23302a | ||
|
|
4456027f91 | ||
|
|
19312b2899 | ||
|
|
ca17967de1 | ||
|
|
491fb265b1 | ||
|
|
08be1b7f03 | ||
|
|
4ef90a836a | ||
|
|
bfd903a933 | ||
|
|
e0db0b8f6d | ||
|
|
4d21951b71 | ||
|
|
7656c08454 | ||
|
|
e894e4655a |
99
.github/workflows/export_html5.yml
vendored
@@ -1,99 +0,0 @@
|
||||
name: Export projects to HTML5 and deploy to GitHub Pages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
GODOT_VERSION: 3.3
|
||||
|
||||
jobs:
|
||||
export-html5:
|
||||
name: Export projects to HTML5 and deploy to GitHub Pages
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
image: barichello/godot-ci:3.3
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Setup
|
||||
run: |
|
||||
mkdir -p ~/.local/share/godot/templates/
|
||||
mv /root/.local/share/godot/templates/$GODOT_VERSION.stable ~/.local/share/godot/templates/$GODOT_VERSION.stable
|
||||
|
||||
- name: Export projects to HTML5
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -qqq imagemagick
|
||||
|
||||
# Don't export Mono demos (not supported yet), demos that can't be run in HTML5
|
||||
# since they're platform-specific or demos that are currently broken in HTML5.
|
||||
# Remember to update `.github/dist/footer.html` when updating the list of excluded demos.
|
||||
rm -rf \
|
||||
2d/hdr/ \
|
||||
3d/voxel/ \
|
||||
audio/device_changer/ \
|
||||
loading/background_load/ \
|
||||
loading/multiple_threads_loading/ \
|
||||
loading/threads/ \
|
||||
misc/matrix_transform/ \
|
||||
mobile/android_iap/ \
|
||||
mobile/sensors/ \
|
||||
mono/ \
|
||||
networking/ \
|
||||
plugins/
|
||||
|
||||
for panorama in 3d/material_testers/backgrounds/*.hdr; do
|
||||
# Decrease the resolution to get below the 20 MB per-file limit.
|
||||
# Otherwise, the website can't be deployed as files larger than 20 MB
|
||||
# can't be pushed to GitHub anymore.
|
||||
mogrify -resize 75% "$panorama"
|
||||
done
|
||||
|
||||
BASEDIR="$PWD"
|
||||
|
||||
# Use absolute paths so that we can `cd` without having to go back to the parent directory manually.
|
||||
for demo in */*/; do
|
||||
echo ""
|
||||
echo "================================"
|
||||
echo "Exporting demo $demo..."
|
||||
echo "================================"
|
||||
|
||||
mkdir -p "$BASEDIR/.github/dist/$demo"
|
||||
cd "$BASEDIR/$demo"
|
||||
|
||||
# Copy an export template preset file configured for HTML5 exporting.
|
||||
# This way, we don't have to commit `export_presets.cfg` for each project.
|
||||
cp "$BASEDIR/.github/dist/export_presets.cfg" .
|
||||
godot --export "HTML5" "$BASEDIR/.github/dist/$demo/index.html"
|
||||
|
||||
# Replace the WASM file with a symbolic link to avoid duplicating files in the pushed branch.
|
||||
# (WASM files are identical across projects, but not PCK or HTML files.)
|
||||
mv -f "$BASEDIR/.github/dist/$demo/index.wasm" "$BASEDIR/.github/dist/index.wasm"
|
||||
# The symlink must be relative as it needs to point to a file within the pushed repository.
|
||||
ln -s "../../index.wasm" "$BASEDIR/.github/dist/$demo/index.wasm"
|
||||
|
||||
# Append the demo to the list of demos for the website.
|
||||
PROJECT_NAME=$(cat project.godot | grep "config/name" | cut -d '"' -f 2 | tr -d "\n")
|
||||
echo "<li><a href='$demo'><img width="64" height="64" src="$demo/favicon.png" alt=""><p>$PROJECT_NAME</p></a></li>" >> "$BASEDIR/.github/dist/demos.html"
|
||||
done
|
||||
|
||||
cat "$BASEDIR/.github/dist/header.html" "$BASEDIR/.github/dist/demos.html" "$BASEDIR/.github/dist/footer.html" > "$BASEDIR/.github/dist/index.html"
|
||||
|
||||
# Clean up files that don't need to be deployed.
|
||||
rm -f "$BASEDIR/.github/dist/header.html" "$BASEDIR/.github/dist/demos.html" "$BASEDIR/.github/dist/footer.html" "$BASEDIR/.github/dist/export_presets.cfg"
|
||||
|
||||
# Installing rsync is needed in order to deploy to GitHub Pages. Without it, the build will fail.
|
||||
- name: Install rsync 📚
|
||||
run: |
|
||||
apt-get update -qq && apt-get install -qqq rsync
|
||||
- name: Deploy to GitHub Pages 🚀
|
||||
uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# The branch the action should deploy to.
|
||||
BRANCH: gh-pages
|
||||
# The folder the action should deploy.
|
||||
FOLDER: .github/dist
|
||||
# Artifacts are large; don't keep the branch's history.
|
||||
SINGLE_COMMIT: true
|
||||
4
.github/workflows/static_checks.yml
vendored
@@ -4,10 +4,10 @@ on: [push, pull_request]
|
||||
jobs:
|
||||
format:
|
||||
name: File formatting (file_format.sh)
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
||||
1
.gitignore
vendored
@@ -18,4 +18,5 @@ mono_crash.*.json
|
||||
|
||||
# System/tool-specific ignores
|
||||
.directory
|
||||
.DS_Store
|
||||
*~
|
||||
|
||||
@@ -38,6 +38,10 @@ func _ready():
|
||||
|
||||
Physics2DServer.body_set_space(bullet.body, get_world_2d().get_space())
|
||||
Physics2DServer.body_add_shape(bullet.body, shape)
|
||||
# Don't make bullets check collision with other bullets to improve performance.
|
||||
# Their collision mask is still configured to the default value, which allows
|
||||
# bullets to detect collisions with the player.
|
||||
Physics2DServer.body_set_collision_layer(bullet.body, 0)
|
||||
|
||||
# Place bullets randomly on the viewport and move bullets outside the
|
||||
# play area so that they fade in nicely.
|
||||
|
||||
@@ -44,8 +44,8 @@ func _on_MobTimer_timeout():
|
||||
direction += rand_range(-PI / 4, PI / 4)
|
||||
mob.rotation = direction
|
||||
|
||||
# Choose the velocity.
|
||||
var velocity = Vector2(rand_range(mob.min_speed, mob.max_speed), 0)
|
||||
# Choose the velocity for the mob.
|
||||
var velocity = Vector2(rand_range(150.0, 250.0), 0.0)
|
||||
mob.linear_velocity = velocity.rotated(direction)
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
extends RigidBody2D
|
||||
|
||||
#warning-ignore-all:unused_class_variable
|
||||
export var min_speed = 150
|
||||
export var max_speed = 250
|
||||
|
||||
func _ready():
|
||||
$AnimatedSprite.playing = true
|
||||
var mob_types = $AnimatedSprite.frames.get_animation_names()
|
||||
@@ -12,7 +8,3 @@ func _ready():
|
||||
|
||||
func _on_VisibilityNotifier2D_screen_exited():
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_start_game():
|
||||
queue_free()
|
||||
|
||||
@@ -14,12 +14,16 @@ Renderer: GLES 3 (particles are not available in GLES 2)
|
||||
|
||||
Note: There is a C# version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/mono/dodge_the_creeps).
|
||||
|
||||
Note: There is a GDNative C++ version available [here](https://github.com/godotengine/gdnative-demos/tree/master/cpp/dodge_the_creeps).
|
||||
|
||||
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/515
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Copying
|
||||
|
||||
`art/House In a Forest Loop.ogg` Copyright © 2012 [HorrorPen](https://opengameart.org/users/horrorpen), [CC-BY 3.0: Attribution](http://creativecommons.org/licenses/by/3.0/). Source: https://opengameart.org/content/loop-house-in-a-forest
|
||||
|
||||
@@ -24,6 +24,8 @@ config/icon="res://icon.png"
|
||||
|
||||
window/size/width=480
|
||||
window/size/height=720
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="keep"
|
||||
|
||||
[input]
|
||||
|
||||
|
||||
0
2d/dodge_the_creeps/screenshots/.gdignore
Normal file
BIN
2d/dodge_the_creeps/screenshots/dodge.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -1,15 +1,50 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://debug/Explanations.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://fonts/source_code_pro_explanations.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://debug/StatesStackDiplayer.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://debug/ControlsPanel.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://fonts/source_code_pro_explanations_bold.tres" type="DynamicFont" id=5]
|
||||
|
||||
[node name="Demo" type="Node"]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 1 )]
|
||||
position = Vector2( 640, 400 )
|
||||
|
||||
[node name="Explanations" parent="." instance=ExtResource( 2 )]
|
||||
[node name="Explanations" type="RichTextLabel" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 10.0
|
||||
margin_top = -370.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = -730.0
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_vertical = 4
|
||||
custom_fonts/bold_font = ExtResource( 5 )
|
||||
custom_fonts/normal_font = ExtResource( 2 )
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "This example shows how to apply the State programming pattern in GDScript, including Hierarchical States, and a pushdown automaton.
|
||||
|
||||
States are common in games. You can use the pattern to:
|
||||
|
||||
1. Separate each behavior and transitions between behaviors, thus make scripts shorter and easier to manage
|
||||
2. Respect the Single Responsibility Principle. Each State object represents [b]one[/b] action
|
||||
3. Improve your code's structure. Look at the scene tree and FileSystem tab: without looking at the code, you'll know what the Player can or cannot do.
|
||||
|
||||
You can read more about States in the excellent [url=http://gameprogrammingpatterns.com/state.html]Game Programming Patterns ebook[/url]."
|
||||
text = "This example shows how to apply the State programming pattern in GDScript, including Hierarchical States, and a pushdown automaton.
|
||||
|
||||
States are common in games. You can use the pattern to:
|
||||
|
||||
1. Separate each behavior and transitions between behaviors, thus make scripts shorter and easier to manage
|
||||
2. Respect the Single Responsibility Principle. Each State object represents one action
|
||||
3. Improve your code's structure. Look at the scene tree and FileSystem tab: without looking at the code, you'll know what the Player can or cannot do.
|
||||
|
||||
You can read more about States in the excellent Game Programming Patterns ebook."
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
}
|
||||
|
||||
[node name="Control" type="Control" parent="."]
|
||||
anchor_right = 1.0
|
||||
|
||||
@@ -7,7 +7,7 @@ func _process(_delta):
|
||||
var numbers = ""
|
||||
var index = 0
|
||||
for state in fsm_node.states_stack:
|
||||
states_names += state.get_name() + "\n"
|
||||
states_names += String(state.get_name()) + "\n"
|
||||
numbers += str(index) + "\n"
|
||||
index += 1
|
||||
$States.text = states_names
|
||||
|
||||
@@ -41,7 +41,6 @@ use_filter = true
|
||||
font_data = ExtResource( 14 )
|
||||
|
||||
[node name="Player" type="KinematicBody2D"]
|
||||
position = Vector2( 628.826, 391.266 )
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_horizontal_guides_": [ ]
|
||||
@@ -81,11 +80,11 @@ texture = ExtResource( 9 )
|
||||
[node name="BodyPivot" type="Position2D" parent="."]
|
||||
|
||||
[node name="Body" type="Sprite" parent="BodyPivot"]
|
||||
position = Vector2( 0, -58.8242 )
|
||||
position = Vector2( 0, -58 )
|
||||
texture = ExtResource( 10 )
|
||||
|
||||
[node name="BulletSpawn" type="Node2D" parent="BodyPivot"]
|
||||
position = Vector2( 1.17401, -61.266 )
|
||||
position = Vector2( 0, -58 )
|
||||
script = ExtResource( 11 )
|
||||
|
||||
[node name="CooldownTimer" type="Timer" parent="BodyPivot/BulletSpawn"]
|
||||
@@ -93,7 +92,7 @@ wait_time = 0.2
|
||||
one_shot = true
|
||||
|
||||
[node name="WeaponPivot" type="Position2D" parent="BodyPivot"]
|
||||
position = Vector2( 1.17401, -61.266 )
|
||||
position = Vector2( 0, -58 )
|
||||
script = ExtResource( 12 )
|
||||
|
||||
[node name="Offset" type="Position2D" parent="BodyPivot/WeaponPivot"]
|
||||
@@ -110,11 +109,14 @@ margin_top = -172.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = -138.0
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
text = "Test"
|
||||
text = "Idle"
|
||||
align = 1
|
||||
valign = 1
|
||||
uppercase = true
|
||||
script = ExtResource( 15 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="state_changed" from="StateMachine" to="BodyPivot/WeaponPivot/Offset/Sword" method="_on_StateMachine_state_changed"]
|
||||
[connection signal="state_changed" from="StateMachine" to="StateNameDisplayer" method="_on_StateMachine_state_changed"]
|
||||
|
||||
@@ -4,14 +4,15 @@ var bullet = preload("Bullet.tscn")
|
||||
|
||||
func _unhandled_input(event):
|
||||
if event.is_action_pressed("fire"):
|
||||
fire(owner.look_direction)
|
||||
fire()
|
||||
|
||||
|
||||
func fire(direction):
|
||||
func fire():
|
||||
if not $CooldownTimer.is_stopped():
|
||||
return
|
||||
|
||||
$CooldownTimer.start()
|
||||
var new_bullet = bullet.instance()
|
||||
new_bullet.direction = direction
|
||||
add_child(new_bullet)
|
||||
new_bullet.position = global_position
|
||||
new_bullet.direction = owner.look_direction
|
||||
|
||||
@@ -11,4 +11,4 @@ func _physics_process(_delta):
|
||||
|
||||
|
||||
func _on_StateMachine_state_changed(current_state):
|
||||
text = current_state.get_name()
|
||||
text = String(current_state.get_name())
|
||||
|
||||
@@ -6,7 +6,7 @@ const MASS = 10.0
|
||||
const ARRIVE_DISTANCE = 10.0
|
||||
|
||||
export(float) var speed = 200.0
|
||||
var _state = null
|
||||
var _state = States.IDLE
|
||||
|
||||
var _path = []
|
||||
var _target_point_world = Vector2()
|
||||
|
||||
@@ -33,6 +33,12 @@ _global_script_class_icons={
|
||||
[application]
|
||||
|
||||
config/name="2D Physics Tests"
|
||||
config/description="This demo contains a series of tests for the 2D physics engine.
|
||||
|
||||
They can be used for different purpose:
|
||||
|
||||
- Functional tests to check for regressions and behavior of the 2D physics engine
|
||||
- Performance tests to evaluate performance of the 2D physics engine"
|
||||
run/main_scene="res://main.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ func _initialize_collision_shapes():
|
||||
for node in $Shapes.get_children():
|
||||
var body = node as PhysicsBody2D
|
||||
var shape = body.shape_owner_get_shape(0, 0)
|
||||
shape.resource_name = node.name.substr("RigidBody".length())
|
||||
shape.resource_name = String(node.name).substr("RigidBody".length())
|
||||
|
||||
_collision_shapes.push_back(shape)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ func _physics_process(_delta):
|
||||
for node in $Shapes.get_children():
|
||||
var body = node as PhysicsBody2D
|
||||
var space_state = body.get_world_2d().direct_space_state
|
||||
var body_name = body.name.substr("RigidBody".length())
|
||||
var body_name = String(body.name).substr("RigidBody".length())
|
||||
|
||||
Log.print_log("* Testing: %s" % body_name)
|
||||
|
||||
@@ -45,7 +45,7 @@ func _physics_process(_delta):
|
||||
res = _add_raycast(space_state, center, center + Vector2(0, 40))
|
||||
Log.print_log("Raycast inside: %s" % ("HIT" if res else "NO HIT"))
|
||||
|
||||
if body.name.ends_with("ConcavePolygon"):
|
||||
if String(body.name).ends_with("ConcavePolygon"):
|
||||
# Raycast inside an internal face.
|
||||
center.x += 20
|
||||
res = _add_raycast(space_state, center, center + Vector2(0, 40))
|
||||
|
||||
@@ -91,7 +91,7 @@ func _on_option_selected(option):
|
||||
func _find_type_index(type_name):
|
||||
for type_index in range(_object_templates.size()):
|
||||
var type_node = _object_templates[type_index]
|
||||
if type_node.name.find(type_name) > -1:
|
||||
if String(type_node.name).find(type_name) > -1:
|
||||
return type_index
|
||||
|
||||
Log.print_error("Invalid shape type: " + type_name)
|
||||
|
||||
@@ -13,6 +13,7 @@ onready var platform_detector = $PlatformDetector
|
||||
onready var animation_player = $AnimationPlayer
|
||||
onready var shoot_timer = $ShootAnimation
|
||||
onready var sprite = $Sprite
|
||||
onready var sound_jump = $Jump
|
||||
onready var gun = sprite.get_node(@"Gun")
|
||||
|
||||
|
||||
@@ -46,6 +47,10 @@ func _ready():
|
||||
# - If you split the character into a state machine or more advanced pattern,
|
||||
# you can easily move individual functions.
|
||||
func _physics_process(_delta):
|
||||
# Play jump sound
|
||||
if Input.is_action_just_pressed("jump" + action_suffix) and is_on_floor():
|
||||
sound_jump.play()
|
||||
|
||||
var direction = get_direction()
|
||||
|
||||
var is_jump_interrupted = Input.is_action_just_released("jump" + action_suffix) and _velocity.y < 0.0
|
||||
|
||||
@@ -12,6 +12,8 @@ Note: There is a C# version available [here](https://github.com/godotengine/godo
|
||||
|
||||
Note: There is a VisualScript version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/visual_script/pong).
|
||||
|
||||
Note: There is a GDNative C++ version available [here](https://github.com/godotengine/gdnative-demos/tree/master/cpp/pong).
|
||||
|
||||
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/121
|
||||
|
||||
## How does it work?
|
||||
|
||||
@@ -2,10 +2,10 @@ extends Area2D
|
||||
|
||||
const DEFAULT_SPEED = 100
|
||||
|
||||
var _speed = DEFAULT_SPEED
|
||||
var direction = Vector2.LEFT
|
||||
|
||||
onready var _initial_pos = position
|
||||
onready var _speed = DEFAULT_SPEED
|
||||
|
||||
func _process(delta):
|
||||
_speed += delta * 2
|
||||
|
||||
@@ -9,7 +9,7 @@ var _down
|
||||
onready var _screen_size_y = get_viewport_rect().size.y
|
||||
|
||||
func _ready():
|
||||
var n = name.to_lower()
|
||||
var n = String(name).to_lower()
|
||||
_up = n + "_move_up"
|
||||
_down = n + "_move_down"
|
||||
if n == "left":
|
||||
|
||||
@@ -65,7 +65,8 @@ right_move_up={
|
||||
[rendering]
|
||||
|
||||
quality/driver/driver_name="GLES2"
|
||||
quality/2d/use_pixel_snap=true
|
||||
2d/snapping/use_gpu_pixel_snap=true
|
||||
vram_compression/import_etc=true
|
||||
vram_compression/import_etc2=false
|
||||
quality/2d/use_pixel_snap=true
|
||||
viewport/default_clear_color=Color( 0, 0, 0, 1 )
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Game.gd" type="Script" id=1]
|
||||
[ext_resource path="res://screens/combat/Combat.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://screens/exploration/Exploration.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://combat/Combat.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://grid_movement/Exploration.tscn" type="PackedScene" id=3]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
length = 0.5
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
extends Node
|
||||
|
||||
signal combat_finished(winner, loser)
|
||||
const Combatant = preload("res://turn_combat/combatants/Combatant.gd")
|
||||
|
||||
func initialize(combat_combatants):
|
||||
for combatant in combat_combatants:
|
||||
@@ -1,10 +1,10 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://screens/combat/Combat.gd" type="Script" id=1]
|
||||
[ext_resource path="res://turn_combat/turn_queue/TurnQueue.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://combat/Combat.gd" type="Script" id=1]
|
||||
[ext_resource path="res://combat/TurnQueue.gd" type="Script" id=2]
|
||||
[ext_resource path="res://theme/theme.tres" type="Theme" id=3]
|
||||
[ext_resource path="res://screens/combat/interface/UI.gd" type="Script" id=4]
|
||||
[ext_resource path="res://screens/combat/interface/Info.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://combat/interface/UI.gd" type="Script" id=4]
|
||||
[ext_resource path="res://combat/interface/Info.tscn" type="PackedScene" id=5]
|
||||
|
||||
[sub_resource type="GDScript" id=1]
|
||||
script/source = "extends Node2D
|
||||
@@ -21,7 +21,8 @@ script = ExtResource( 1 )
|
||||
position = Vector2( 539, 275 )
|
||||
script = SubResource( 1 )
|
||||
|
||||
[node name="TurnQueue" parent="." instance=ExtResource( 2 )]
|
||||
[node name="TurnQueue" type="Node" parent="."]
|
||||
script = ExtResource( 2 )
|
||||
combatants_list = NodePath("../Combatants")
|
||||
|
||||
[node name="UI" type="Control" parent="."]
|
||||
@@ -1,7 +1,5 @@
|
||||
extends Node
|
||||
|
||||
const combatant = preload("../combatants/Combatant.gd")
|
||||
|
||||
export(NodePath) var combatants_list
|
||||
var queue = [] setget set_queue
|
||||
var active_combatant = null setget _set_active_combatant
|
||||
@@ -43,7 +41,7 @@ func remove(combatant):
|
||||
func set_queue(new_queue):
|
||||
queue.clear()
|
||||
for node in new_queue:
|
||||
if not node is combatant:
|
||||
if not node is Combatant:
|
||||
continue
|
||||
queue.append(node)
|
||||
node.active = false
|
||||
@@ -1,3 +1,4 @@
|
||||
class_name Combatant
|
||||
extends Node
|
||||
|
||||
export(int) var damage = 1
|
||||
15
2d/role_playing_game/combat/combatants/Combatant.tscn
Normal file
@@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://combat/combatants/Combatant.gd" type="Script" id=1]
|
||||
[ext_resource path="res://combat/combatants/Health.gd" type="Script" id=2]
|
||||
[ext_resource path="res://combat/combatants/sprites/Sprite.tscn" type="PackedScene" id=3]
|
||||
|
||||
[node name="Combatant" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
damage = 2
|
||||
|
||||
[node name="Health" type="Node" parent="."]
|
||||
script = ExtResource( 2 )
|
||||
life = 10
|
||||
|
||||
[node name="Sprite" parent="." instance=ExtResource( 3 )]
|
||||
@@ -1,10 +1,12 @@
|
||||
extends "Combatant.gd"
|
||||
extends Combatant
|
||||
|
||||
func set_active(value):
|
||||
.set_active(value)
|
||||
if not active:
|
||||
return
|
||||
|
||||
if not $Timer.is_inside_tree():
|
||||
return
|
||||
$Timer.start()
|
||||
yield($Timer, "timeout")
|
||||
var target
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://turn_combat/combatants/Combatant.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://turn_combat/combatants/Opponent.gd" type="Script" id=2]
|
||||
[ext_resource path="res://turn_combat/combatants/sprites/green.png" type="Texture" id=3]
|
||||
[ext_resource path="res://combat/combatants/Combatant.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://combat/combatants/Opponent.gd" type="Script" id=2]
|
||||
[ext_resource path="res://combat/combatants/sprites/green.png" type="Texture" id=3]
|
||||
|
||||
[node name="Opponent" instance=ExtResource( 1 )]
|
||||
script = ExtResource( 2 )
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://turn_combat/combatants/Combatant.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://combat/combatants/Combatant.tscn" type="PackedScene" id=1]
|
||||
|
||||
[node name="Player" instance=ExtResource( 1 )]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://turn_combat/combatants/health/Health.gd" type="Script" id=1]
|
||||
[ext_resource path="res://combat/combatants/Health.gd" type="Script" id=1]
|
||||
|
||||
[node name="Health" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://screens/combat/actors/sprites/shadow.png" type="Texture" id=1]
|
||||
[ext_resource path="res://screens/combat/actors/sprites/blue.png" type="Texture" id=2]
|
||||
[ext_resource path="res://combat/combatants/sprites/shadow.png" type="Texture" id=1]
|
||||
[ext_resource path="res://combat/combatants/sprites/blue.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "take_damage"
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/blue.png-127e2b8d7aa8f4a7572c4923c2b20228.stex"
|
||||
path="res://.import/blue.png-8092cf6d59f8b71b187a850a15aa9759.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://screens/combat/actors/sprites/blue.png"
|
||||
dest_files=[ "res://.import/blue.png-127e2b8d7aa8f4a7572c4923c2b20228.stex" ]
|
||||
source_file="res://combat/combatants/sprites/blue.png"
|
||||
dest_files=[ "res://.import/blue.png-8092cf6d59f8b71b187a850a15aa9759.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/green.png-7937ec3931675b5dd0f218cbb8ae006a.stex"
|
||||
path="res://.import/green.png-d2deadceb974a66b9f9b9df11dc41501.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://screens/combat/actors/sprites/green.png"
|
||||
dest_files=[ "res://.import/green.png-7937ec3931675b5dd0f218cbb8ae006a.stex" ]
|
||||
source_file="res://combat/combatants/sprites/green.png"
|
||||
dest_files=[ "res://.import/green.png-d2deadceb974a66b9f9b9df11dc41501.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 741 B After Width: | Height: | Size: 741 B |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/object.png-f9ec4c5540ae154e2e73d50438312f26.stex"
|
||||
path="res://.import/shadow.png-d8772fa49c8867b55809e76164b76188.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grid_movement/tilesets/grid/object.png"
|
||||
dest_files=[ "res://.import/object.png-f9ec4c5540ae154e2e73d50438312f26.stex" ]
|
||||
source_file="res://combat/combatants/sprites/shadow.png"
|
||||
dest_files=[ "res://.import/shadow.png-d8772fa49c8867b55809e76164b76188.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://theme/labels/Title.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://theme/fonts/montserrat_extra_bold_48.tres" type="DynamicFont" id=1]
|
||||
|
||||
[node name="Info" type="PanelContainer"]
|
||||
margin_right = 409.0
|
||||
@@ -17,12 +17,22 @@ margin_top = 7.0
|
||||
margin_right = 402.0
|
||||
margin_bottom = 232.0
|
||||
|
||||
[node name="Name" parent="VBoxContainer" instance=ExtResource( 1 )]
|
||||
[node name="Name" type="Label" parent="VBoxContainer"]
|
||||
margin_right = 395.0
|
||||
margin_bottom = 110.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 7
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
custom_colors/font_color_shadow = Color( 1, 0.596078, 0, 1 )
|
||||
custom_constants/shadow_offset_y = 5
|
||||
text = "{name}"
|
||||
align = 1
|
||||
autowrap = true
|
||||
clip_text = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Health" type="ProgressBar" parent="VBoxContainer"]
|
||||
margin_top = 168.0
|
||||
@@ -1,12 +1,12 @@
|
||||
[gd_scene load_steps=11 format=2]
|
||||
|
||||
[ext_resource path="res://grid_movement/tilesets/grid_lines/grid_lines_tileset.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://grid_movement/tilesets/grid/grid_tileset.tres" type="TileSet" id=2]
|
||||
[ext_resource path="res://grid_movement/grid/lines/grid_lines_tileset.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://grid_movement/grid/tiles/grid_tileset.tres" type="TileSet" id=2]
|
||||
[ext_resource path="res://grid_movement/grid/Grid.gd" type="Script" id=3]
|
||||
[ext_resource path="res://grid_movement/pawns/Character.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://turn_combat/combatants/Player.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://grid_movement/pawns/Character.gd" type="Script" id=6]
|
||||
[ext_resource path="res://turn_combat/combatants/Opponent.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://combat/combatants/Player.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://grid_movement/pawns/Opponent.gd" type="Script" id=6]
|
||||
[ext_resource path="res://combat/combatants/Opponent.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://dialogue/dialogue_player/DialoguePlayer.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://grid_movement/pawns/Pawn.gd" type="Script" id=9]
|
||||
[ext_resource path="res://dialogue/interface/Interface.tscn" type="PackedScene" id=10]
|
||||
|
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 111 B |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/obstacle.png-303025fbfb0bdc414a247e8ee1624a90.stex"
|
||||
path="res://.import/grid_lines.png-52aa706884a3dba960110e63cdf54a8c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grid_movement/tilesets/grid/obstacle.png"
|
||||
dest_files=[ "res://.import/obstacle.png-303025fbfb0bdc414a247e8ee1624a90.stex" ]
|
||||
source_file="res://grid_movement/grid/lines/grid_lines.png"
|
||||
dest_files=[ "res://.import/grid_lines.png-52aa706884a3dba960110e63cdf54a8c.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="TileSet" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://grid_movement/tilesets/grid_lines/grid_lines.png" type="Texture" id=1]
|
||||
[ext_resource path="res://grid_movement/grid/lines/grid_lines.png" type="Texture" id=1]
|
||||
|
||||
|
||||
[resource]
|
||||
|
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 698 B |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/actor.png-147dff690f83be8a2c66a5bfa83da49f.stex"
|
||||
path="res://.import/actor.png-c322bfa3077f1c55a7d6251f76155bcc.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grid_movement/tilesets/grid/actor.png"
|
||||
dest_files=[ "res://.import/actor.png-147dff690f83be8a2c66a5bfa83da49f.stex" ]
|
||||
source_file="res://grid_movement/grid/tiles/actor.png"
|
||||
dest_files=[ "res://.import/actor.png-c322bfa3077f1c55a7d6251f76155bcc.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_resource type="TileSet" load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://grid_movement/tilesets/grid/actor.png" type="Texture" id=1]
|
||||
[ext_resource path="res://grid_movement/tilesets/grid/obstacle.png" type="Texture" id=2]
|
||||
[ext_resource path="res://grid_movement/tilesets/grid/object.png" type="Texture" id=3]
|
||||
[ext_resource path="res://grid_movement/grid/tiles/actor.png" type="Texture" id=1]
|
||||
[ext_resource path="res://grid_movement/grid/tiles/obstacle.png" type="Texture" id=2]
|
||||
[ext_resource path="res://grid_movement/grid/tiles/object.png" type="Texture" id=3]
|
||||
|
||||
|
||||
[resource]
|
||||
|
Before Width: | Height: | Size: 913 B After Width: | Height: | Size: 913 B |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/sprite.png-e28cedc69371816a3468e6325b327ece.stex"
|
||||
path="res://.import/object.png-105b8788e1883723a96438fd97d5db23.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grid_movement/pawns/sprite.png"
|
||||
dest_files=[ "res://.import/sprite.png-e28cedc69371816a3468e6325b327ece.stex" ]
|
||||
source_file="res://grid_movement/grid/tiles/object.png"
|
||||
dest_files=[ "res://.import/object.png-105b8788e1883723a96438fd97d5db23.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 103 B |
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/obstacle.png-bd15bb10c9507019dfb2cad5661bca49.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grid_movement/grid/tiles/obstacle.png"
|
||||
dest_files=[ "res://.import/obstacle.png-bd15bb10c9507019dfb2cad5661bca49.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,4 +1,4 @@
|
||||
extends "Pawn.gd"
|
||||
extends Pawn
|
||||
|
||||
onready var Grid = get_parent()
|
||||
var lost = false
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://grid_movement/pawns/Actor.gd" type="Script" id=1]
|
||||
[ext_resource path="res://grid_movement/pawns/character.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "bump"
|
||||
length = 0.1
|
||||
step = 0.01
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Pivot/Sprite:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.02, 0.04, 0.06, 0.08, 0.1 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 0, 0 ), Vector2( -1.5, -9 ), Vector2( 6.5, 2.5 ), Vector2( -11.5, 8.5 ), Vector2( 4, -5 ), Vector2( 0, 0 ) ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=2]
|
||||
resource_name = "walk"
|
||||
length = 0.25
|
||||
step = 0.05
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Pivot/Sprite:self_modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = false
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.25 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 0.9375, 0, 1 ), Color( 1, 1, 1, 1 ) ]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("Pivot/Sprite:position")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.15, 0.25 ),
|
||||
"transitions": PoolRealArray( 1, 0.303143, 2.61003, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 1.43051e-06, -1.90735e-06 ), Vector2( 1.43051e-06, -1.90735e-06 ), Vector2( 0, -20 ), Vector2( 1.43051e-06, -1.90735e-06 ) ]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("Pivot/Sprite:scale")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0, 0.05, 0.15, 0.25 ),
|
||||
"transitions": PoolRealArray( 1, 0.354553, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 1, 1 ), Vector2( 1.20007, 0.917384 ), Vector2( 0.916712, 1.13495 ), Vector2( 1, 1 ) ]
|
||||
}
|
||||
|
||||
[node name="Actor" type="Node2D"]
|
||||
position = Vector2( 32, 32 )
|
||||
z_index = 1
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/bump = SubResource( 1 )
|
||||
anims/walk = SubResource( 2 )
|
||||
|
||||
[node name="Tween" type="Tween" parent="."]
|
||||
|
||||
[node name="Pivot" type="Position2D" parent="."]
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Pivot"]
|
||||
texture = ExtResource( 2 )
|
||||
centered = false
|
||||
offset = Vector2( -32, -32 )
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://grid_movement/pawns/Walker.gd" type="Script" id=1]
|
||||
[ext_resource path="res://grid_movement/pawns/sprite.png" type="Texture" id=2]
|
||||
[ext_resource path="res://grid_movement/pawns/character.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "bump"
|
||||
@@ -61,7 +61,7 @@ tracks/2/keys = {
|
||||
"values": [ Vector2( 1, 1 ), Vector2( 1.20007, 0.917384 ), Vector2( 0.916712, 1.13495 ), Vector2( 1, 1 ) ]
|
||||
}
|
||||
|
||||
[node name="Actor" type="Node2D"]
|
||||
[node name="Character" type="Node2D"]
|
||||
position = Vector2( 32, 32 )
|
||||
z_index = 1
|
||||
script = ExtResource( 1 )
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
extends "Actor.gd"
|
||||
|
||||
func _ready():
|
||||
set_process(false)
|
||||
|
||||
|
||||
func get_input_direction():
|
||||
return Vector2.ZERO
|
||||
@@ -1,4 +1,4 @@
|
||||
extends "Pawn.gd"
|
||||
extends Pawn
|
||||
|
||||
#warning-ignore:unused_class_variable
|
||||
export(PackedScene) var combat_actor
|
||||
@@ -1,3 +1,4 @@
|
||||
class_name Pawn
|
||||
extends Node2D
|
||||
|
||||
enum CellType { ACTOR, OBSTACLE, OBJECT }
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
extends "Actor.gd"
|
||||
|
||||
const DIRECTIONS = [-1, 1]
|
||||
|
||||
func get_input_direction():
|
||||
if not active:
|
||||
return Vector2()
|
||||
var random_x = DIRECTIONS[randi() % DIRECTIONS.size()]
|
||||
var random_y = DIRECTIONS[randi() % DIRECTIONS.size()]
|
||||
|
||||
var random_axis = randi() % 2
|
||||
if random_axis > 0:
|
||||
random_x = 0
|
||||
else:
|
||||
random_y = 0
|
||||
return Vector2(random_x, random_y)
|
||||
@@ -1,6 +1,6 @@
|
||||
extends "Pawn.gd"
|
||||
extends Pawn
|
||||
|
||||
onready var Grid = get_parent()
|
||||
onready var parent = get_parent()
|
||||
#warning-ignore:unused_class_variable
|
||||
export(PackedScene) var combat_actor
|
||||
#warning-ignore:unused_class_variable
|
||||
@@ -16,7 +16,7 @@ func _process(_delta):
|
||||
return
|
||||
update_look_direction(input_direction)
|
||||
|
||||
var target_position = Grid.request_move(self, input_direction)
|
||||
var target_position = parent.request_move(self, input_direction)
|
||||
if target_position:
|
||||
move_to(target_position)
|
||||
$Tween.start()
|
||||
|
||||
|
Before Width: | Height: | Size: 480 B |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/grid_lines.png-151c8a0e38dd3f92e569d4b4f869a28e.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://grid_movement/tilesets/grid_lines/grid_lines.png"
|
||||
dest_files=[ "res://.import/grid_lines.png-151c8a0e38dd3f92e569d4b4f869a28e.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -8,6 +8,22 @@
|
||||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ {
|
||||
"base": "Node",
|
||||
"class": "Combatant",
|
||||
"language": "GDScript",
|
||||
"path": "res://combat/combatants/Combatant.gd"
|
||||
}, {
|
||||
"base": "Node2D",
|
||||
"class": "Pawn",
|
||||
"language": "GDScript",
|
||||
"path": "res://grid_movement/pawns/Pawn.gd"
|
||||
} ]
|
||||
_global_script_class_icons={
|
||||
"Combatant": "",
|
||||
"Pawn": ""
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="JRPG Demo"
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://turn_combat/combatants/Combatant.gd" type="Script" id=1]
|
||||
[ext_resource path="res://turn_combat/combatants/health/Health.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://screens/combat/actors/sprites/Sprite.tscn" type="PackedScene" id=3]
|
||||
|
||||
[node name="Actor" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
damage = 2
|
||||
|
||||
[node name="Health" parent="." instance=ExtResource( 2 )]
|
||||
life = 10
|
||||
|
||||
[node name="Sprite" parent="." instance=ExtResource( 3 )]
|
||||
@@ -1,39 +0,0 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://screens/combat/actors/Actor.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://screens/combat/actors/sprites/green.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="GDScript" id=1]
|
||||
script/source = "extends \"res://turn_combat/combatants/Combatant.gd\"
|
||||
|
||||
func set_active(value):
|
||||
.set_active(value)
|
||||
if not active:
|
||||
return
|
||||
|
||||
$Timer.start()
|
||||
yield($Timer, \"timeout\")
|
||||
var target
|
||||
for actor in get_parent().get_children():
|
||||
if not actor == self:
|
||||
target = actor
|
||||
break
|
||||
attack(target)"
|
||||
|
||||
[node name="Opponent" instance=ExtResource( 1 )]
|
||||
script = SubResource( 1 )
|
||||
damage = 3
|
||||
defense = 0
|
||||
|
||||
[node name="Health" parent="." index="0"]
|
||||
life = 7
|
||||
max_life = 7
|
||||
|
||||
[node name="Body" parent="Sprite/Pivot" index="1"]
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="Timer" type="Timer" parent="." index="2"]
|
||||
wait_time = 0.25
|
||||
one_shot = true
|
||||
|
||||
[editable path="Sprite"]
|
||||
@@ -1,6 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://screens/combat/actors/Actor.tscn" type="PackedScene" id=1]
|
||||
|
||||
[node name="Player" instance=ExtResource( 1 )]
|
||||
defense = 2
|
||||
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/shadow.png-3c36ca984d4b9e8eba8c422537f5ca42.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://screens/combat/actors/sprites/shadow.png"
|
||||
dest_files=[ "res://.import/shadow.png-3c36ca984d4b9e8eba8c422537f5ca42.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,36 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://theme/labels/Title.tscn" type="PackedScene" id=1]
|
||||
|
||||
[node name="ActorInfo" type="PanelContainer"]
|
||||
margin_right = 409.0
|
||||
margin_bottom = 239.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 402.0
|
||||
margin_bottom = 232.0
|
||||
|
||||
[node name="Name" parent="VBoxContainer" instance=ExtResource( 1 )]
|
||||
margin_right = 395.0
|
||||
margin_bottom = 110.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 7
|
||||
text = "{name}"
|
||||
|
||||
[node name="Health" type="ProgressBar" parent="VBoxContainer"]
|
||||
margin_top = 168.0
|
||||
margin_right = 395.0
|
||||
margin_bottom = 170.0
|
||||
size_flags_vertical = 6
|
||||
max_value = 10.0
|
||||
step = 1.0
|
||||
value = 5.0
|
||||
rounded = true
|
||||
percent_visible = false
|
||||
@@ -1,104 +0,0 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://theme/theme.tres" type="Theme" id=1]
|
||||
[ext_resource path="res://theme/labels/Title.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://theme/fonts/montserrat_extra_bold_24.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://theme/progressbar/foreground_stylebox_red.tres" type="StyleBox" id=4]
|
||||
[ext_resource path="res://theme/progressbar/foreground_stylebox_blue.tres" type="StyleBox" id=5]
|
||||
|
||||
[sub_resource type="GDScript" id=1]
|
||||
script/source = "extends VBoxContainer
|
||||
|
||||
func _ready():
|
||||
set_process(false)
|
||||
|
||||
func _process(delta):
|
||||
for p in get_children():
|
||||
$ProgressBarBlue.value += 10 * delta
|
||||
$ProgressBarRed.value += 10 * delta
|
||||
|
||||
|
||||
func _on_Button_button_down():
|
||||
set_process(true)
|
||||
|
||||
|
||||
func _on_Button_button_up():
|
||||
set_process(false)
|
||||
"
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
theme = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
margin_left = 128.0
|
||||
margin_top = 64.0
|
||||
margin_right = 896.0
|
||||
margin_bottom = 536.0
|
||||
|
||||
[node name="Title" parent="Panel" instance=ExtResource( 2 )]
|
||||
margin_right = 767.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
|
||||
margin_left = 128.0
|
||||
margin_top = 180.0
|
||||
margin_right = 524.0
|
||||
margin_bottom = 424.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
custom_constants/separation = 5
|
||||
script = SubResource( 1 )
|
||||
|
||||
[node name="Speed" type="Label" parent="Panel/VBoxContainer"]
|
||||
margin_right = 396.0
|
||||
margin_bottom = 40.0
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "Speed"
|
||||
|
||||
[node name="ProgressBarRed" type="ProgressBar" parent="Panel/VBoxContainer"]
|
||||
margin_top = 45.0
|
||||
margin_right = 396.0
|
||||
margin_bottom = 85.0
|
||||
custom_styles/fg = ExtResource( 4 )
|
||||
step = 1.0
|
||||
percent_visible = false
|
||||
|
||||
[node name="BlankSpace" type="ReferenceRect" parent="Panel/VBoxContainer"]
|
||||
margin_top = 90.0
|
||||
margin_right = 396.0
|
||||
margin_bottom = 154.0
|
||||
rect_min_size = Vector2( 0, 16 )
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Acceleration" type="Label" parent="Panel/VBoxContainer"]
|
||||
margin_top = 159.0
|
||||
margin_right = 396.0
|
||||
margin_bottom = 199.0
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "Acceleration"
|
||||
|
||||
[node name="ProgressBarBlue" type="ProgressBar" parent="Panel/VBoxContainer"]
|
||||
margin_top = 204.0
|
||||
margin_right = 396.0
|
||||
margin_bottom = 244.0
|
||||
custom_styles/fg = ExtResource( 5 )
|
||||
step = 1.0
|
||||
percent_visible = false
|
||||
|
||||
[node name="Button" type="Button" parent="Panel"]
|
||||
margin_left = 531.0
|
||||
margin_top = 258.0
|
||||
margin_right = 664.0
|
||||
margin_bottom = 377.0
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 4
|
||||
size_flags_stretch_ratio = 0.0
|
||||
text = "Add"
|
||||
|
||||
[connection signal="button_down" from="Panel/Button" to="Panel/VBoxContainer" method="_on_Button_button_down"]
|
||||
[connection signal="button_up" from="Panel/Button" to="Panel/VBoxContainer" method="_on_Button_button_up"]
|
||||
11
2d/role_playing_game/theme/foreground_stylebox_blue.tres
Normal file
@@ -0,0 +1,11 @@
|
||||
[gd_resource type="StyleBoxTexture" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://theme/images/foreground_blue.png" type="Texture" id=1]
|
||||
|
||||
[resource]
|
||||
texture = ExtResource( 1 )
|
||||
region_rect = Rect2( 0, 0, 64, 64 )
|
||||
margin_left = 18.0
|
||||
margin_right = 18.0
|
||||
margin_top = 18.0
|
||||
margin_bottom = 18.0
|
||||
11
2d/role_playing_game/theme/foreground_stylebox_red.tres
Normal file
@@ -0,0 +1,11 @@
|
||||
[gd_resource type="StyleBoxTexture" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://theme/images/foreground_red.png" type="Texture" id=1]
|
||||
|
||||
[resource]
|
||||
texture = ExtResource( 1 )
|
||||
region_rect = Rect2( 0, 0, 64, 64 )
|
||||
margin_left = 18.0
|
||||
margin_right = 18.0
|
||||
margin_top = 20.0
|
||||
margin_bottom = 20.0
|
||||
|
Before Width: | Height: | Size: 973 B After Width: | Height: | Size: 973 B |
34
2d/role_playing_game/theme/images/background.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/background.png-18a7ab092343a1a2d858e1a344411242.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://theme/images/background.png"
|
||||
dest_files=[ "res://.import/background.png-18a7ab092343a1a2d858e1a344411242.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_rect.png-50631b7139a07837e9f4856772433e8e.stex"
|
||||
path="res://.import/button_rect.png-b2c41a1b80f4932c0e158cb00f0366e3.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://theme/button/button_rect.png"
|
||||
dest_files=[ "res://.import/button_rect.png-50631b7139a07837e9f4856772433e8e.stex" ]
|
||||
source_file="res://theme/images/button_rect.png"
|
||||
dest_files=[ "res://.import/button_rect.png-b2c41a1b80f4932c0e158cb00f0366e3.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/button_rect_pressed.png-e5e25d3b6005d4ba5edf4354beb6dc06.stex"
|
||||
path="res://.import/button_rect_pressed.png-412a6dd553cfc471e5f96826ccf6d434.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://theme/button/button_rect_pressed.png"
|
||||
dest_files=[ "res://.import/button_rect_pressed.png-e5e25d3b6005d4ba5edf4354beb6dc06.stex" ]
|
||||
source_file="res://theme/images/button_rect_pressed.png"
|
||||
dest_files=[ "res://.import/button_rect_pressed.png-412a6dd553cfc471e5f96826ccf6d434.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 993 B After Width: | Height: | Size: 993 B |
34
2d/role_playing_game/theme/images/foreground_blue.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/foreground_blue.png-35d7e9646fc1e18e8f56dc08539244f0.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://theme/images/foreground_blue.png"
|
||||
dest_files=[ "res://.import/foreground_blue.png-35d7e9646fc1e18e8f56dc08539244f0.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
34
2d/role_playing_game/theme/images/foreground_red.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/foreground_red.png-c23ba55805336ffe255b2be9b971baee.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://theme/images/foreground_red.png"
|
||||
dest_files=[ "res://.import/foreground_red.png-c23ba55805336ffe255b2be9b971baee.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
34
2d/role_playing_game/theme/images/panel_rect.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/panel_rect.png-eef2ae28539c58e6b551075147d16b2a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://theme/images/panel_rect.png"
|
||||
dest_files=[ "res://.import/panel_rect.png-eef2ae28539c58e6b551075147d16b2a.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,18 +0,0 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://theme/fonts/montserrat_extra_bold_48.tres" type="DynamicFont" id=1]
|
||||
|
||||
[node name="Title" type="Label"]
|
||||
margin_right = 113.0
|
||||
margin_bottom = 60.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
custom_colors/font_color_shadow = Color( 1, 0.596078, 0, 1 )
|
||||
custom_constants/shadow_offset_y = 5
|
||||
text = "Title"
|
||||
align = 1
|
||||
autowrap = true
|
||||
clip_text = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/background.png-db91f961480760b8bfa082076dc72dbd.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://theme/progressbar/background.png"
|
||||
dest_files=[ "res://.import/background.png-db91f961480760b8bfa082076dc72dbd.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/foreground_blue.png-1208ba20a94923d82a7b0eacc6914552.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://theme/progressbar/foreground_blue.png"
|
||||
dest_files=[ "res://.import/foreground_blue.png-1208ba20a94923d82a7b0eacc6914552.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/foreground_red.png-60d00de182b78bd324a56c9f03008a15.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://theme/progressbar/foreground_red.png"
|
||||
dest_files=[ "res://.import/foreground_red.png-60d00de182b78bd324a56c9f03008a15.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
@@ -1,25 +0,0 @@
|
||||
[gd_resource type="StyleBoxTexture" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://theme/progressbar/foreground_blue.png" type="Texture" id=1]
|
||||
|
||||
|
||||
[resource]
|
||||
|
||||
content_margin_left = -1.0
|
||||
content_margin_right = -1.0
|
||||
content_margin_top = -1.0
|
||||
content_margin_bottom = -1.0
|
||||
texture = ExtResource( 1 )
|
||||
region_rect = Rect2( 0, 0, 64, 64 )
|
||||
margin_left = 18.0
|
||||
margin_right = 18.0
|
||||
margin_top = 18.0
|
||||
margin_bottom = 18.0
|
||||
expand_margin_left = 0.0
|
||||
expand_margin_right = 0.0
|
||||
expand_margin_top = 0.0
|
||||
expand_margin_bottom = 0.0
|
||||
modulate_color = Color( 1, 1, 1, 1 )
|
||||
draw_center = true
|
||||
_sections_unfolded = [ "Margin" ]
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
[gd_resource type="StyleBoxTexture" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://theme/progressbar/foreground_red.png" type="Texture" id=1]
|
||||
|
||||
|
||||
[resource]
|
||||
|
||||
content_margin_left = -1.0
|
||||
content_margin_right = -1.0
|
||||
content_margin_top = -1.0
|
||||
content_margin_bottom = -1.0
|
||||
texture = ExtResource( 1 )
|
||||
region_rect = Rect2( 0, 0, 64, 64 )
|
||||
margin_left = 18.0
|
||||
margin_right = 18.0
|
||||
margin_top = 20.0
|
||||
margin_bottom = 20.0
|
||||
expand_margin_left = 0.0
|
||||
expand_margin_right = 0.0
|
||||
expand_margin_top = 0.0
|
||||
expand_margin_bottom = 0.0
|
||||
modulate_color = Color( 1, 1, 1, 1 )
|
||||
draw_center = true
|
||||
_sections_unfolded = [ "Margin" ]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[gd_resource type="Theme" load_steps=14 format=2]
|
||||
|
||||
[ext_resource path="res://theme/fonts/montserrat_extra_bold_32.tres" type="DynamicFont" id=1]
|
||||
[ext_resource path="res://theme/button/button_rect.png" type="Texture" id=2]
|
||||
[ext_resource path="res://theme/button/button_rect_pressed.png" type="Texture" id=3]
|
||||
[ext_resource path="res://theme/images/button_rect.png" type="Texture" id=2]
|
||||
[ext_resource path="res://theme/images/button_rect_pressed.png" type="Texture" id=3]
|
||||
[ext_resource path="res://theme/fonts/montserrat_extra_bold_24.tres" type="DynamicFont" id=4]
|
||||
[ext_resource path="res://theme/panel/panel_rect.png" type="Texture" id=5]
|
||||
[ext_resource path="res://theme/progressbar/background.png" type="Texture" id=6]
|
||||
[ext_resource path="res://theme/progressbar/foreground_stylebox_red.tres" type="StyleBox" id=7]
|
||||
[ext_resource path="res://theme/images/panel_rect.png" type="Texture" id=5]
|
||||
[ext_resource path="res://theme/images/background.png" type="Texture" id=6]
|
||||
[ext_resource path="res://theme/foreground_stylebox_red.tres" type="StyleBox" id=7]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id=1]
|
||||
resource_name = "button_focus_style"
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://turn_combat/combatants/Combatant.gd" type="Script" id=1]
|
||||
[ext_resource path="res://turn_combat/combatants/health/Health.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://turn_combat/combatants/sprites/Sprite.tscn" type="PackedScene" id=3]
|
||||
|
||||
[node name="Combatant" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
damage = 2
|
||||
|
||||
[node name="Health" parent="." instance=ExtResource( 2 )]
|
||||
life = 10
|
||||
|
||||
[node name="Sprite" parent="." instance=ExtResource( 3 )]
|
||||
@@ -1,38 +0,0 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://turn_combat/combatants/sprites/shadow.png" type="Texture" id=1]
|
||||
[ext_resource path="res://turn_combat/combatants/sprites/blue.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "take_damage"
|
||||
length = 0.2
|
||||
step = 0.05
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Pivot/Body:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.05, 0.1, 0.15, 0.2 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 1, 1, 1 ), Color( 3, 0.253906, 0.253906, 1 ), Color( 1, 1, 1, 1 ), Color( 3, 0.253906, 0.253906, 1 ), Color( 1, 1, 1, 1 ) ]
|
||||
}
|
||||
|
||||
[node name="Sprite" type="Node2D"]
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
anims/take_damage = SubResource( 1 )
|
||||
|
||||
[node name="Tween" type="Tween" parent="."]
|
||||
|
||||
[node name="Pivot" type="Position2D" parent="."]
|
||||
|
||||
[node name="Shadow" type="Sprite" parent="Pivot"]
|
||||
position = Vector2( 0, -15 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="Body" type="Sprite" parent="Pivot"]
|
||||
position = Vector2( 0, -76 )
|
||||
texture = ExtResource( 2 )
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/green.png-0c539b10234a7340c6135a5edb21b0e1.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://turn_combat/combatants/sprites/green.png"
|
||||
dest_files=[ "res://.import/green.png-0c539b10234a7340c6135a5edb21b0e1.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=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
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||