Compare commits

...

9 Commits

46 changed files with 447 additions and 914 deletions

BIN
Art/DVD_logo.svg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c2bxv5ag46gy"
path="res://.godot/imported/DVD_logo.svg.png-5e83be52b2303068fecc292b205ac7e1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/DVD_logo.svg.png"
dest_files=["res://.godot/imported/DVD_logo.svg.png-5e83be52b2303068fecc292b205ac7e1.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

BIN
Art/broken_shield.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b5oc4f3gxijq5"
path="res://.godot/imported/broken_shield.png-18bca4dc3aa93b7e622d775255883827.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/broken_shield.png"
dest_files=["res://.godot/imported/broken_shield.png-18bca4dc3aa93b7e622d775255883827.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

BIN
Art/reg_shield.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

40
Art/reg_shield.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://3agkku8rqvmj"
path="res://.godot/imported/reg_shield.png-707495a71352fd3f05b6fd7cddacd9a5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Art/reg_shield.png"
dest_files=["res://.godot/imported/reg_shield.png-707495a71352fd3f05b6fd7cddacd9a5.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

View File

@@ -17,143 +17,5 @@ public partial class Actor : Sprite2D
_markDisabled = GetNode<Sprite2D>("MarkDisabled");
_markFocused = GetNode<Sprite2D>("MarkFocused");
}
// CALLABLE ACTIONS
public bool RotateCells(int ROTATIONS = 1, bool JUST_MARKS = false)
{
List<Vector2> positions = new(_board._cells.Select(c=>c.Position).ToList());
List<int> addresses = new(_board._cells.Select(c=>c._address).ToList());
Dictionary<int, int> cwShifts = new()
{
{0,1}, {1,2}, {2,5}, {3,0}, {4,4}, {5,8}, {6,3}, {7,6}, {8,7}
};
Dictionary<int, int> ccwShifts = new()
{
{0,3}, {1,0}, {2,1}, {3,6}, {4,4}, {5,2}, {6,7}, {7,8}, {8,5}
};
Dictionary<int, int> shifts = ROTATIONS > 0 ? cwShifts : ccwShifts;
for (int i = 0; i < Math.Abs(ROTATIONS); i++)
{
for (int j = 0; j < addresses.Count; j++)
{
int address = addresses[j];
int newAddress = shifts[address];
addresses[j] = newAddress;
}
}
for (int i = 0; i < _board._cells.Count; i++)
{
int newCellAddress = addresses[i];
_board._cells[i].Position = positions[newCellAddress];
}
_board.RenumberCells();
return true;
}
public bool ShiftMarks(int COLUMNS = 0, int ROWS = 0)
{
List<Actor> markers = new(_board._cells.Select(c=>c._marker).ToList());
int[,] cellsToTable = {{0,1,2},{3,4,5},{6,7,8}};
for (int i = 0; i < cellsToTable.GetLength(0); i++) //ROWS / Y
{
for (int j = 0; j < cellsToTable.GetLength(1); j++) //COLUMNS / X
{
int toY = ROWS >= 0 ? cellsToTable.GetLength(0) - 1 - i : i;
int fromY = toY - ROWS;
int toX = COLUMNS >= 0 ? cellsToTable.GetLength(1) - 1 - j : j;
int fromX = toX - COLUMNS;
if (fromY >= 0 && fromY <= cellsToTable.GetLength(0) && fromX >= 0 && fromX <= cellsToTable.GetLength(1))
{
int toI = cellsToTable[toY, toX];
int fromI = cellsToTable[fromY, fromX];
if (_board._cells[fromI]._marker != null)
{
_board._cells[toI].Mark(_board._cells[fromI]._marker);
_board._cells[fromI].Clear();
}
else
{
_board._cells[toI].Clear();
}
}
}
// int actualIndex =
// int cellCol = i % 3;
// int cellRow = (int)Math.Floor(i / 3f);
// int newCol = cellCol + COLUMNS;
// int newRow = cellRow + ROWS;
// if (newCol >= 0 && newRow >= 0 && newCol <= 2 && newRow <= 2)
// {
// int newAddress = newRow*3 + newCol;
// GD.Print(i, cellCol, cellRow, newCol, newRow, newAddress);
// if (_board._cells[i]._marker != null)
// {
// _board._cells[newAddress].Mark(_board._cells[i]._marker);
// }
// // _board._cells[i].Clear();
// }
}
_board.RenumberCells();
return true;
}
public bool SlideCells(int SHIFT_SPOTS = 1)
{
List<Vector2> positions = new(_board._cells.Select(c=>c.Position).ToList());
int start = SHIFT_SPOTS > 0 ? 0 : 9;
for (int i = 0; i < _board._cells.Count; i++)
{
int newSpot = (start + i + SHIFT_SPOTS) % 9;
_board._cells[i].Position = positions[newSpot];
}
_board.RenumberCells();
return true;
}
public bool SwapCells(int CELL_A_ADDRESS = -1, int CELL_B_ADDRESS = -1)
{
if (CELL_A_ADDRESS < -1 || CELL_A_ADDRESS > 8 || CELL_B_ADDRESS < -1 || CELL_B_ADDRESS > 8 || CELL_A_ADDRESS == CELL_B_ADDRESS)
{
return false;
}
List<Vector2> positions = new(_board._cells.Select(c=>c.Position).ToList());
if (CELL_A_ADDRESS == -1)
{
CELL_A_ADDRESS = Globals._rng.Next(0,8);
while (CELL_A_ADDRESS == CELL_B_ADDRESS)
{
CELL_A_ADDRESS = Globals._rng.Next(0,8);
}
}
if (CELL_B_ADDRESS == -1)
{
CELL_B_ADDRESS = Globals._rng.Next(0,8);
while (CELL_B_ADDRESS == CELL_A_ADDRESS)
{
CELL_B_ADDRESS = Globals._rng.Next(0,8);
}
}
_board._cells[CELL_A_ADDRESS].Position = positions[CELL_B_ADDRESS];
_board._cells[CELL_B_ADDRESS].Position = positions[CELL_A_ADDRESS];
_board.RenumberCells();
return true;
}
//MoveMark
//ShiftColumns
//ShiftRows
}

View File

@@ -2,22 +2,33 @@ using Godot;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
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 List<Shield> _shields = 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++)
_shields = GetChildren().Where(c=>c is Shield).Cast<Shield>().ToList();
int xSize = (int)Texture.GetSize().X;
int ySize = (int)Texture.GetSize().Y;
for (int i = 0; i < _shields.Count; i++)
{
_cells[i]._address = i;
_shields[i]._address = i;
float shieldX = _shields[i].TextureNormal.GetSize().X;
float shieldY = _shields[i].TextureNormal.GetSize().Y;
_shields[i].Scale = new Vector2(shieldX / (xSize/3), shieldY / (ySize/3));
int c = i % 3 - 1;
int r = (int)(i/3) - 1;
_shields[i].Position = new Vector2(xSize / 3f * c - shieldX / 2, ySize / 3f * r - shieldY / 2);
}
}
@@ -45,14 +56,14 @@ public partial class Board : Sprite2D
public void ClaimOwnership(Enemy OWNER)
{
_owner = OWNER;
_cells.ForEach(c=>c._owner = OWNER);
_cells.ForEach(c=>c._board = this);
_shields.ForEach(c=>c._owner = OWNER);
_shields.ForEach(c=>c._board = this);
}
public void ClearBoard(){
foreach (Cell cell in _cells)
foreach (Shield shield in _shields)
{
cell.Clear();
// shield.Mark();
}
}
@@ -61,19 +72,19 @@ public partial class Board : Sprite2D
Disable(true);
}
public Cell GetCellByTenant(Enemy TENANT)
public Shield GetShieldByTenant(Enemy TENANT)
{
return _cells.Single(c=>c._tenant == TENANT);
return _shields.Single(c=>c._tenant == TENANT);
}
public Cell GetCellByAddress(int ADDRESS)
public Shield GetShieldByAddress(int ADDRESS)
{
return _cells.Single(c=>c._address == ADDRESS);
return _shields.Single(c=>c._address == ADDRESS);
}
public List<Cell> GetCellsByOwner(Actor ACTOR)
public List<Shield> GetShieldsByOwner(Actor ACTOR)
{
return _cells.Where(c=>c._marker == ACTOR).ToList();
return _shields.Where(c=>c._marker == ACTOR).ToList();
}
//THIS SHOULD BE MOVED INTO ACTION LOGIC
@@ -82,24 +93,22 @@ public partial class Board : Sprite2D
// for (int i = 0; i < REPEAT; i++)
// {
// Rotation += DEGREES * ((float)Math.PI / 180);
// RenumberCells();
// RenumberShields();
// }
// }
public void RenumberCells()
public void RenumberShields()
{
GD.Print(string.Join(", ", _cells.Select(c=>c._address)));
_cells = _cells.OrderBy(c => c.Position.Y).ThenBy(c => c.Position.X).ToList();
GD.Print(string.Join(", ", _cells.Select(c=>c._address)));
_shields = _shields.OrderBy(c => c.Position.Y).ThenBy(c => c.Position.X).ToList();
for (int i = 0; i < _cells.Count; i++)
for (int i = 0; i < _shields.Count; i++)
{
_cells[i]._address = i;
_shields[i]._address = i;
}
}
public void Start()
public void Begin()
{
ClearBoard();
// _player._isTurn = true;
@@ -110,6 +119,6 @@ public partial class Board : Sprite2D
_active = !DISABLED;
Visible = !DISABLED;
SetProcess(!DISABLED);
_cells.ForEach(c=>c.Disable(DISABLED));
_shields.ForEach(c=>c.Disable(DISABLED));
}
}

View File

@@ -15,8 +15,8 @@ public partial class Boss : Enemy
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];
_dragons[i]._number = _board._shields[i]._address;
_board._shields[i]._tenant = _dragons[i];
}
}
@@ -26,9 +26,9 @@ public partial class Boss : Enemy
_dragons.ForEach(d=>d.PassPlayer(PLAYER));
}
public override void ClickCell(Cell CLICKED_CELL)
public override void ClickShield(Shield CLICKED_SHIELD)
{
_playerOpponent.Challenge(CLICKED_CELL._tenant);
_playerOpponent.Challenge(CLICKED_SHIELD._tenant);
}
}

View File

@@ -1,61 +0,0 @@
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();
_player._busDebug.Text = _goalName.ToString() + (_goalMet ? "": " NOT") + " MET";
if (_goalMet)
{
_player._activeEnemy.Defeat(_goalName);
_player.Challenge(_player._activeEnemy._owner._board._owner);
}
}
public void AssignGoal(GoalName GOALNAME)
{
_goalName = GOALNAME;
}
public void AssignRandomGoal()
{
Random r = new Random();
AssignGoal(_goal._conditions.Keys.ElementAt(r.Next(_goal._conditions.Keys.Count)));
}
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);
if (_goalMet)
{
Modulate = new Color(1,1,1,1);
}
else
{
Modulate = new Color(1,1,1,0.3f);
}
}
public void PassPlayer(Player PLAYER)
{
_player = PLAYER;
}
}

View File

@@ -1 +0,0 @@
uid://dtcalmvwievft

View File

@@ -14,6 +14,6 @@ public partial class CallButton : TextureButton
public override void _Pressed()
{
base._Pressed();
_phone.CallLoadedContact();
_phone._player.StartBattle();
}
}

View File

@@ -1,51 +0,0 @@
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();
_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;
}
}

View File

@@ -1,27 +0,0 @@
using Godot;
using System;
public partial class Contact : Sprite2D
{
public Player _player;
public int _number;
public override void _Ready()
{
}
public virtual void CallAction()
{
}
public void PassNumber(int NUMBER)
{
_number = NUMBER;
}
public void PassPlayer(Player PLAYER)
{
_player = PLAYER;
}
}

View File

@@ -1 +0,0 @@
uid://bgj2cuqdq0b6l

View File

@@ -0,0 +1,16 @@
using Godot;
using System;
public partial class DmitriVonDietmud : Node2D
{
Button _button;
Sprite2D _contactPhoto, _bouncingLogo;
public override void _Ready()
{
base._Ready();
_button = GetNode<Button>("Button");
_contactPhoto = GetNode<Sprite2D>("ContactPhoto");
_bouncingLogo = GetNode<Sprite2D>("BouncingLogo");
}
}

View File

@@ -0,0 +1 @@
uid://6pl5j2gts8rs

View File

@@ -1,7 +0,0 @@
public partial class Rotate90 : Contact
{
public override void CallAction()
{
_player.RotateCells(2);
}
}

View File

@@ -1 +0,0 @@
uid://dtv3bqpuf0y33

View File

@@ -1,7 +0,0 @@
public partial class Shift1ColumnRight : Contact
{
public override void CallAction()
{
_player.ShiftMarks(1,0);
}
}

View File

@@ -1 +0,0 @@
uid://ciphg323a14cs

View File

@@ -1,7 +0,0 @@
public partial class SlideBack2 : Contact
{
public override void CallAction()
{
_player.SlideCells(-2);
}
}

View File

@@ -1 +0,0 @@
uid://c14om0rrrui02

View File

@@ -1,7 +0,0 @@
public partial class Swap1And6 : Contact
{
public override void CallAction()
{
_player.SwapCells(1-1,6-1);
}
}

View File

@@ -1 +0,0 @@
uid://bl37rkfpucd5e

View File

@@ -0,0 +1,45 @@
[gd_scene format=3 uid="uid://do2jybceg5ff7"]
[ext_resource type="Script" uid="uid://6pl5j2gts8rs" path="res://Gameplay/Contacts/DmitriVonDietmud.cs" id="1_6y476"]
[ext_resource type="Texture2D" uid="uid://g6ikqlh8yccy" path="res://Art/blanksquare.jpg" id="2_qntos"]
[ext_resource type="Texture2D" uid="uid://c2bxv5ag46gy" path="res://Art/DVD_logo.svg.png" id="3_qg40i"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_61s5v"]
radius = 214.0
height = 998.0
[node name="DmitriVonDietmud" type="Node2D" unique_id=1597238152]
script = ExtResource("1_6y476")
[node name="Button" type="Button" parent="." unique_id=250025707]
modulate = Color(1, 1, 1, 0)
z_index = 1
offset_left = -120.0
offset_top = -120.0
offset_right = 120.0
offset_bottom = 120.0
[node name="ContactPhoto" type="Sprite2D" parent="." unique_id=224136394]
texture = ExtResource("2_qntos")
[node name="ProgressBar" type="ProgressBar" parent="ContactPhoto" unique_id=929449245]
z_index = -1
offset_left = -120.0
offset_top = -120.0
offset_right = 120.0
offset_bottom = 120.0
[node name="BouncingLogo" type="Sprite2D" parent="." unique_id=780733394]
visible = false
scale = Vector2(0.17494087, 0.1749409)
texture = ExtResource("3_qg40i")
[node name="Area2D" type="Area2D" parent="BouncingLogo" unique_id=1582289528]
[node name="CollisionShape2D" type="CollisionShape2D" parent="BouncingLogo/Area2D" unique_id=1067740615]
rotation = 1.5707964
shape = SubResource("CapsuleShape2D_61s5v")
[node name="LogoLifespan" type="Timer" parent="BouncingLogo" unique_id=889600374]
[node name="AvailableTimer" type="Timer" parent="." unique_id=2103179733]

View File

@@ -9,7 +9,7 @@ public partial class Dragon : Enemy
// public Board _board;
public List<Mook> _mooks;
// public Player _playerOpponent;
// public Cell _cell;
// public Shield _shield;
public override void _Ready()
{
@@ -18,8 +18,8 @@ public partial class Dragon : Enemy
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];
_mooks[i]._number = _board._shields[i]._address;
_board._shields[i]._tenant = _mooks[i];
}
}
@@ -35,8 +35,8 @@ public partial class Dragon : Enemy
}
public override void ClickCell(Cell CLICKED_CELL)
public override void ClickShield(Shield CLICKED_SHIELD)
{
_playerOpponent.Challenge(CLICKED_CELL._tenant);
_playerOpponent.Challenge(CLICKED_SHIELD._tenant);
}
}

View File

@@ -7,7 +7,7 @@ public partial class Enemy : Actor
{
public int _number;
public Player _playerOpponent;
public Cell _cell;
public Shield _shield;
public Enemy _owner;
public List<GoalName> _defaultGoals = new();
public List<GoalName> _goals = new();
@@ -36,13 +36,13 @@ public partial class Enemy : Actor
public void CheckGoals()
{
List<Cell> ownedCells = _board.GetCellsByOwner(this);
List<Shield> ownedShields = _board.GetShieldsByOwner(this);
Goal goal = new Goal();
for (int i = 0; i < _defaultGoals.Count; i++)
{
GoalName goalName = _defaultGoals[i];
List<int> addresses = goal.GetAddresses(goalName);
bool goalMet = addresses.All(a=>ownedCells.Select(c=>c._address).ToList().IndexOf(a)>-1);
bool goalMet = addresses.All(a=>ownedShields.Select(c=>c._address).ToList().IndexOf(a)>-1);
if (goalMet)
{
Victory(goalName);
@@ -51,7 +51,7 @@ public partial class Enemy : Actor
}
}
public virtual void ClickCell(Cell CLICKED_CELL)
public virtual void ClickShield(Shield CLICKED_SHIELD)
{
}
@@ -61,7 +61,7 @@ public partial class Enemy : Actor
_board._winningPattern = WINNING_PATTERN;
if (_owner != null)
{
_owner._board.GetCellByTenant(this).Mark(_playerOpponent);
// _owner._board.GetShieldByTenant(this).Mark(_playerOpponent);
}
else
{
@@ -74,7 +74,7 @@ public partial class Enemy : Actor
_board._winningPattern = WINNING_PATTERN;
if (_owner != null)
{
_owner._board.GetCellByTenant(this).Mark(this);
_owner._board.GetShieldByTenant(this).Break();
}
else
{

View File

@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Godot;
public static partial class Globals
{
@@ -7,20 +9,15 @@ public static partial class Globals
public static Random _rng = new();
public static List<string> _addressTranslation = new(){"NW","N","NE","W","C","E","SW","S","SE"};
public static void Shuffle<T>(this IList<T> list)
{
int n = list.Count;
while (n > 1) {
n--;
int k = _rng.Next(n + 1);
T value = list[k];
list[k] = list[n];
list[n] = value;
}
}
public static void LoadSeed(int SEED)
{
_rng = new(SEED);
}
public static T LoadScene<T>(string SCENE_PATH)
{
PackedScene scene = ResourceLoader.Load<PackedScene>(SCENE_PATH);
T instance = (T)(object)scene.Instantiate();
return instance;
}
}

View File

@@ -8,61 +8,61 @@ 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.Diagonal1To9, new (){1,5,9}},
{GoalName.Diagonal3To7, new (){3,5,7}},
{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}},
{GoalName.Blackout, new (){1,2,3,4,5,6,7,8,9}},
{GoalName.TopRow, new (){0,1,2}},
{GoalName.MiddleRow, new (){3,4,5}},
{GoalName.BottomRow, new (){6,7,8}},
{GoalName.LeftColumn, new (){0,3,6}},
{GoalName.MiddleColumn, new (){1,4,7}},
{GoalName.RightColumn, new (){2,5,8}},
{GoalName.Diagonal1To9, new (){0,4,8}},
{GoalName.Diagonal3To7, new (){2,4,6}},
{GoalName.Number1, new (){0,1,4,6,7,8}},
{GoalName.Number2, new (){0,1,3,4,7,8}},
{GoalName.Number3, new (){0,1,4,5,6,7}},
{GoalName.Number4, new (){0,2,3,4,5,8}},
{GoalName.Number5, new (){1,2,3,4,6,7}},
{GoalName.Number6, new (){0,3,4,5,6,7,8}},
{GoalName.Number7, new (){0,1,2,5,8}},
{GoalName.Number8, new (){1,2,3,4,5,6,7}},
{GoalName.Number9, new (){0,1,2,3,4,5,7,8}},
{GoalName.Number0, new (){1,2,3,5,6,7}},
{GoalName.LetterA, new (){1,3,4,5,6,8}},
{GoalName.LetterB, new (){0,1,3,4,5,6,7,8}},
{GoalName.LetterC, new (){0,1,2,3,6,7,8}},
{GoalName.LetterD, new (){0,1,3,5,6,7}},
{GoalName.LetterE, new (){0,1,2,3,4,6,7,8}},
{GoalName.LetterF, new (){0,1,2,3,4,6}},
{GoalName.LetterG, new (){0,1,3,5,6,7,8}},
{GoalName.LetterH, new (){0,2,3,4,5,6,8}},
{GoalName.LetterI, new (){0,1,2,4,6,7,8}},
{GoalName.LetterJ, new (){0,1,2,4,6,7}},
{GoalName.LetterK, new (){0,2,3,4,6,8}},
{GoalName.LetterL, new (){2,4,6,7,8}},
{GoalName.LetterM, new (){0,1,2,3,4,5,6,8}},
{GoalName.LetterN, new (){0,1,2,3,5,6,8}},
{GoalName.LetterO, new (){0,1,2,3,5,6,7,8}},
{GoalName.LetterP, new (){0,1,2,3,4,5,6}},
{GoalName.LetterQ, new (){0,1,2,3,5,6,7}},
{GoalName.LetterR, new (){0,1,2,3,4,6,8}},
{GoalName.LetterS, new (){1,2,4,6,7}},
{GoalName.LetterT, new (){0,1,2,4,7}},
{GoalName.LetterU, new (){0,2,3,5,6,7,8}},
{GoalName.LetterV, new (){0,2,3,5,7}},
{GoalName.LetterW, new (){0,2,3,4,5,6,7,8}},
{GoalName.LetterX, new (){0,2,4,6,8}},
{GoalName.LetterY, new (){0,2,4,7}},
{GoalName.LetterZ, new (){0,1,4,7,8}},
{GoalName.LongRightAngleAt1, new (){0,1,2,3,6}},
{GoalName.LongRightAngleAt3, new (){0,1,2,5,8}},
{GoalName.LongRightAngleAt7, new (){0,3,6,7,8}},
{GoalName.LongRightAngleAt9, new (){2,5,6,7,8}},
{GoalName.ShortRightAngleAt1, new (){0,1,3}},
{GoalName.ShortRightAngleAt3, new (){1,2,5}},
{GoalName.ShortRightAngleAt7, new (){3,6,7}},
{GoalName.ShortRightAngleAt9, new (){5,7,8}},
{GoalName.Corners, new (){0,3,6,8}},
{GoalName.Diamond, new (){1,3,5,7}},
{GoalName.Blackout, new (){0,1,2,3,4,5,6,7,8}},
};

View File

@@ -12,9 +12,9 @@ public partial class Mook : Enemy
}
public override void ClickCell(Cell CLICKED_CELL)
public override void ClickShield(Shield CLICKED_SHIELD)
{
CLICKED_CELL.Mark(_playerOpponent);
// CLICKED_SHIELD.Mark(_playerOpponent);
_playerOpponent.CheckGoals();
}
}

View File

@@ -1,14 +1,13 @@
using Godot;
using Godot.NativeInterop;
using System;
using System.Collections.Generic;
using System.Linq;
public partial class Phone : Sprite2D
{
public PhoneButton _hoveredButton;
public List<PhoneButton> _phoneButtons = new();
public bool _running = false;
public Player _player;
public Contact _loadedContact;
public CallButton _callButton;
public RichTextLabel _debug;
public override void _Ready()
@@ -16,15 +15,6 @@ public partial class Phone : Sprite2D
_debug = GetNode<RichTextLabel>("Debug");
_callButton = GetNode<CallButton>("CallButton");
_callButton._phone = this;
_phoneButtons = GetChildren().Where(c=>c is PhoneButton).Cast<PhoneButton>().ToList();
for (int i = 0; i < _phoneButtons.Count; i++)
{
_phoneButtons[i]._phone = this;
}
_phoneButtons[0]._contact = new SlideBack2();
_phoneButtons[1]._contact = new Rotate90();
_phoneButtons[2]._contact = new Swap1And6();
_phoneButtons[3]._contact = new Shift1ColumnRight();
}
public override void _Process(double DELTA_)
@@ -32,27 +22,27 @@ public partial class Phone : Sprite2D
// _hoveredButton = _phoneButtons.FirstOrDefault(c => c._isHovered, null);
}
public void CallLoadedContact()
{
_loadedContact.CallAction();
ResetContact();
}
// public void CallLoadedContact()
// {
// _loadedContact.CallAction();
// ResetContact();
// }
public void LoadContact(Contact CONTACT)
// public void LoadContact(Contact CONTACT)
// {
// _loadedContact = CONTACT;
// _debug.Text = _loadedContact.GetType().ToString();
// }
public virtual void HangUp()
{
_loadedContact = CONTACT;
_debug.Text = _loadedContact.GetType().ToString();
_running = false;
}
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);
}
}
public void ResetContact()
@@ -60,4 +50,9 @@ public partial class Phone : Sprite2D
// _loadedContact = null;
// _debug.Text = "";
}
public virtual void Begin()
{
_running = true;
}
}

View File

@@ -1,37 +0,0 @@
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");
}
public override void _Pressed()
{
base._Pressed();
_phone.LoadContact(_contact);
}
// private void OnMouseEntered()
// {
// _isHovered = true;
// EmitSignal(SignalName.Hover, this, _isHovered);
// }
// private void OnMouseExited()
// {
// _isHovered = false;
// EmitSignal(SignalName.Hover, this, _isHovered);
// }
}

View File

@@ -1 +0,0 @@
uid://cd1nniv27ef2f

View File

@@ -12,7 +12,6 @@ public partial class Player : Actor
public Boss _boss;
public Enemy _activeEnemy;
public RichTextLabel _debug, _busDebug;
public List<BusinessCard> _businessCards;
public override void _Ready()
{
@@ -26,23 +25,6 @@ public partial class Player : Actor
_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);
if (_businessCards[i].Name.ToString().IndexOf("Default") > -1)
{
string goalNameString = _businessCards[i].Name.ToString().Replace("Default","").Replace("Alt","");
GoalName goalName;
Enum.TryParse(goalNameString, out goalName);
_businessCards[i].AssignGoal(goalName);
}
else
{
_businessCards[i].AssignRandomGoal();
}
}
Challenge(_boss);
}
@@ -53,7 +35,6 @@ public partial class Player : Actor
ENEMY._board.Activate();
_board = ENEMY._board;
_activeEnemy = ENEMY;
CheckGoals();
string text = "";
if (_activeEnemy is Mook)
@@ -67,11 +48,6 @@ public partial class Player : Actor
_debug.Text = text;
}
public void CheckGoals()
{
_businessCards.ForEach(b=>b.CheckGoal());
}
public void RunLost()
{
_debug.Text = "YOU LOSE!!";
@@ -82,13 +58,18 @@ public partial class Player : Actor
_debug.Text = "YOU WIN!!";
}
// public bool CheckWin(List<Cell> CELLS)
public void StartBattle()
{
_phone.Begin();
}
// public bool CheckWin(List<Shield> SHIELDS)
// {
// 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))
// // if (condList.All(a=>SHIELDS.FirstOrDefault<Shield>(c=>c._address == a, null)?._owner == this))
// // {
// // return true;
// // }
@@ -96,10 +77,10 @@ public partial class Player : Actor
// }
// return false;
// }
// public void MarkCell(Cell CELL)
// public void MarkShield(Shield SHIELD)
// {
// CELL._mark.Texture = _mark.Texture;
// // CELL._owner = this;
// SHIELD._mark.Texture = _mark.Texture;
// // SHIELD._owner = this;
// }
public override void _Process(double delta)

66
Gameplay/Shield.cs Normal file
View File

@@ -0,0 +1,66 @@
using Godot;
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
public partial class Shield : TextureButton
{
public bool _isHovered = false, _isPressed = false, _isDisabled = false, _isFocused = false, _locked = false, _destroyed = false, _broken = false;
public int _address, _durability;
public Enemy _owner, _tenant;
public Actor _marker;
public Sprite2D _regularMark, _brokenMark;
public Board _board;
public override void _Ready()
{
_regularMark = GetNode<Sprite2D>("RegularMark");
_brokenMark = GetNode<Sprite2D>("BrokenMark");
_durability = 100;
}
public override void _Pressed()
{
base._Pressed();
_owner.ClickShield(this);
}
public override void _Process(double DELTA)
{
base._Process(DELTA); //
}
public void Break()
{
_broken = true;
TextureNormal = TexturePressed = TextureHover = TextureDisabled = TextureFocused = _brokenMark.Texture;
}
public void ChangeHealth(int CHANGE_AMOUNT)
{
_durability += CHANGE_AMOUNT;
if (!_broken)
{
if (_durability <= 0)
{
Break();
}
}
}
public void Disable(bool DISABLED)
{
SetProcess(!DISABLED);
}
// public void Mark(Actor MARKER = null)
// {
// _marker = MARKER;
// TextureNormal = (MARKER == null ? _defaultMark : MARKER._markNormal).Texture;
// TexturePressed = (MARKER == null ? _defaultMark : MARKER._markPressed).Texture;
// TextureHover = (MARKER == null ? _defaultMark : MARKER._markHovered).Texture;
// TextureDisabled = (MARKER == null ? _defaultMark : MARKER._markDisabled).Texture;
// TextureFocused = (MARKER == null ? _defaultMark : MARKER._markFocused).Texture;
// }
}

View File

@@ -1,63 +1,27 @@
[gd_scene load_steps=4 format=3 uid="uid://jkmo1fb2ohv4"]
[gd_scene 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"]
[ext_resource type="PackedScene" uid="uid://b32djog2mowgw" path="res://Gameplay/shield.tscn" id="3_ucn0m"]
[node name="Board" type="Sprite2D"]
[node name="Board" type="Sprite2D" unique_id=816918439]
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="Shield0" parent="." unique_id=1408990258 instance=ExtResource("3_ucn0m")]
[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="Shield1" parent="." unique_id=1099937150 instance=ExtResource("3_ucn0m")]
[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="Shield2" parent="." unique_id=555260924 instance=ExtResource("3_ucn0m")]
[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="Shield3" parent="." unique_id=1428089072 instance=ExtResource("3_ucn0m")]
[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="Shield4" parent="." unique_id=1268807490 instance=ExtResource("3_ucn0m")]
[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="Shield5" parent="." unique_id=646412611 instance=ExtResource("3_ucn0m")]
[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="Shield6" parent="." unique_id=1387360377 instance=ExtResource("3_ucn0m")]
[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="Shield7" parent="." unique_id=949001958 instance=ExtResource("3_ucn0m")]
[node name="Cell9" parent="." instance=ExtResource("3_s74v7")]
offset_left = 100.0
offset_top = 100.0
offset_right = 300.0
offset_bottom = 300.0
[node name="Shield8" parent="." unique_id=1837156402 instance=ExtResource("3_ucn0m")]

View File

@@ -1,15 +0,0 @@
[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"]
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")]

View File

@@ -1,10 +1,9 @@
[gd_scene load_steps=3 format=3 uid="uid://dh1oddbsjpysy"]
[gd_scene format=3 uid="uid://dh1oddbsjpysy"]
[ext_resource type="Texture2D" uid="uid://4hculjnuw6ha" path="res://Art/capsule-fill.svg" id="1_r2s83"]
[ext_resource type="Script" uid="uid://bis1fw8peln2x" path="res://Gameplay/CallButton.cs" id="2_r2s83"]
[node name="CallButton" type="TextureButton"]
modulate = Color(1, 1, 1, 0.2)
[node name="CallButton" type="TextureButton" unique_id=1775063306]
offset_right = 800.0
offset_bottom = 800.0
texture_normal = ExtResource("1_r2s83")

View File

@@ -1,17 +0,0 @@
[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="."]

View File

@@ -1,6 +0,0 @@
[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")

View File

@@ -1,92 +1,21 @@
[gd_scene load_steps=5 format=3 uid="uid://yaybgshgeb3d"]
[gd_scene 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"]
[ext_resource type="PackedScene" uid="uid://dh1oddbsjpysy" path="res://Gameplay/call_button.tscn" id="4_e164q"]
[node name="Phone" type="Sprite2D"]
[node name="Phone" type="Sprite2D" unique_id=1047098805]
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)
[node name="CallButton" parent="." instance=ExtResource("4_e164q")]
[node name="CallButton" parent="." unique_id=1818383224 instance=ExtResource("4_e164q")]
offset_left = -199.0
offset_top = 123.0
offset_right = 601.0
offset_bottom = 923.0
scale = Vector2(0.13, 0.13)
[node name="Debug" type="RichTextLabel" parent="."]
[node name="Debug" type="RichTextLabel" parent="." unique_id=880177536]
offset_left = -209.0
offset_top = -339.0
offset_right = 225.0

View File

@@ -1,20 +0,0 @@
[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)

View File

@@ -1,250 +1,44 @@
[gd_scene load_steps=8 format=3 uid="uid://b7vhq2dkltsv"]
[gd_scene 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://Gameplay/Player.cs" id="1_enp12"]
[ext_resource type="Script" uid="uid://dth2vcgkp7iq0" path="res://Gameplay/Player.cs" id="1_ehowo"]
[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"]
[ext_resource type="Texture2D" uid="uid://dvu33m28odcl0" path="res://Art/DiagonalArrow.png" id="6_ehowo"]
[ext_resource type="Texture2D" uid="uid://c6q55ex5d5wgi" path="res://Art/RowColArrow.png" id="7_cbnuf"]
[node name="Player" type="Sprite2D"]
script = ExtResource("1_enp12")
[node name="Player" type="Sprite2D" unique_id=1405686835]
script = ExtResource("1_ehowo")
[node name="Phone" parent="." instance=ExtResource("4_1d6nn")]
[node name="Phone" parent="." unique_id=678155199 instance=ExtResource("4_1d6nn")]
position = Vector2(1600, 540)
scale = Vector2(0.5, 0.5)
[node name="Boss" parent="." instance=ExtResource("5_lfxdo")]
[node name="Boss" parent="." unique_id=1895743924 instance=ExtResource("5_lfxdo")]
position = Vector2(960, 540)
[node name="MarkNormal" type="Sprite2D" parent="."]
[node name="MarkNormal" type="Sprite2D" parent="." unique_id=759198183]
visible = false
texture = ExtResource("1_c6108")
[node name="MarkPressed" type="Sprite2D" parent="."]
[node name="MarkPressed" type="Sprite2D" parent="." unique_id=72909600]
visible = false
texture = ExtResource("1_c6108")
[node name="MarkHovered" type="Sprite2D" parent="."]
[node name="MarkHovered" type="Sprite2D" parent="." unique_id=2067076280]
visible = false
texture = ExtResource("1_c6108")
[node name="MarkDisabled" type="Sprite2D" parent="."]
[node name="MarkDisabled" type="Sprite2D" parent="." unique_id=2116780469]
visible = false
texture = ExtResource("1_c6108")
[node name="MarkFocused" type="Sprite2D" parent="."]
[node name="MarkFocused" type="Sprite2D" parent="." unique_id=1765829402]
visible = false
texture = ExtResource("1_c6108")
[node name="Debug" type="RichTextLabel" parent="."]
[node name="Debug" type="RichTextLabel" parent="." unique_id=474408926]
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
[node name="DefaultDiagonal1To9" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 610.0
offset_top = 190.0
offset_right = 660.0
offset_bottom = 240.0
texture_normal = ExtResource("6_ehowo")
texture_pressed = ExtResource("6_ehowo")
texture_hover = ExtResource("6_ehowo")
texture_disabled = ExtResource("6_ehowo")
texture_focused = ExtResource("6_ehowo")
[node name="DefaultTopRow" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 610.0
offset_top = 440.0
offset_right = 810.0
offset_bottom = 490.0
rotation = 4.71239
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultMiddleRow" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 610.0
offset_top = 640.0
offset_right = 810.0
offset_bottom = 690.0
rotation = 4.71239
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultBottomRow" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 610.0
offset_top = 840.0
offset_right = 810.0
offset_bottom = 890.0
rotation = 4.71239
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultLeftColumn" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 660.0
offset_top = 190.0
offset_right = 860.0
offset_bottom = 240.0
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultMiddleColumn" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 860.0
offset_top = 190.0
offset_right = 1060.0
offset_bottom = 240.0
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultRightColumn" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 1060.0
offset_top = 190.0
offset_right = 1260.0
offset_bottom = 240.0
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultDiagonal3To7" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 1310.0
offset_top = 190.0
offset_right = 1360.0
offset_bottom = 240.0
rotation = 1.5708
texture_normal = ExtResource("6_ehowo")
texture_pressed = ExtResource("6_ehowo")
texture_hover = ExtResource("6_ehowo")
texture_disabled = ExtResource("6_ehowo")
texture_focused = ExtResource("6_ehowo")
[node name="DefaultTopRowAlt" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 1310.0
offset_top = 240.0
offset_right = 1510.0
offset_bottom = 290.0
rotation = 1.5708
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultMiddleRowAlt" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 1310.0
offset_top = 440.0
offset_right = 1510.0
offset_bottom = 490.0
rotation = 1.5708
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultBottomRowAlt" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 1310.0
offset_top = 640.0
offset_right = 1510.0
offset_bottom = 690.0
rotation = 1.5708
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultDiagonal1To9Alt" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 1310.0
offset_top = 890.0
offset_right = 1360.0
offset_bottom = 940.0
rotation = 3.14159
texture_normal = ExtResource("6_ehowo")
texture_pressed = ExtResource("6_ehowo")
texture_hover = ExtResource("6_ehowo")
texture_disabled = ExtResource("6_ehowo")
texture_focused = ExtResource("6_ehowo")
[node name="DefaultDiagonal3To7Alt" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 610.0
offset_top = 890.0
offset_right = 660.0
offset_bottom = 940.0
rotation = 4.71239
texture_normal = ExtResource("6_ehowo")
texture_pressed = ExtResource("6_ehowo")
texture_hover = ExtResource("6_ehowo")
texture_disabled = ExtResource("6_ehowo")
texture_focused = ExtResource("6_ehowo")
[node name="DefaultLeftColumnAlt" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 860.0
offset_top = 890.0
offset_right = 1060.0
offset_bottom = 940.0
rotation = 3.14159
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultMiddleColumnAlt" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 1062.0
offset_top = 889.0
offset_right = 1262.0
offset_bottom = 939.0
rotation = 3.14159
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="DefaultRightColumnAlt" parent="." instance=ExtResource("5_ek8wa")]
offset_left = 1260.0
offset_top = 890.0
offset_right = 1460.0
offset_bottom = 940.0
rotation = 3.14159
texture_normal = ExtResource("7_cbnuf")
texture_pressed = ExtResource("7_cbnuf")
texture_hover = ExtResource("7_cbnuf")
texture_disabled = ExtResource("7_cbnuf")
texture_focused = ExtResource("7_cbnuf")
[node name="BusDebug" type="RichTextLabel" parent="."]
offset_top = 276.0
offset_right = 322.0
offset_bottom = 429.0
theme_override_font_sizes/normal_font_size = 32
text = "BusDEBUG"
horizontal_alignment = 1
vertical_alignment = 1

24
Gameplay/shield.tscn Normal file
View File

@@ -0,0 +1,24 @@
[gd_scene format=3 uid="uid://b32djog2mowgw"]
[ext_resource type="Texture2D" uid="uid://3agkku8rqvmj" path="res://Art/reg_shield.png" id="1_j8jvf"]
[ext_resource type="Script" uid="uid://pg7mpir3ewhw" path="res://Gameplay/Shield.cs" id="2_53x4r"]
[ext_resource type="Texture2D" uid="uid://b5oc4f3gxijq5" path="res://Art/broken_shield.png" id="3_tgx6c"]
[node name="Shield" type="TextureButton" unique_id=1408990258]
modulate = Color(1, 1, 1, 0.2)
offset_right = 200.0
offset_bottom = 200.0
texture_normal = ExtResource("1_j8jvf")
texture_pressed = ExtResource("1_j8jvf")
texture_hover = ExtResource("1_j8jvf")
texture_disabled = ExtResource("1_j8jvf")
texture_focused = ExtResource("1_j8jvf")
script = ExtResource("2_53x4r")
[node name="RegularMark" type="Sprite2D" parent="." unique_id=1684344431]
visible = false
texture = ExtResource("1_j8jvf")
[node name="BrokenMark" type="Sprite2D" parent="." unique_id=1605725110]
visible = false
texture = ExtResource("3_tgx6c")