Initial commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# Normalize EOL for all files that Git considers text files.
|
||||
* text=auto eol=lf
|
||||
*.so filter=lfs diff=lfs merge=lfs -text
|
||||
*.dll filter=lfs diff=lfs merge=lfs -text
|
||||
*.exp filter=lfs diff=lfs merge=lfs -text
|
||||
*.dylib filter=lfs diff=lfs merge=lfs -text
|
||||
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -0,0 +1,3 @@
|
||||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
/android/
|
||||
@@ -0,0 +1,3 @@
|
||||
[gd_resource type="ShaderMaterial" format=3 uid="uid://b6ypw32cufrj7"]
|
||||
|
||||
[resource]
|
||||
@@ -0,0 +1,18 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://d10mbhg8260q2"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cojpeaof1n74y" path="res://Textures/Untitled.png" id="1_5bsff"]
|
||||
[ext_resource type="Shader" path="res://Shader/Card.gdshader" id="1_ihg0q"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lbmgp"]
|
||||
shader = ExtResource("1_ihg0q")
|
||||
shader_parameter/offset = Vector2(8, 8)
|
||||
shader_parameter/modulate = null
|
||||
|
||||
[node name="Card" type="Node2D"]
|
||||
|
||||
[node name="Untitled" type="Sprite2D" parent="."]
|
||||
material = SubResource("ShaderMaterial_lbmgp")
|
||||
scale = Vector2(0.2, 0.2)
|
||||
texture = ExtResource("1_5bsff")
|
||||
centered = false
|
||||
region_rect = Rect2(-100, -100, 650, 900)
|
||||
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bynvsy8nv7s6e"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/CardContainer.gd" id="1_t4lh7"]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
script = ExtResource("1_t4lh7")
|
||||
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://ci64kmi2w75i5"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Game.gd" id="1_xlkig"]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_xlkig")
|
||||
@@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bvhll2ydr0f4t"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ci64kmi2w75i5" path="res://Scenes/Game.tscn" id="1_o6j85"]
|
||||
|
||||
[node name="Lobby" type="Node2D"]
|
||||
|
||||
[node name="Game" parent="." instance=ExtResource("1_o6j85")]
|
||||
@@ -0,0 +1,28 @@
|
||||
extends Node2D
|
||||
|
||||
var cards = []
|
||||
var width: float
|
||||
var cardScene
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
width = 500.0
|
||||
cardScene = preload("res://Objects/Card.tscn")
|
||||
draw_cards()
|
||||
|
||||
func draw_cards() -> void:
|
||||
if (cards.size() == 0):
|
||||
return
|
||||
var card_width = width / cards.size()
|
||||
for i in range(cards.size()):
|
||||
var c = cards[i]
|
||||
print(card_width)
|
||||
var card = cardScene.instantiate()
|
||||
card.position.x = card_width * i
|
||||
self.add_child(card)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
@@ -0,0 +1,31 @@
|
||||
extends Node
|
||||
|
||||
var game_id: String = "66cdb65deb38979bdfa8098a"
|
||||
|
||||
var containerScene
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
var http_request = HTTPRequest.new()
|
||||
add_child(http_request)
|
||||
http_request.request_completed.connect(self.draw_game)
|
||||
|
||||
containerScene = preload("res://Objects/CardContainer.tscn")
|
||||
var error = http_request.request("http://localhost:8765/api/games/" + game_id)
|
||||
if error != OK:
|
||||
push_error("An error occurred in the HTTP request.")
|
||||
|
||||
|
||||
func draw_game(_result, _response_code, _headers, body):
|
||||
var json = JSON.new()
|
||||
json.parse(body.get_string_from_utf8())
|
||||
var response = json.get_data()
|
||||
# print(response)
|
||||
var container = containerScene.instantiate()
|
||||
container.cards = response.market.cards
|
||||
self.add_child(container)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
# func _process(delta: float) -> void:
|
||||
# pass
|
||||
@@ -0,0 +1,25 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
var http_request = HTTPRequest.new()
|
||||
add_child(http_request)
|
||||
http_request.request_completed.connect(self._http_request_completed)
|
||||
|
||||
self.request_completed.connect(self._http_request_completed)
|
||||
var error = http_request.request("http://localhost:8765/api/games")
|
||||
if error != OK:
|
||||
push_error("An error occurred in the HTTP request.")
|
||||
|
||||
|
||||
func _http_request_completed(_result, _response_code, _headers, body):
|
||||
var json = JSON.new()
|
||||
json.parse(body.get_string_from_utf8())
|
||||
var response := json.get_data() as Array
|
||||
|
||||
print(response)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
# func _process(delta: float) -> void:
|
||||
# pass
|
||||
@@ -0,0 +1 @@
|
||||
class_name HeronContainer
|
||||
@@ -0,0 +1,3 @@
|
||||
class_name HeronTeam
|
||||
|
||||
var health: int
|
||||
@@ -0,0 +1,14 @@
|
||||
shader_type canvas_item;
|
||||
render_mode blend_mix;
|
||||
|
||||
uniform vec2 offset = vec2(80.0, 8.0);
|
||||
uniform vec4 modulate : source_color;
|
||||
|
||||
void fragment() {
|
||||
vec2 ps = TEXTURE_PIXEL_SIZE;
|
||||
|
||||
vec4 shadow = vec4(modulate.rgb, texture(TEXTURE, UV - offset * ps).a * modulate.a);
|
||||
vec4 col = texture(TEXTURE, (UV*1.2));
|
||||
|
||||
COLOR = mix(shadow, col, col.a);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
[gd_resource type="ImageTexture" format=3 uid="uid://48sgk54vcj54"]
|
||||
|
||||
[resource]
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cojpeaof1n74y"
|
||||
path="res://.godot/imported/Untitled.png-a8d098f32bff6b6b26fc00deea6aa0e6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/Untitled.png"
|
||||
dest_files=["res://.godot/imported/Untitled.png-a8d098f32bff6b6b26fc00deea6aa0e6.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016-2023 The Godot Engine community
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
[configuration]
|
||||
|
||||
entry_symbol = "git_plugin_init"
|
||||
compatibility_minimum = "4.1.0"
|
||||
|
||||
[libraries]
|
||||
|
||||
macos.editor = "macos/libgit_plugin.macos.editor.universal.dylib"
|
||||
windows.editor.x86_64 = "win64/libgit_plugin.windows.editor.x86_64.dll"
|
||||
linux.editor.x86_64 = "linux/libgit_plugin.linux.editor.x86_64.so"
|
||||
linux.editor.arm64 = "linux/libgit_plugin.linux.editor.arm64.so"
|
||||
linux.editor.rv64 = ""
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
[plugin]
|
||||
|
||||
name="Godot Git Plugin"
|
||||
description="This plugin lets you interact with Git without leaving the Godot editor. More information can be found at https://github.com/godotengine/godot-git-plugin/wiki"
|
||||
author="twaritwaikar"
|
||||
version="v3.1.1"
|
||||
script="godot-git-plugin.gd"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>
|
||||
|
After Width: | Height: | Size: 994 B |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://da24f274eb488"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.svg"
|
||||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
@@ -0,0 +1,27 @@
|
||||
; 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=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Heron-godot"
|
||||
config/version="1.0.0"
|
||||
run/main_scene="res://Scenes/Lobby.tscn"
|
||||
config/features=PackedStringArray("4.3", "GL Compatibility")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[editor]
|
||||
|
||||
version_control/plugin_name="GitPlugin"
|
||||
version_control/autoload_on_startup=true
|
||||
|
||||
[rendering]
|
||||
|
||||
renderer/rendering_method="gl_compatibility"
|
||||
renderer/rendering_method.mobile="gl_compatibility"
|
||||
Reference in New Issue
Block a user