first commit
This commit is contained in:
4
.editorconfig
Normal file
4
.editorconfig
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Normalize EOL for all files that Git considers text files.
|
||||||
|
* text=auto eol=lf
|
||||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Godot 4+ specific ignores
|
||||||
|
.godot/
|
||||||
|
/android/
|
||||||
BIN
Art/Tic-tac-toe.png
Normal file
BIN
Art/Tic-tac-toe.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
34
Art/Tic-tac-toe.png.import
Normal file
34
Art/Tic-tac-toe.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cbi83mc26qju5"
|
||||||
|
path="res://.godot/imported/Tic-tac-toe.png-124c283de8ae3fec6b00fa460f45b890.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/Tic-tac-toe.png"
|
||||||
|
dest_files=["res://.godot/imported/Tic-tac-toe.png-124c283de8ae3fec6b00fa460f45b890.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
|
||||||
BIN
Art/blanksquare.jpg
Normal file
BIN
Art/blanksquare.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 317 B |
34
Art/blanksquare.jpg.import
Normal file
34
Art/blanksquare.jpg.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://g6ikqlh8yccy"
|
||||||
|
path="res://.godot/imported/blanksquare.jpg-074e223996abdade08f7c7e2077f162b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/blanksquare.jpg"
|
||||||
|
dest_files=["res://.godot/imported/blanksquare.jpg-074e223996abdade08f7c7e2077f162b.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
|
||||||
2
Art/capsule-fill.svg
Normal file
2
Art/capsule-fill.svg
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 56 56" xmlns="http://www.w3.org/2000/svg"><path d="M 0 29.1449 C 0 41.5941 8.6930 49.9436 21.9149 49.9436 L 34.0636 49.9436 C 47.2857 49.9436 56 41.5941 56 29.1449 C 56 16.6957 47.2857 8.3461 34.0636 8.3461 L 21.9149 8.3461 C 8.6930 8.3461 0 16.6957 0 29.1449 Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 451 B |
37
Art/capsule-fill.svg.import
Normal file
37
Art/capsule-fill.svg.import
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://4hculjnuw6ha"
|
||||||
|
path="res://.godot/imported/capsule-fill.svg-687ac6d9d63ced250c1ffed0514dfe5a.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/capsule-fill.svg"
|
||||||
|
dest_files=["res://.godot/imported/capsule-fill.svg-687ac6d9d63ced250c1ffed0514dfe5a.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
|
||||||
34
Art/o.png.import
Normal file
34
Art/o.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c66iv1bte8b4e"
|
||||||
|
path="res://.godot/imported/o.png-afa2cd026f8e3ea6ed9073b821f7348f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/o.png"
|
||||||
|
dest_files=["res://.godot/imported/o.png-afa2cd026f8e3ea6ed9073b821f7348f.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
|
||||||
BIN
Art/phone.png
Normal file
BIN
Art/phone.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
34
Art/phone.png.import
Normal file
34
Art/phone.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://buee5y051op2"
|
||||||
|
path="res://.godot/imported/phone.png-4c40ee9da2ebfbc855946257b18d24f6.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/phone.png"
|
||||||
|
dest_files=["res://.godot/imported/phone.png-4c40ee9da2ebfbc855946257b18d24f6.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
|
||||||
34
Art/x.png.import
Normal file
34
Art/x.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c51oi06i4yrvv"
|
||||||
|
path="res://.godot/imported/x.png-b81db823f0c10cab833de01227d2dba8.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/x.png"
|
||||||
|
dest_files=["res://.godot/imported/x.png-b81db823f0c10cab833de01227d2dba8.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
|
||||||
40
Gameplay/Actor.cs
Normal file
40
Gameplay/Actor.cs
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
|
||||||
|
public partial class Actor : Sprite2D
|
||||||
|
{
|
||||||
|
public Sprite2D _markNormal, _markPressed, _markHovered, _markDisabled, _markFocused;
|
||||||
|
public Goal _goal;
|
||||||
|
public Board _board;
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
_markNormal = GetNode<Sprite2D>("MarkNormal");
|
||||||
|
_markPressed = GetNode<Sprite2D>("MarkPressed");
|
||||||
|
_markHovered = GetNode<Sprite2D>("MarkHovered");
|
||||||
|
_markDisabled = GetNode<Sprite2D>("MarkDisabled");
|
||||||
|
_markFocused = GetNode<Sprite2D>("MarkFocused");
|
||||||
|
}
|
||||||
|
|
||||||
|
// public List<List<int>> CheckGoals()
|
||||||
|
// {
|
||||||
|
// List<Cell> ownedCells = _board._cells.Where<Cell>(c=>c._marker == this).ToList();
|
||||||
|
// List<int> ownedCellAddresses = ownedCells.Select(c=>c._address).ToList();
|
||||||
|
// string ownedCellAddressesString = string.Join("",ownedCellAddresses);
|
||||||
|
|
||||||
|
// List<List<int>> goalsMet = new();
|
||||||
|
// for (int i = 0; i < _goal._eligibleGoals.Count; i++)
|
||||||
|
// {
|
||||||
|
// Goal.GoalName goalName = _goal._eligibleGoals[i];
|
||||||
|
// List<int> goal = _goal._conditions[goalName];
|
||||||
|
// if (goal.All(n=>ownedCellAddresses.Contains(n)))
|
||||||
|
// {
|
||||||
|
// goalsMet.Add(goal);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return goalsMet;
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
1
Gameplay/Actor.cs.uid
Normal file
1
Gameplay/Actor.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bfmn75cttwhto
|
||||||
112
Gameplay/Board.cs
Normal file
112
Gameplay/Board.cs
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
|
public partial class Board : Sprite2D
|
||||||
|
{
|
||||||
|
public bool _active = false, _moveMade = false, _won = false;
|
||||||
|
public List<Cell> _cells = new();
|
||||||
|
public Enemy _owner;
|
||||||
|
public Actor _winner = null;
|
||||||
|
public GoalName _winningPattern;
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
_cells = GetChildren().Where(c=>c is Cell).Cast<Cell>().ToList();
|
||||||
|
for (int i = 0; i < _cells.Count; i++)
|
||||||
|
{
|
||||||
|
_cells[i]._address = i+1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override void _Process(double DELTA_)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Activate()
|
||||||
|
{
|
||||||
|
Disable(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Actor CheckForWinner()
|
||||||
|
{
|
||||||
|
// List<List<int>> playerGoalsMet = _owner._playerOpponent.CheckGoals();
|
||||||
|
// List<List<int>> ownerGoalsMet = _owner.CheckGoals();
|
||||||
|
// _winner = playerGoalsMet.Count>0 ? _owner._playerOpponent : ownerGoalsMet.Count>0 ? _owner : null;
|
||||||
|
// _won = _winner != null;
|
||||||
|
|
||||||
|
return _winner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClaimOwnership(Enemy OWNER)
|
||||||
|
{
|
||||||
|
_owner = OWNER;
|
||||||
|
_cells.ForEach(c=>c._owner = OWNER);
|
||||||
|
_cells.ForEach(c=>c._board = this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClearBoard(){
|
||||||
|
foreach (Cell cell in _cells)
|
||||||
|
{
|
||||||
|
cell.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Deactivate()
|
||||||
|
{
|
||||||
|
Disable(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cell GetCellByTenant(Enemy TENANT)
|
||||||
|
{
|
||||||
|
return _cells.Single(c=>c._tenant == TENANT);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cell GetCellByAddress(int ADDRESS)
|
||||||
|
{
|
||||||
|
return _cells.Single(c=>c._address == ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Cell> GetCellsByOwner(Player PLAYER)
|
||||||
|
{
|
||||||
|
return _cells.Where(c=>c._marker == PLAYER).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
//THIS SHOULD BE MOVED INTO ACTION LOGIC
|
||||||
|
// public void RotateBoard(int DEGREES, int REPEAT)
|
||||||
|
// {
|
||||||
|
// for (int i = 0; i < REPEAT; i++)
|
||||||
|
// {
|
||||||
|
// Rotation += DEGREES * ((float)Math.PI / 180);
|
||||||
|
// RenumberCells();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
public void RenumberCells()
|
||||||
|
{
|
||||||
|
_cells.OrderBy(c => c.Position.X).ThenBy(c => c.Position.Y).ToList();
|
||||||
|
for (int i = 0; i < _cells.Count; i++)
|
||||||
|
{
|
||||||
|
Cell cell = _cells[i];
|
||||||
|
cell._address = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
ClearBoard();
|
||||||
|
// _player._isTurn = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Disable(bool DISABLED)
|
||||||
|
{
|
||||||
|
_active = !DISABLED;
|
||||||
|
Visible = !DISABLED;
|
||||||
|
SetProcess(!DISABLED);
|
||||||
|
_cells.ForEach(c=>c.Disable(DISABLED));
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Board.cs.uid
Normal file
1
Gameplay/Board.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://decakbqo4jfdi
|
||||||
34
Gameplay/Boss.cs
Normal file
34
Gameplay/Boss.cs
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
public partial class Boss : Enemy
|
||||||
|
{
|
||||||
|
public List<Dragon> _dragons;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
base._Ready();
|
||||||
|
_number = 1;
|
||||||
|
_dragons = GetChildren().Where(c=>c is Dragon).Cast<Dragon>().ToList();
|
||||||
|
for (int i = 0; i < _dragons.Count; i++)
|
||||||
|
{
|
||||||
|
_dragons[i]._owner = this;
|
||||||
|
_dragons[i]._number = _board._cells[i]._address;
|
||||||
|
_board._cells[i]._tenant = _dragons[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void PassPlayer(Player PLAYER)
|
||||||
|
{
|
||||||
|
base.PassPlayer(PLAYER);
|
||||||
|
_dragons.ForEach(d=>d.PassPlayer(PLAYER));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ClickCell(Cell CLICKEDCELL)
|
||||||
|
{
|
||||||
|
_playerOpponent.Challenge(CLICKEDCELL._tenant);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
Gameplay/Boss.cs.uid
Normal file
1
Gameplay/Boss.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://d3e55f3sbmjfm
|
||||||
47
Gameplay/BusinessCard.cs
Normal file
47
Gameplay/BusinessCard.cs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
public partial class BusinessCard : TextureButton
|
||||||
|
{
|
||||||
|
public Player _player;
|
||||||
|
public Goal _goal;
|
||||||
|
public GoalName _goalName;
|
||||||
|
public bool _goalMet = false;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
base._Ready();
|
||||||
|
_goal = GetNode<Goal>("Goal");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _Pressed()
|
||||||
|
{
|
||||||
|
base._Pressed();
|
||||||
|
GD.Print("Pressed");
|
||||||
|
_player._activeEnemy.Defeat(_goalName);
|
||||||
|
_player.Challenge(_player._activeEnemy._owner._board._owner);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AssignGoal(GoalName GOALNAME)
|
||||||
|
{
|
||||||
|
_goalName = GOALNAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CheckGoal()
|
||||||
|
{
|
||||||
|
List<Cell> ownedCells = _player._board.GetCellsByOwner(_player);
|
||||||
|
List<int> addresses = _goal.GetAddresses(_goalName);
|
||||||
|
_goalMet = addresses.All(a=>ownedCells.Select(c=>c._address).ToList().IndexOf(a)>-1);
|
||||||
|
GD.Print(_goalMet);
|
||||||
|
Disabled = !_goalMet;
|
||||||
|
GD.Print(Disabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PassPlayer(Player PLAYER)
|
||||||
|
{
|
||||||
|
_player = PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
Gameplay/BusinessCard.cs.uid
Normal file
1
Gameplay/BusinessCard.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dtcalmvwievft
|
||||||
53
Gameplay/Cell.cs
Normal file
53
Gameplay/Cell.cs
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
public partial class Cell : TextureButton
|
||||||
|
{
|
||||||
|
public bool _isHovered = false, _isPressed = false, _isDisabled = false, _isFocused = false, _locked = false, _destroyed = false;
|
||||||
|
public int _address;
|
||||||
|
public Enemy _owner, _tenant;
|
||||||
|
public Actor _marker;
|
||||||
|
public Sprite2D _defaultMark;
|
||||||
|
public Board _board;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
_defaultMark = GetNode<Sprite2D>("DefaultMark");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _Pressed()
|
||||||
|
{
|
||||||
|
base._Pressed();
|
||||||
|
// GD.Print(_tenant.GetType().ToString() + " " + _tenant._number + " Pressed");
|
||||||
|
// GD.Print(_board._owner.GetType().ToString() + " " + _board._owner._number + " Pressed");
|
||||||
|
_owner.ClickCell(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _Process(double DELTA)
|
||||||
|
{
|
||||||
|
base._Process(DELTA);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Disable(bool DISABLED)
|
||||||
|
{
|
||||||
|
SetProcess(!DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Mark(Actor MARKER)
|
||||||
|
{
|
||||||
|
_marker = MARKER;
|
||||||
|
TextureNormal = MARKER._markNormal.Texture;
|
||||||
|
TexturePressed = MARKER._markPressed.Texture;
|
||||||
|
TextureHover = MARKER._markHovered.Texture;
|
||||||
|
TextureDisabled = MARKER._markDisabled.Texture;
|
||||||
|
TextureFocused = MARKER._markFocused.Texture;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Clear()
|
||||||
|
{
|
||||||
|
_marker = null;
|
||||||
|
TextureNormal = TexturePressed = TextureHover = TextureDisabled = TextureFocused = _defaultMark.Texture;
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Cell.cs.uid
Normal file
1
Gameplay/Cell.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://pg7mpir3ewhw
|
||||||
23
Gameplay/Contact.cs
Normal file
23
Gameplay/Contact.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public partial class Contact : Sprite2D
|
||||||
|
{
|
||||||
|
public Player _player;
|
||||||
|
public int _number;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PassNumber(int NUMBER)
|
||||||
|
{
|
||||||
|
_number = NUMBER;
|
||||||
|
}
|
||||||
|
public void PassPlayer(Player PLAYER)
|
||||||
|
{
|
||||||
|
_player = PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
Gameplay/Contact.cs.uid
Normal file
1
Gameplay/Contact.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bgj2cuqdq0b6l
|
||||||
42
Gameplay/Dragon.cs
Normal file
42
Gameplay/Dragon.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
public partial class Dragon : Enemy
|
||||||
|
{
|
||||||
|
// public int _number;
|
||||||
|
// public Board _board;
|
||||||
|
public List<Mook> _mooks;
|
||||||
|
// public Player _playerOpponent;
|
||||||
|
// public Cell _cell;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
base._Ready();
|
||||||
|
_mooks = GetChildren().Where(c=>c is Mook).Cast<Mook>().ToList();
|
||||||
|
for (int i = 0; i < _mooks.Count; i++)
|
||||||
|
{
|
||||||
|
_mooks[i]._owner = this;
|
||||||
|
_mooks[i]._number = _board._cells[i]._address;
|
||||||
|
_board._cells[i]._tenant = _mooks[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Challenge()
|
||||||
|
{
|
||||||
|
_playerOpponent.Challenge(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void PassPlayer(Player PLAYER)
|
||||||
|
{
|
||||||
|
base.PassPlayer(PLAYER);
|
||||||
|
_mooks.ForEach(m=>m.PassPlayer(PLAYER));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ClickCell(Cell CLICKEDCELL)
|
||||||
|
{
|
||||||
|
_playerOpponent.Challenge(CLICKEDCELL._tenant);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Dragon.cs.uid
Normal file
1
Gameplay/Dragon.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://ctsffebttempt
|
||||||
40
Gameplay/Enemy.cs
Normal file
40
Gameplay/Enemy.cs
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public partial class Enemy : Actor
|
||||||
|
{
|
||||||
|
public int _number;
|
||||||
|
public Player _playerOpponent;
|
||||||
|
public Cell _cell;
|
||||||
|
public Enemy _owner;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
base._Ready();
|
||||||
|
_board = GetNode<Board>("Board");
|
||||||
|
_board.ClaimOwnership(this);
|
||||||
|
_board.Disable(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void PassPlayer(Player PLAYER)
|
||||||
|
{
|
||||||
|
_playerOpponent = PLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void ClickCell(Cell CLICKEDCELL)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Defeat(GoalName WINNINGPATTERN)
|
||||||
|
{
|
||||||
|
_board._winningPattern = WINNINGPATTERN;
|
||||||
|
_owner._board.GetCellByTenant(this).Mark(_playerOpponent);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Victory(GoalName WINNINGPATTERN)
|
||||||
|
{
|
||||||
|
_board._winningPattern = WINNINGPATTERN;
|
||||||
|
_owner._board.GetCellByTenant(this).Mark(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Enemy.cs.uid
Normal file
1
Gameplay/Enemy.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://ctxj1kcqu8v78
|
||||||
71
Gameplay/Goal.cs
Normal file
71
Gameplay/Goal.cs
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
public partial class Goal : Node
|
||||||
|
{
|
||||||
|
public Dictionary<GoalName, List<int>> _conditions = new()
|
||||||
|
{
|
||||||
|
{GoalName.TopRow, new (){1,2,3}},
|
||||||
|
{GoalName.MiddleRow, new (){4,5,6}},
|
||||||
|
{GoalName.BottomRow, new (){7,8,9}},
|
||||||
|
{GoalName.LeftColumn, new (){1,4,7}},
|
||||||
|
{GoalName.MiddleColumn, new (){2,5,8}},
|
||||||
|
{GoalName.RightColumn, new (){3,6,9}},
|
||||||
|
{GoalName.ForwardDiagonal, new (){3,5,7}},
|
||||||
|
{GoalName.BackwardDiagonal, new (){1,5,9}},
|
||||||
|
{GoalName.Number1, new (){1,2,5,7,8,9}},
|
||||||
|
{GoalName.Number2, new (){1,2,4,5,8,9}},
|
||||||
|
{GoalName.Number3, new (){1,2,5,6,7,8}},
|
||||||
|
{GoalName.Number4, new (){1,3,4,5,6,9}},
|
||||||
|
{GoalName.Number5, new (){2,3,4,5,7,8}},
|
||||||
|
{GoalName.Number6, new (){1,4,5,6,7,8,9}},
|
||||||
|
{GoalName.Number7, new (){1,2,3,6,9}},
|
||||||
|
{GoalName.Number8, new (){2,3,4,5,6,7,8}},
|
||||||
|
{GoalName.Number9, new (){1,2,3,4,5,6,8,9}},
|
||||||
|
{GoalName.Number0, new (){2,3,4,6,7,8}},
|
||||||
|
{GoalName.LetterA, new (){2,4,5,6,7,9}},
|
||||||
|
{GoalName.LetterB, new (){1,2,4,5,6,7,8,9}},
|
||||||
|
{GoalName.LetterC, new (){1,2,3,4,7,8,9}},
|
||||||
|
{GoalName.LetterD, new (){1,2,4,6,7,8}},
|
||||||
|
{GoalName.LetterE, new (){1,2,3,4,5,7,8,9}},
|
||||||
|
{GoalName.LetterF, new (){1,2,3,4,5,7}},
|
||||||
|
{GoalName.LetterG, new (){1,2,4,6,7,8,9}},
|
||||||
|
{GoalName.LetterH, new (){1,3,4,5,6,7,9}},
|
||||||
|
{GoalName.LetterI, new (){1,2,3,5,7,8,9}},
|
||||||
|
{GoalName.LetterJ, new (){1,2,3,5,7,8}},
|
||||||
|
{GoalName.LetterK, new (){1,3,4,5,7,9}},
|
||||||
|
{GoalName.LetterL, new (){3,5,7,8,9}},
|
||||||
|
{GoalName.LetterM, new (){1,2,3,4,5,6,7,9}},
|
||||||
|
{GoalName.LetterN, new (){1,2,3,4,6,7,9}},
|
||||||
|
{GoalName.LetterO, new (){1,2,3,4,6,7,8,9}},
|
||||||
|
{GoalName.LetterP, new (){1,2,3,4,5,6,7}},
|
||||||
|
{GoalName.LetterQ, new (){1,2,3,4,6,7,8}},
|
||||||
|
{GoalName.LetterR, new (){1,2,3,4,5,7,9}},
|
||||||
|
{GoalName.LetterS, new (){2,3,5,7,8}},
|
||||||
|
{GoalName.LetterT, new (){1,2,3,5,8}},
|
||||||
|
{GoalName.LetterU, new (){1,3,4,6,7,8,9}},
|
||||||
|
{GoalName.LetterV, new (){1,3,4,6,8}},
|
||||||
|
{GoalName.LetterW, new (){1,3,4,5,6,7,8,9}},
|
||||||
|
{GoalName.LetterX, new (){1,3,5,7,9}},
|
||||||
|
{GoalName.LetterY, new (){1,3,5,8}},
|
||||||
|
{GoalName.LetterZ, new (){1,2,5,8,9}},
|
||||||
|
{GoalName.LongRightAngleAt1, new (){1,2,3,4,7}},
|
||||||
|
{GoalName.LongRightAngleAt3, new (){1,2,3,6,9}},
|
||||||
|
{GoalName.LongRightAngleAt7, new (){1,4,7,8,9}},
|
||||||
|
{GoalName.LongRightAngleAt9, new (){3,6,7,8,9}},
|
||||||
|
{GoalName.ShortRightAngleAt1, new (){1,2,4}},
|
||||||
|
{GoalName.ShortRightAngleAt3, new (){2,3,6}},
|
||||||
|
{GoalName.ShortRightAngleAt7, new (){4,7,8}},
|
||||||
|
{GoalName.ShortRightAngleAt9, new (){6,8,9}},
|
||||||
|
{GoalName.Corners, new (){1,4,7,9}},
|
||||||
|
{GoalName.Diamond, new (){2,4,6,8}},
|
||||||
|
};
|
||||||
|
|
||||||
|
public List<int> GetAddresses(GoalName NAME)
|
||||||
|
{
|
||||||
|
return _conditions[NAME];
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Goal.cs.uid
Normal file
1
Gameplay/Goal.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://c08tnhx0minta
|
||||||
58
Gameplay/GoalName.cs
Normal file
58
Gameplay/GoalName.cs
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
public enum GoalName
|
||||||
|
{
|
||||||
|
TopRow,
|
||||||
|
MiddleRow,
|
||||||
|
BottomRow,
|
||||||
|
LeftColumn,
|
||||||
|
MiddleColumn,
|
||||||
|
RightColumn,
|
||||||
|
ForwardDiagonal,
|
||||||
|
BackwardDiagonal,
|
||||||
|
Number1,
|
||||||
|
Number2,
|
||||||
|
Number3,
|
||||||
|
Number4,
|
||||||
|
Number5,
|
||||||
|
Number6,
|
||||||
|
Number7,
|
||||||
|
Number8,
|
||||||
|
Number9,
|
||||||
|
Number0,
|
||||||
|
LetterA,
|
||||||
|
LetterB,
|
||||||
|
LetterC,
|
||||||
|
LetterD,
|
||||||
|
LetterE,
|
||||||
|
LetterF,
|
||||||
|
LetterG,
|
||||||
|
LetterH,
|
||||||
|
LetterI,
|
||||||
|
LetterJ,
|
||||||
|
LetterK,
|
||||||
|
LetterL,
|
||||||
|
LetterM,
|
||||||
|
LetterN,
|
||||||
|
LetterO,
|
||||||
|
LetterP,
|
||||||
|
LetterQ,
|
||||||
|
LetterR,
|
||||||
|
LetterS,
|
||||||
|
LetterT,
|
||||||
|
LetterU,
|
||||||
|
LetterV,
|
||||||
|
LetterW,
|
||||||
|
LetterX,
|
||||||
|
LetterY,
|
||||||
|
LetterZ,
|
||||||
|
LongRightAngleAt1,
|
||||||
|
LongRightAngleAt3,
|
||||||
|
LongRightAngleAt7,
|
||||||
|
LongRightAngleAt9,
|
||||||
|
ShortRightAngleAt1,
|
||||||
|
ShortRightAngleAt3,
|
||||||
|
ShortRightAngleAt7,
|
||||||
|
ShortRightAngleAt9,
|
||||||
|
Corners,
|
||||||
|
Diamond,
|
||||||
|
Plus
|
||||||
|
}
|
||||||
1
Gameplay/GoalName.cs.uid
Normal file
1
Gameplay/GoalName.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dmmb241f4ma6c
|
||||||
20
Gameplay/Mook.cs
Normal file
20
Gameplay/Mook.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
public partial class Mook : Enemy
|
||||||
|
{
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
base._Ready();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ClickCell(Cell CLICKEDCELL)
|
||||||
|
{
|
||||||
|
CLICKEDCELL.Mark(_playerOpponent);
|
||||||
|
_playerOpponent.CheckBusinessCards();
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Mook.cs.uid
Normal file
1
Gameplay/Mook.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://clatml6wkypfe
|
||||||
13
Gameplay/Opponent.cs
Normal file
13
Gameplay/Opponent.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
public partial class Opponent : Player
|
||||||
|
{
|
||||||
|
|
||||||
|
public void MakeMove()
|
||||||
|
{
|
||||||
|
// CREATE CODE TO MAKE ENEMY MOVES
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Opponent.cs.uid
Normal file
1
Gameplay/Opponent.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://631085nn2jpc
|
||||||
37
Gameplay/Phone.cs
Normal file
37
Gameplay/Phone.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
public partial class Phone : Sprite2D
|
||||||
|
{
|
||||||
|
public PhoneButton _hoveredButton;
|
||||||
|
public List<PhoneButton> _phoneButtons = new();
|
||||||
|
public Player _player;
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
_phoneButtons = GetChildren().Where(c=>c is PhoneButton).Cast<PhoneButton>().ToList();
|
||||||
|
for (int i = 0; i < _phoneButtons.Count; i++)
|
||||||
|
{
|
||||||
|
_phoneButtons[i]._phone = this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _Process(double DELTA_)
|
||||||
|
{
|
||||||
|
// _hoveredButton = _phoneButtons.FirstOrDefault(c => c._isHovered, null);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PassPlayer(Player PLAYER)
|
||||||
|
{
|
||||||
|
_player = PLAYER;
|
||||||
|
for (int i = 0; i < _phoneButtons.Count; i++)
|
||||||
|
{
|
||||||
|
_phoneButtons[i]._phone = this;
|
||||||
|
_phoneButtons[i]._contact.PassPlayer(PLAYER);
|
||||||
|
_phoneButtons[i]._contact.PassNumber((i+1)%10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Phone.cs.uid
Normal file
1
Gameplay/Phone.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dgmkhlit1vnf3
|
||||||
30
Gameplay/PhoneButton.cs
Normal file
30
Gameplay/PhoneButton.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public partial class PhoneButton : TextureButton
|
||||||
|
{
|
||||||
|
// [Signal]
|
||||||
|
// public delegate void HoverEventHandler(Cell THISCELL, bool ISHOVERED);
|
||||||
|
public bool _isHovered = false;
|
||||||
|
public Phone _phone;
|
||||||
|
public Contact _contact;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
base._Ready();
|
||||||
|
_contact = GetNode<Contact>("Contact");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// private void OnMouseEntered()
|
||||||
|
// {
|
||||||
|
// _isHovered = true;
|
||||||
|
// EmitSignal(SignalName.Hover, this, _isHovered);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// private void OnMouseExited()
|
||||||
|
// {
|
||||||
|
// _isHovered = false;
|
||||||
|
// EmitSignal(SignalName.Hover, this, _isHovered);
|
||||||
|
// }
|
||||||
|
}
|
||||||
1
Gameplay/PhoneButton.cs.uid
Normal file
1
Gameplay/PhoneButton.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cd1nniv27ef2f
|
||||||
27
Gameplay/actor.tscn
Normal file
27
Gameplay/actor.tscn
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://cxgydksjaasxt"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bfmn75cttwhto" path="res://Gameplay/Actor.cs" id="1_2b8tl"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c51oi06i4yrvv" path="res://Art/x.png" id="2_6kc7q"]
|
||||||
|
|
||||||
|
[node name="Actor" type="Sprite2D"]
|
||||||
|
script = ExtResource("1_2b8tl")
|
||||||
|
|
||||||
|
[node name="MarkNormal" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("2_6kc7q")
|
||||||
|
|
||||||
|
[node name="MarkPressed" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("2_6kc7q")
|
||||||
|
|
||||||
|
[node name="MarkHovered" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("2_6kc7q")
|
||||||
|
|
||||||
|
[node name="MarkDisabled" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("2_6kc7q")
|
||||||
|
|
||||||
|
[node name="MarkFocused" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("2_6kc7q")
|
||||||
63
Gameplay/board.tscn
Normal file
63
Gameplay/board.tscn
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://jkmo1fb2ohv4"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cbi83mc26qju5" path="res://Art/Tic-tac-toe.png" id="1_iqk8r"]
|
||||||
|
[ext_resource type="Script" uid="uid://decakbqo4jfdi" path="res://Gameplay/Board.cs" id="2_ucn0m"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://0vj01cjcpibt" path="res://Gameplay/cell.tscn" id="3_s74v7"]
|
||||||
|
|
||||||
|
[node name="Board" type="Sprite2D"]
|
||||||
|
texture = ExtResource("1_iqk8r")
|
||||||
|
script = ExtResource("2_ucn0m")
|
||||||
|
|
||||||
|
[node name="Cell1" parent="." instance=ExtResource("3_s74v7")]
|
||||||
|
offset_left = -300.0
|
||||||
|
offset_top = -301.0
|
||||||
|
offset_right = -100.0
|
||||||
|
offset_bottom = -101.0
|
||||||
|
|
||||||
|
[node name="Cell2" parent="." instance=ExtResource("3_s74v7")]
|
||||||
|
offset_left = -100.0
|
||||||
|
offset_top = -300.0
|
||||||
|
offset_right = 100.0
|
||||||
|
offset_bottom = -100.0
|
||||||
|
|
||||||
|
[node name="Cell3" parent="." instance=ExtResource("3_s74v7")]
|
||||||
|
offset_left = 100.0
|
||||||
|
offset_top = -300.0
|
||||||
|
offset_right = 300.0
|
||||||
|
offset_bottom = -100.0
|
||||||
|
|
||||||
|
[node name="Cell4" parent="." instance=ExtResource("3_s74v7")]
|
||||||
|
offset_left = -300.0
|
||||||
|
offset_top = -100.0
|
||||||
|
offset_right = -100.0
|
||||||
|
offset_bottom = 100.0
|
||||||
|
|
||||||
|
[node name="Cell5" parent="." instance=ExtResource("3_s74v7")]
|
||||||
|
offset_left = -100.0
|
||||||
|
offset_top = -100.0
|
||||||
|
offset_right = 100.0
|
||||||
|
offset_bottom = 100.0
|
||||||
|
|
||||||
|
[node name="Cell6" parent="." instance=ExtResource("3_s74v7")]
|
||||||
|
offset_left = 100.0
|
||||||
|
offset_top = -100.0
|
||||||
|
offset_right = 300.0
|
||||||
|
offset_bottom = 100.0
|
||||||
|
|
||||||
|
[node name="Cell7" parent="." instance=ExtResource("3_s74v7")]
|
||||||
|
offset_left = -300.0
|
||||||
|
offset_top = 100.0
|
||||||
|
offset_right = -100.0
|
||||||
|
offset_bottom = 300.0
|
||||||
|
|
||||||
|
[node name="Cell8" parent="." instance=ExtResource("3_s74v7")]
|
||||||
|
offset_left = -100.0
|
||||||
|
offset_top = 100.0
|
||||||
|
offset_right = 100.0
|
||||||
|
offset_bottom = 300.0
|
||||||
|
|
||||||
|
[node name="Cell9" parent="." instance=ExtResource("3_s74v7")]
|
||||||
|
offset_left = 100.0
|
||||||
|
offset_top = 100.0
|
||||||
|
offset_right = 300.0
|
||||||
|
offset_bottom = 300.0
|
||||||
49
Gameplay/boss.tscn
Normal file
49
Gameplay/boss.tscn
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
[gd_scene load_steps=5 format=3 uid="uid://bmy783a4c0tal"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://d3e55f3sbmjfm" path="res://Gameplay/Boss.cs" id="1_2o0wi"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://jkmo1fb2ohv4" path="res://Gameplay/board.tscn" id="1_clmtu"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cvys1ievove7k" path="res://Gameplay/dragon.tscn" id="2_2o0wi"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c51oi06i4yrvv" path="res://Art/x.png" id="4_r1ck7"]
|
||||||
|
|
||||||
|
[node name="Boss" type="Sprite2D"]
|
||||||
|
script = ExtResource("1_2o0wi")
|
||||||
|
|
||||||
|
[node name="Board" parent="." instance=ExtResource("1_clmtu")]
|
||||||
|
|
||||||
|
[node name="Dragon1" parent="." instance=ExtResource("2_2o0wi")]
|
||||||
|
|
||||||
|
[node name="Dragon2" parent="." instance=ExtResource("2_2o0wi")]
|
||||||
|
|
||||||
|
[node name="Dragon3" parent="." instance=ExtResource("2_2o0wi")]
|
||||||
|
|
||||||
|
[node name="Dragon4" parent="." instance=ExtResource("2_2o0wi")]
|
||||||
|
|
||||||
|
[node name="Dragon5" parent="." instance=ExtResource("2_2o0wi")]
|
||||||
|
|
||||||
|
[node name="Dragon6" parent="." instance=ExtResource("2_2o0wi")]
|
||||||
|
|
||||||
|
[node name="Dragon7" parent="." instance=ExtResource("2_2o0wi")]
|
||||||
|
|
||||||
|
[node name="Dragon8" parent="." instance=ExtResource("2_2o0wi")]
|
||||||
|
|
||||||
|
[node name="Dragon9" parent="." instance=ExtResource("2_2o0wi")]
|
||||||
|
|
||||||
|
[node name="MarkNormal" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_r1ck7")
|
||||||
|
|
||||||
|
[node name="MarkPressed" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_r1ck7")
|
||||||
|
|
||||||
|
[node name="MarkHovered" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_r1ck7")
|
||||||
|
|
||||||
|
[node name="MarkDisabled" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_r1ck7")
|
||||||
|
|
||||||
|
[node name="MarkFocused" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_r1ck7")
|
||||||
17
Gameplay/business_card.tscn
Normal file
17
Gameplay/business_card.tscn
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://b0ks34m6smjfd"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://g6ikqlh8yccy" path="res://Art/blanksquare.jpg" id="1_8xr8s"]
|
||||||
|
[ext_resource type="Script" uid="uid://dtcalmvwievft" path="res://Gameplay/BusinessCard.cs" id="2_rhxm0"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://tk7fjdvu5c0u" path="res://Gameplay/goal.tscn" id="3_ejro6"]
|
||||||
|
|
||||||
|
[node name="BusinessCard" type="TextureButton"]
|
||||||
|
modulate = Color(1, 1, 1, 0.2)
|
||||||
|
disabled = true
|
||||||
|
texture_normal = ExtResource("1_8xr8s")
|
||||||
|
texture_pressed = ExtResource("1_8xr8s")
|
||||||
|
texture_hover = ExtResource("1_8xr8s")
|
||||||
|
texture_disabled = ExtResource("1_8xr8s")
|
||||||
|
texture_focused = ExtResource("1_8xr8s")
|
||||||
|
script = ExtResource("2_rhxm0")
|
||||||
|
|
||||||
|
[node name="Goal" parent="." instance=ExtResource("3_ejro6")]
|
||||||
17
Gameplay/cell.tscn
Normal file
17
Gameplay/cell.tscn
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://0vj01cjcpibt"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://pg7mpir3ewhw" path="res://Gameplay/Cell.cs" id="1_lehgd"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://g6ikqlh8yccy" path="res://Art/blanksquare.jpg" id="2_mxyjk"]
|
||||||
|
|
||||||
|
[node name="Cell" type="TextureButton"]
|
||||||
|
modulate = Color(1, 1, 1, 0.2)
|
||||||
|
offset_right = 200.0
|
||||||
|
offset_bottom = 200.0
|
||||||
|
texture_normal = ExtResource("2_mxyjk")
|
||||||
|
texture_pressed = ExtResource("2_mxyjk")
|
||||||
|
texture_hover = ExtResource("2_mxyjk")
|
||||||
|
texture_disabled = ExtResource("2_mxyjk")
|
||||||
|
texture_focused = ExtResource("2_mxyjk")
|
||||||
|
script = ExtResource("1_lehgd")
|
||||||
|
|
||||||
|
[node name="DefaultMark" type="Sprite2D" parent="."]
|
||||||
6
Gameplay/contact.tscn
Normal file
6
Gameplay/contact.tscn
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://if21pf73w7by"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bgj2cuqdq0b6l" path="res://Gameplay/Contact.cs" id="1_basqx"]
|
||||||
|
|
||||||
|
[node name="Contact" type="Sprite2D"]
|
||||||
|
script = ExtResource("1_basqx")
|
||||||
50
Gameplay/dragon.tscn
Normal file
50
Gameplay/dragon.tscn
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
[gd_scene load_steps=5 format=3 uid="uid://cvys1ievove7k"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://jkmo1fb2ohv4" path="res://Gameplay/board.tscn" id="1_3o6ty"]
|
||||||
|
[ext_resource type="Script" uid="uid://ctsffebttempt" path="res://Gameplay/Dragon.cs" id="1_rebub"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bti3pxehphc5m" path="res://Gameplay/mook.tscn" id="2_70jbw"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c51oi06i4yrvv" path="res://Art/x.png" id="4_1okyd"]
|
||||||
|
|
||||||
|
[node name="Dragon" type="Sprite2D"]
|
||||||
|
script = ExtResource("1_rebub")
|
||||||
|
|
||||||
|
[node name="Board" parent="." instance=ExtResource("1_3o6ty")]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="Mook1" parent="." instance=ExtResource("2_70jbw")]
|
||||||
|
|
||||||
|
[node name="Mook2" parent="." instance=ExtResource("2_70jbw")]
|
||||||
|
|
||||||
|
[node name="Mook3" parent="." instance=ExtResource("2_70jbw")]
|
||||||
|
|
||||||
|
[node name="Mook4" parent="." instance=ExtResource("2_70jbw")]
|
||||||
|
|
||||||
|
[node name="Mook5" parent="." instance=ExtResource("2_70jbw")]
|
||||||
|
|
||||||
|
[node name="Mook6" parent="." instance=ExtResource("2_70jbw")]
|
||||||
|
|
||||||
|
[node name="Mook7" parent="." instance=ExtResource("2_70jbw")]
|
||||||
|
|
||||||
|
[node name="Mook8" parent="." instance=ExtResource("2_70jbw")]
|
||||||
|
|
||||||
|
[node name="Mook9" parent="." instance=ExtResource("2_70jbw")]
|
||||||
|
|
||||||
|
[node name="MarkNormal" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_1okyd")
|
||||||
|
|
||||||
|
[node name="MarkPressed" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_1okyd")
|
||||||
|
|
||||||
|
[node name="MarkHovered" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_1okyd")
|
||||||
|
|
||||||
|
[node name="MarkDisabled" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_1okyd")
|
||||||
|
|
||||||
|
[node name="MarkFocused" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("4_1okyd")
|
||||||
30
Gameplay/enemy.tscn
Normal file
30
Gameplay/enemy.tscn
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://bsfchgfdky43e"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://ctxj1kcqu8v78" path="res://Gameplay/Enemy.cs" id="1_4gyqm"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://jkmo1fb2ohv4" path="res://Gameplay/board.tscn" id="1_7k104"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c51oi06i4yrvv" path="res://Art/x.png" id="3_rgfr3"]
|
||||||
|
|
||||||
|
[node name="Enemy" type="Sprite2D"]
|
||||||
|
script = ExtResource("1_4gyqm")
|
||||||
|
|
||||||
|
[node name="Board" parent="." instance=ExtResource("1_7k104")]
|
||||||
|
|
||||||
|
[node name="MarkNormal" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_rgfr3")
|
||||||
|
|
||||||
|
[node name="MarkPressed" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_rgfr3")
|
||||||
|
|
||||||
|
[node name="MarkHovered" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_rgfr3")
|
||||||
|
|
||||||
|
[node name="MarkDisabled" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_rgfr3")
|
||||||
|
|
||||||
|
[node name="MarkFocused" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_rgfr3")
|
||||||
6
Gameplay/goal.tscn
Normal file
6
Gameplay/goal.tscn
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://tk7fjdvu5c0u"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://c08tnhx0minta" path="res://Gameplay/Goal.cs" id="1_cmwnn"]
|
||||||
|
|
||||||
|
[node name="Goal" type="Node"]
|
||||||
|
script = ExtResource("1_cmwnn")
|
||||||
31
Gameplay/mook.tscn
Normal file
31
Gameplay/mook.tscn
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://bti3pxehphc5m"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://jkmo1fb2ohv4" path="res://Gameplay/board.tscn" id="1_ndne4"]
|
||||||
|
[ext_resource type="Script" uid="uid://clatml6wkypfe" path="res://Gameplay/Mook.cs" id="1_ujoso"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c51oi06i4yrvv" path="res://Art/x.png" id="3_2cl80"]
|
||||||
|
|
||||||
|
[node name="Mook" type="Sprite2D"]
|
||||||
|
script = ExtResource("1_ujoso")
|
||||||
|
|
||||||
|
[node name="Board" parent="." instance=ExtResource("1_ndne4")]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="MarkNormal" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_2cl80")
|
||||||
|
|
||||||
|
[node name="MarkPressed" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_2cl80")
|
||||||
|
|
||||||
|
[node name="MarkHovered" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_2cl80")
|
||||||
|
|
||||||
|
[node name="MarkDisabled" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_2cl80")
|
||||||
|
|
||||||
|
[node name="MarkFocused" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("3_2cl80")
|
||||||
13
Gameplay/opponent.tscn
Normal file
13
Gameplay/opponent.tscn
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://12dh7l7eucb4"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://631085nn2jpc" path="res://Gameplay/Opponent.cs" id="1_h046w"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c51oi06i4yrvv" path="res://Art/x.png" id="2_7tesw"]
|
||||||
|
|
||||||
|
[node name="Opponent" type="Node2D"]
|
||||||
|
script = ExtResource("1_h046w")
|
||||||
|
|
||||||
|
[node name="Mark" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("2_7tesw")
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite2D" parent="."]
|
||||||
79
Gameplay/phone.tscn
Normal file
79
Gameplay/phone.tscn
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://yaybgshgeb3d"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://buee5y051op2" path="res://Art/phone.png" id="1_lrxfg"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dj6cr426bn30b" path="res://Gameplay/phone_button.tscn" id="2_pr3bu"]
|
||||||
|
[ext_resource type="Script" uid="uid://dgmkhlit1vnf3" path="res://Gameplay/Phone.cs" id="2_ujt17"]
|
||||||
|
|
||||||
|
[node name="Phone" type="Sprite2D"]
|
||||||
|
texture = ExtResource("1_lrxfg")
|
||||||
|
script = ExtResource("2_ujt17")
|
||||||
|
|
||||||
|
[node name="PhoneButton1" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = -228.0
|
||||||
|
offset_top = 230.0
|
||||||
|
offset_right = 572.0
|
||||||
|
offset_bottom = 1030.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="PhoneButton2" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = -41.0
|
||||||
|
offset_top = 254.0
|
||||||
|
offset_right = 759.0
|
||||||
|
offset_bottom = 1054.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="PhoneButton3" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = 150.0
|
||||||
|
offset_top = 225.0
|
||||||
|
offset_right = 950.0
|
||||||
|
offset_bottom = 1025.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="PhoneButton4" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = -228.0
|
||||||
|
offset_top = 339.0
|
||||||
|
offset_right = 572.0
|
||||||
|
offset_bottom = 1139.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="PhoneButton5" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = -38.0
|
||||||
|
offset_top = 361.0
|
||||||
|
offset_right = 762.0
|
||||||
|
offset_bottom = 1161.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="PhoneButton6" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = 140.0
|
||||||
|
offset_top = 336.0
|
||||||
|
offset_right = 940.0
|
||||||
|
offset_bottom = 1136.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="PhoneButton7" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = -222.0
|
||||||
|
offset_top = 447.0
|
||||||
|
offset_right = 578.0
|
||||||
|
offset_bottom = 1247.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="PhoneButton8" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = -39.0
|
||||||
|
offset_top = 466.0
|
||||||
|
offset_right = 761.0
|
||||||
|
offset_bottom = 1266.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="PhoneButton9" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = 137.0
|
||||||
|
offset_top = 437.0
|
||||||
|
offset_right = 937.0
|
||||||
|
offset_bottom = 1237.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="PhoneButton0" parent="." instance=ExtResource("2_pr3bu")]
|
||||||
|
offset_left = -41.0
|
||||||
|
offset_top = 565.0
|
||||||
|
offset_right = 759.0
|
||||||
|
offset_bottom = 1365.0
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
20
Gameplay/phone_button.tscn
Normal file
20
Gameplay/phone_button.tscn
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://dj6cr426bn30b"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://4hculjnuw6ha" path="res://Art/capsule-fill.svg" id="1_6ytam"]
|
||||||
|
[ext_resource type="Script" uid="uid://cd1nniv27ef2f" path="res://Gameplay/PhoneButton.cs" id="1_d1byk"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://if21pf73w7by" path="res://Gameplay/contact.tscn" id="3_3os1s"]
|
||||||
|
|
||||||
|
[node name="PhoneButton" type="TextureButton"]
|
||||||
|
modulate = Color(1, 1, 1, 0.2)
|
||||||
|
offset_right = 800.0
|
||||||
|
offset_bottom = 800.0
|
||||||
|
texture_normal = ExtResource("1_6ytam")
|
||||||
|
texture_pressed = ExtResource("1_6ytam")
|
||||||
|
texture_hover = ExtResource("1_6ytam")
|
||||||
|
texture_disabled = ExtResource("1_6ytam")
|
||||||
|
texture_focused = ExtResource("1_6ytam")
|
||||||
|
script = ExtResource("1_d1byk")
|
||||||
|
|
||||||
|
[node name="Contact" parent="." instance=ExtResource("3_3os1s")]
|
||||||
|
position = Vector2(-228, 230)
|
||||||
|
scale = Vector2(0.13, 0.13)
|
||||||
51
Gameplay/player.tscn
Normal file
51
Gameplay/player.tscn
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
[gd_scene load_steps=6 format=3 uid="uid://b7vhq2dkltsv"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c51oi06i4yrvv" path="res://Art/x.png" id="1_c6108"]
|
||||||
|
[ext_resource type="Script" uid="uid://dth2vcgkp7iq0" path="res://Player.cs" id="1_enp12"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://yaybgshgeb3d" path="res://Gameplay/phone.tscn" id="4_1d6nn"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b0ks34m6smjfd" path="res://Gameplay/business_card.tscn" id="5_ek8wa"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bmy783a4c0tal" path="res://Gameplay/boss.tscn" id="5_lfxdo"]
|
||||||
|
|
||||||
|
[node name="Player" type="Sprite2D"]
|
||||||
|
script = ExtResource("1_enp12")
|
||||||
|
|
||||||
|
[node name="Phone" parent="." instance=ExtResource("4_1d6nn")]
|
||||||
|
position = Vector2(1600, 540)
|
||||||
|
scale = Vector2(0.5, 0.5)
|
||||||
|
|
||||||
|
[node name="Boss" parent="." instance=ExtResource("5_lfxdo")]
|
||||||
|
position = Vector2(960, 540)
|
||||||
|
|
||||||
|
[node name="MarkNormal" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("1_c6108")
|
||||||
|
|
||||||
|
[node name="MarkPressed" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("1_c6108")
|
||||||
|
|
||||||
|
[node name="MarkHovered" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("1_c6108")
|
||||||
|
|
||||||
|
[node name="MarkDisabled" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("1_c6108")
|
||||||
|
|
||||||
|
[node name="MarkFocused" type="Sprite2D" parent="."]
|
||||||
|
visible = false
|
||||||
|
texture = ExtResource("1_c6108")
|
||||||
|
|
||||||
|
[node name="Debug" type="RichTextLabel" parent="."]
|
||||||
|
offset_right = 322.0
|
||||||
|
offset_bottom = 153.0
|
||||||
|
theme_override_font_sizes/normal_font_size = 32
|
||||||
|
text = "DEBUG"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="BusinessCard" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
|
offset_left = 98.0
|
||||||
|
offset_top = 769.0
|
||||||
|
offset_right = 298.0
|
||||||
|
offset_bottom = 969.0
|
||||||
23
Main.cs
Normal file
23
Main.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public partial class Main : Node2D
|
||||||
|
{
|
||||||
|
Player _player;
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
_player = GetNode<Player>("Player");
|
||||||
|
_player._name = "X";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _Process(double DELTA_)
|
||||||
|
{
|
||||||
|
if (Input.IsActionJustReleased("quit_game"))
|
||||||
|
{
|
||||||
|
|
||||||
|
GetTree().Quit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
Main.cs.uid
Normal file
1
Main.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://i1ujfd2xwd82
|
||||||
95
Player.cs
Normal file
95
Player.cs
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
public partial class Player : Actor
|
||||||
|
{
|
||||||
|
public bool _isTurn = false;
|
||||||
|
public string _name;
|
||||||
|
public Phone _phone;
|
||||||
|
public Boss _boss;
|
||||||
|
public Enemy _activeEnemy;
|
||||||
|
public RichTextLabel _debug;
|
||||||
|
public List<BusinessCard> _businessCards;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
base._Ready();
|
||||||
|
|
||||||
|
_debug = GetNode<RichTextLabel>("Debug");
|
||||||
|
|
||||||
|
_phone = GetNode<Phone>("Phone");
|
||||||
|
_phone.PassPlayer(this);
|
||||||
|
|
||||||
|
_boss = GetNode<Boss>("Boss");
|
||||||
|
_boss.PassPlayer(this);
|
||||||
|
|
||||||
|
_businessCards = GetChildren().Where(c=>c is BusinessCard).Cast<BusinessCard>().ToList();
|
||||||
|
for (int i = 0; i < _businessCards.Count; i++)
|
||||||
|
{
|
||||||
|
_businessCards[i].PassPlayer(this);
|
||||||
|
_businessCards[i].AssignGoal(GoalName.MiddleColumn);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Challenge(_boss);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Challenge(Enemy ENEMY)
|
||||||
|
{
|
||||||
|
_board?.Deactivate();
|
||||||
|
ENEMY._board.Activate();
|
||||||
|
_board = ENEMY._board;
|
||||||
|
_activeEnemy = ENEMY;
|
||||||
|
|
||||||
|
string text = "";
|
||||||
|
if (_activeEnemy is Mook)
|
||||||
|
{
|
||||||
|
text = "dragon " + _activeEnemy._owner._number + "\nmook " + _activeEnemy._number;
|
||||||
|
}
|
||||||
|
else if (_activeEnemy is Dragon)
|
||||||
|
{
|
||||||
|
text = "dragon " + _activeEnemy._number;
|
||||||
|
}
|
||||||
|
_debug.Text = text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CheckBusinessCards()
|
||||||
|
{
|
||||||
|
_businessCards.ForEach(b=>b.CheckGoal());
|
||||||
|
}
|
||||||
|
|
||||||
|
// public bool CheckWin(List<Cell> CELLS)
|
||||||
|
// {
|
||||||
|
// foreach (Goal.GoalName cond in _goal._eligibleGoals)
|
||||||
|
// {
|
||||||
|
// foreach (List<int> condList in _goal._conditions[cond])
|
||||||
|
// {
|
||||||
|
// // if (condList.All(a=>CELLS.FirstOrDefault<Cell>(c=>c._address == a, null)?._owner == this))
|
||||||
|
// // {
|
||||||
|
// // return true;
|
||||||
|
// // }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
// public void MarkCell(Cell CELL)
|
||||||
|
// {
|
||||||
|
// CELL._mark.Texture = _mark.Texture;
|
||||||
|
// // CELL._owner = this;
|
||||||
|
// }
|
||||||
|
|
||||||
|
public override void _Process(double delta)
|
||||||
|
{
|
||||||
|
if (Input.IsActionJustReleased("backspace"))
|
||||||
|
{
|
||||||
|
if (_board._owner._owner != null)
|
||||||
|
{
|
||||||
|
Challenge(_board._owner._owner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1
Player.cs.uid
Normal file
1
Player.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dth2vcgkp7iq0
|
||||||
7
Tic Tac Toe.csproj
Normal file
7
Tic Tac Toe.csproj
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<Project Sdk="Godot.NET.Sdk/4.4.1">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
|
<RootNamespace>TicTacToe</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
19
Tic Tac Toe.sln
Normal file
19
Tic Tac Toe.sln
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tic Tac Toe", "Tic Tac Toe.csproj", "{CB4332CD-DFB8-472B-BCE3-CEDB07FD33C1}"
|
||||||
|
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
|
||||||
|
{CB4332CD-DFB8-472B-BCE3-CEDB07FD33C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{CB4332CD-DFB8-472B-BCE3-CEDB07FD33C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{CB4332CD-DFB8-472B-BCE3-CEDB07FD33C1}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||||
|
{CB4332CD-DFB8-472B-BCE3-CEDB07FD33C1}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||||
|
{CB4332CD-DFB8-472B-BCE3-CEDB07FD33C1}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||||
|
{CB4332CD-DFB8-472B-BCE3-CEDB07FD33C1}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
1
icon.svg
Normal file
1
icon.svg
Normal file
@@ -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 |
37
icon.svg.import
Normal file
37
icon.svg.import
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://clvvqpa4brpxt"
|
||||||
|
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
|
||||||
9
main.tscn
Normal file
9
main.tscn
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://bvhlmavxrih1m"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://i1ujfd2xwd82" path="res://Main.cs" id="1_ig7tw"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b7vhq2dkltsv" path="res://Gameplay/player.tscn" id="3_1bvp3"]
|
||||||
|
|
||||||
|
[node name="Main" type="Node2D"]
|
||||||
|
script = ExtResource("1_ig7tw")
|
||||||
|
|
||||||
|
[node name="Player" parent="." instance=ExtResource("3_1bvp3")]
|
||||||
104
project.godot
Normal file
104
project.godot
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
; 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="Tic Tac Toe"
|
||||||
|
run/main_scene="uid://bvhlmavxrih1m"
|
||||||
|
config/features=PackedStringArray("4.4", "C#", "Forward Plus")
|
||||||
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/viewport_width=1920
|
||||||
|
window/size/viewport_height=1080
|
||||||
|
window/size/mode=3
|
||||||
|
|
||||||
|
[dotnet]
|
||||||
|
|
||||||
|
project/assembly_name="Tic Tac Toe"
|
||||||
|
|
||||||
|
[input]
|
||||||
|
|
||||||
|
quit_game={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
left_mouse={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
rotate={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad1={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194439,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad2={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194440,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad3={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194441,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad4={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194442,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad5={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194443,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad6={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194444,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad7={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194445,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad8={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194446,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad9={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194447,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
numpad0={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194438,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
debug_board_reset={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":61,"key_label":0,"unicode":61,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
backspace={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194308,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user