Compare commits
3 Commits
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,7 +3,9 @@
|
||||
/android/
|
||||
.idea/
|
||||
*.csproj
|
||||
*.csproj*
|
||||
*.csproj.old
|
||||
*.csproj.old*
|
||||
*.sln
|
||||
*.sln.*
|
||||
.DS_Store
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "connect4-moderator-observer", "connect4-moderator-observer.csproj", "{88C189D2-5C9A-411D-8713-291AC0841D8C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
ExportDebug|Any CPU = ExportDebug|Any CPU
|
||||
ExportRelease|Any CPU = ExportRelease|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{88C189D2-5C9A-411D-8713-291AC0841D8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{88C189D2-5C9A-411D-8713-291AC0841D8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{88C189D2-5C9A-411D-8713-291AC0841D8C}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||
{88C189D2-5C9A-411D-8713-291AC0841D8C}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||
{88C189D2-5C9A-411D-8713-291AC0841D8C}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||
{88C189D2-5C9A-411D-8713-291AC0841D8C}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -3,7 +3,7 @@
|
||||
name="macOS"
|
||||
platform="macOS"
|
||||
runnable=true
|
||||
advanced_options=false
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
@@ -26,13 +26,13 @@ custom_template/debug=""
|
||||
custom_template/release=""
|
||||
debug/export_console_wrapper=0
|
||||
application/icon="uid://dd7lvnidxr5ss"
|
||||
application/icon_interpolation=4
|
||||
application/icon_interpolation=0
|
||||
application/bundle_identifier="com.abunchofknowitalls.connect4"
|
||||
application/signature=""
|
||||
application/app_category="Games"
|
||||
application/short_version=""
|
||||
application/version=""
|
||||
application/copyright="RPI Minds & Machines"
|
||||
application/copyright="RPI Minds and Machines"
|
||||
application/copyright_localized={}
|
||||
application/min_macos_version_x86_64="10.12"
|
||||
application/min_macos_version_arm64="11.00"
|
||||
@@ -49,7 +49,7 @@ xcode/xcode_build="14C18"
|
||||
codesign/codesign=3
|
||||
codesign/installer_identity=""
|
||||
codesign/apple_team_id="8S7C654DQ4"
|
||||
codesign/identity="Developer ID Application: Joshua Higgins (8S7C654DQ4)"
|
||||
codesign/identity="73BA692FE950ABC209210ACAA8AD412BD9C6C4A3"
|
||||
codesign/entitlements/custom_file=""
|
||||
codesign/entitlements/allow_jit_code_execution=false
|
||||
codesign/entitlements/allow_unsigned_executable_memory=false
|
||||
|
||||
BIN
icon.icon/Assets/icon.png
Normal file
BIN
icon.icon/Assets/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
40
icon.icon/Assets/icon.png.import
Normal file
40
icon.icon/Assets/icon.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dbn4ae2a7ao0t"
|
||||
path="res://.godot/imported/icon.png-d1b269abce4c61d818c5589654ffbcc2.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.icon/Assets/icon.png"
|
||||
dest_files=["res://.godot/imported/icon.png-d1b269abce4c61d818c5589654ffbcc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
37
icon.icon/icon.json
Normal file
37
icon.icon/icon.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"fill" : {
|
||||
"automatic-gradient" : "extended-srgb:0.00000,0.53333,1.00000,1.00000"
|
||||
},
|
||||
"groups" : [
|
||||
{
|
||||
"layers" : [
|
||||
{
|
||||
"glass" : true,
|
||||
"image-name" : "icon.png",
|
||||
"name" : "icon",
|
||||
"position" : {
|
||||
"scale" : 0.2,
|
||||
"translation-in-points" : [
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"shadow" : {
|
||||
"kind" : "neutral",
|
||||
"opacity" : 0.5
|
||||
},
|
||||
"translucency" : {
|
||||
"enabled" : true,
|
||||
"value" : 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"supported-platforms" : {
|
||||
"circles" : [
|
||||
"watchOS"
|
||||
],
|
||||
"squares" : "shared"
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,8 @@ config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Connect4 Moderator - Observer"
|
||||
config/version="0.1.2"
|
||||
config/name="Connect4 Observer"
|
||||
config/version="0.1.3"
|
||||
run/main_scene="uid://dcx5nvs0pa7me"
|
||||
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
|
||||
boot_splash/image="uid://dd7lvnidxr5ss"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://m542qwlp7hl7"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://m542qwlp7hl7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dg5jt0o0r0v3r" path="res://scripts/BoardScreen.cs" id="1_b3w8x"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlx02qat7j6lf" path="res://assets/sprites/AssetTileset.png" id="3_1tlhv"]
|
||||
[ext_resource type="FontFile" uid="uid://c3jmev24lo6ci" path="res://assets/fonts/PixelOperator8.ttf" id="3_rjcmr"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckmfi0cjgxgyk" path="res://assets/sprites/RedChip.png" id="4_1hrcj"]
|
||||
[ext_resource type="Texture2D" uid="uid://qy30emdgrk7o" path="res://assets/sprites/YellowChip.png" id="5_i2o8i"]
|
||||
[ext_resource type="Script" uid="uid://cwfg17tdbk44b" path="res://scripts/thinking.gd" id="5_wjs8a"]
|
||||
[ext_resource type="Texture2D" uid="uid://8un28mol7qow" path="res://assets/sprites/BoardTileMap.png" id="6_i2o8i"]
|
||||
[ext_resource type="PackedScene" uid="uid://pdean68jjg80" path="res://scenes/button_small.tscn" id="7_glh1q"]
|
||||
[ext_resource type="Script" uid="uid://b3q4gq63qmx23" path="res://scripts/BackButton.cs" id="8_u1oi2"]
|
||||
@@ -116,10 +117,10 @@ offset_left = -529.0
|
||||
offset_top = -292.0
|
||||
offset_right = -427.0
|
||||
offset_bottom = -284.0
|
||||
theme_override_colors/font_color = Color(1, 0, 0, 1)
|
||||
theme_override_fonts/font = ExtResource("3_rjcmr")
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = "NOT READY"
|
||||
text = "THINKING"
|
||||
script = ExtResource("5_wjs8a")
|
||||
|
||||
[node name="Player2Card" type="Node2D" parent="."]
|
||||
position = Vector2(989, -64)
|
||||
@@ -163,10 +164,10 @@ offset_left = -530.0
|
||||
offset_top = -220.0
|
||||
offset_right = -428.0
|
||||
offset_bottom = -212.0
|
||||
theme_override_colors/font_color = Color(1, 0, 0, 1)
|
||||
theme_override_fonts/font = ExtResource("3_rjcmr")
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = "NOT READY"
|
||||
text = "THINKING"
|
||||
script = ExtResource("5_wjs8a")
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
position = Vector2(39, 200)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public partial class BoardScreen : Node2D {
|
||||
|
||||
@@ -43,6 +44,22 @@ public partial class BoardScreen : Node2D {
|
||||
matchData = Connection.Instance.CurrentObservingMatch;
|
||||
player1Card.GetNode<Label>("Name").Text = matchData.player1;
|
||||
player2Card.GetNode<Label>("Name").Text = matchData.player2;
|
||||
|
||||
if (Connection.Instance.PreviousMoves.Count == 0)
|
||||
{
|
||||
player1Card.GetNode<Label>("Status").Show();
|
||||
player2Card.GetNode<Label>("Status").Hide();
|
||||
}
|
||||
else if (Connection.Instance.PreviousMoves.Last().Item1 == matchData.player1)
|
||||
{
|
||||
player1Card.GetNode<Label>("Status").Hide();
|
||||
player2Card.GetNode<Label>("Status").Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
player1Card.GetNode<Label>("Status").Show();
|
||||
player2Card.GetNode<Label>("Status").Hide();
|
||||
}
|
||||
|
||||
Connection.Instance.OnObserveWin += ObserveWin;
|
||||
Connection.Instance.OnObserveDraw += ObserveDraw;
|
||||
@@ -85,6 +102,17 @@ public partial class BoardScreen : Node2D {
|
||||
|
||||
private void ObserveMove(string username, int column)
|
||||
{
|
||||
GD.Print(username);
|
||||
if (username == matchData.player1)
|
||||
{
|
||||
player1Card.GetNode<Label>("Status").Hide();
|
||||
player2Card.GetNode<Label>("Status").Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
player1Card.GetNode<Label>("Status").Show();
|
||||
player2Card.GetNode<Label>("Status").Hide();
|
||||
}
|
||||
Connection.Instance.PreviousMoves.Add((username, column));
|
||||
}
|
||||
|
||||
|
||||
10
scripts/thinking.gd
Normal file
10
scripts/thinking.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends Label
|
||||
|
||||
@export var hue = 0.0
|
||||
|
||||
func _process(delta):
|
||||
modulate = Color.from_hsv(hue, 1.0, 1.0, 1.0)
|
||||
if hue < 1.0:
|
||||
hue += 0.1 * delta
|
||||
else:
|
||||
hue = 0.0
|
||||
1
scripts/thinking.gd.uid
Normal file
1
scripts/thinking.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cwfg17tdbk44b
|
||||
Reference in New Issue
Block a user