Skip to content

Commit 56ae001

Browse files
committed
trasnfer repo
1 parent a071b80 commit 56ae001

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1045
-0
lines changed

Art/tile_0000.png

232 Bytes
Loading

Art/tile_0000.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/tile_0000.png-b8fdc85014ab6543045a3b430c38e4ed.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://demo/chat_demo/Art/tile_0000.png"
13+
dest_files=[ "res://.import/tile_0000.png-b8fdc85014ab6543045a3b430c38e4ed.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

Art/tile_0001.png

203 Bytes
Loading

Art/tile_0001.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/tile_0001.png-6d121f0fa1651eabbb6e3ef8d02350a0.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://demo/chat_demo/Art/tile_0001.png"
13+
dest_files=[ "res://.import/tile_0001.png-6d121f0fa1651eabbb6e3ef8d02350a0.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

Art/tile_0002.png

233 Bytes
Loading

Art/tile_0002.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/tile_0002.png-d5bd19dde665e3b8f4ffc3cc29aefc8d.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://demo/chat_demo/Art/tile_0002.png"
13+
dest_files=[ "res://.import/tile_0002.png-d5bd19dde665e3b8f4ffc3cc29aefc8d.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

Art/tile_0003.png

235 Bytes
Loading

Art/tile_0003.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/tile_0003.png-76cea244d78c9cf3ac0276a7e82989c9.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://demo/chat_demo/Art/tile_0003.png"
13+
dest_files=[ "res://.import/tile_0003.png-76cea244d78c9cf3ac0276a7e82989c9.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

Art/tile_0004.png

236 Bytes
Loading

Art/tile_0004.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/tile_0004.png-582ac613944e16df0799e807c884eef4.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://demo/chat_demo/Art/tile_0004.png"
13+
dest_files=[ "res://.import/tile_0004.png-582ac613944e16df0799e807c884eef4.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

Art/tile_0005.png

196 Bytes
Loading

Art/tile_0005.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/tile_0005.png-bb49f644e7fed575ee112382e95f9e92.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://demo/chat_demo/Art/tile_0005.png"
13+
dest_files=[ "res://.import/tile_0005.png-bb49f644e7fed575ee112382e95f9e92.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

Art/tile_0006.png

196 Bytes
Loading

Art/tile_0006.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/tile_0006.png-7b159f4824023cde48d0f74ee5f5a814.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://demo/chat_demo/Art/tile_0006.png"
13+
dest_files=[ "res://.import/tile_0006.png-7b159f4824023cde48d0f74ee5f5a814.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

Art/tile_0007.png

250 Bytes
Loading

Art/tile_0007.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/tile_0007.png-c7b634c93beabae0e2344b9b04e1e614.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://demo/chat_demo/Art/tile_0007.png"
13+
dest_files=[ "res://.import/tile_0007.png-c7b634c93beabae0e2344b9b04e1e614.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

Big_Bottom_Typeface_Normal.ttf

353 KB
Binary file not shown.

Chat.gd

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
extends VBoxContainer
2+
3+
signal chat_added
4+
5+
var chatbox = load("res://ChatBox.tscn")
6+
7+
var listener
8+
9+
func _ready():
10+
Firebase.Auth.connect("login_succeeded", self, "on_login_success")
11+
12+
func on_login_success(auth_ref):
13+
listener = Firebase.Database.get_database_reference("game/chat", { })
14+
listener.connect("patch_data_update", self, "on_received_updated_chat")
15+
listener.connect("new_data_update", self, "on_received_new_chat")
16+
17+
func add_chat(name : String, text : String):
18+
var new_chat = chatbox.instance()
19+
new_chat.user_name = name + ": "
20+
new_chat.text = text
21+
add_child(new_chat)
22+
emit_signal("chat_added")
23+
24+
func on_received_chat(data):
25+
if data.data:
26+
for key in data.data.keys():
27+
var chat = data.data[key]
28+
add_chat(chat.data.user_name, chat.data.text)
29+
30+
func on_received_new_chat(data):
31+
if data.data:
32+
add_chat(data.data.user_name, data.data.text)
33+
34+
func on_received_updated_chat(data):
35+
if data.data:
36+
add_chat(data.data.user_name, data.data.text)

ChatBox.gd

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
extends HSplitContainer
2+
3+
func set_item(item):
4+
$UserName.text = item.user_name + ": "
5+
$Text.text = item.text

ChatBox.tscn

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[gd_scene load_steps=2 format=2]
2+
3+
[ext_resource path="res://ChatBox.gd" type="Script" id=1]
4+
5+
[node name="ChatBox" type="HSplitContainer"]
6+
anchor_right = 1.0
7+
margin_right = 224.0
8+
margin_bottom = 82.0
9+
rect_min_size = Vector2( 1024, 82 )
10+
size_flags_horizontal = 2
11+
dragger_visibility = 2
12+
script = ExtResource( 1 )
13+
14+
[node name="UserName" type="Label" parent="."]
15+
margin_right = 88.0
16+
margin_bottom = 44.0
17+
grow_horizontal = 0
18+
grow_vertical = 0
19+
rect_min_size = Vector2( 88, 44 )
20+
size_flags_horizontal = 2
21+
size_flags_vertical = 2
22+
text = "Justinian:"
23+
valign = 1
24+
25+
[node name="Text" type="LineEdit" parent="."]
26+
margin_left = 424.0
27+
margin_right = 1024.0
28+
margin_bottom = 44.0
29+
rect_min_size = Vector2( 600, 44 )
30+
size_flags_horizontal = 2
31+
size_flags_vertical = 2
32+
text = "Hey, how's it going?
33+
"
34+
35+
[connection signal="text_entered" from="Text" to="." method="_on_Text_text_entered"]

ChatContainer.gd

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
extends "res://addons/godot-firebase/containers/container.gd"
2+
3+
signal chat_added
4+
5+
func on_item_added(item, key, template):
6+
emit_signal("chat_added")

ChatControl.gd

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
extends Control
2+
3+
var auth : Dictionary = {}
4+
var firebase_reference
5+
var firebase_storage : FirebaseStorage
6+
7+
func _ready():
8+
Firebase.Auth.connect("login_succeeded", self, "login_success")
9+
$VBoxContainer/ScrollContainer/Chat.connect("chat_added", self, "on_chat_added")
10+
11+
pass
12+
13+
func login_success(auth_result):
14+
auth = auth_result
15+
firebase_reference = Firebase.Database.get_database_reference("game/chat", {})
16+
show()
17+
18+
var current_file
19+
20+
func _on_SubmitButton_pressed():
21+
if Firebase.Auth.auth:
22+
var text = $VBoxContainer/SubmitText.text
23+
var user_name = Firebase.Auth.auth.email
24+
$VBoxContainer/SubmitText.text = ""
25+
firebase_reference.push({"user_name": user_name, "text": text})
26+
27+
func on_chat_added():
28+
$Tween.interpolate_property($VBoxContainer/ScrollContainer, "scroll_vertical", $VBoxContainer/ScrollContainer.scroll_vertical, $VBoxContainer/ScrollContainer.scroll_vertical + $VBoxContainer.rect_size.y, 1, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
29+
$Tween.start()

0 commit comments

Comments
 (0)