add runwon and runlost functions, default win cards, call button that calls a loaded contact, added rotatecells, shiftcells, and swapcells functions to actor, reworked address to be 0-8 instead of 1-9, added underscore naming convention to function parameters, business cards to be slightly transparent when not met, added actions to contacts and made a couple examples
This commit is contained in:
BIN
Art/DiagonalArrow.png
Normal file
BIN
Art/DiagonalArrow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1003 B |
34
Art/DiagonalArrow.png.import
Normal file
34
Art/DiagonalArrow.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dvu33m28odcl0"
|
||||||
|
path="res://.godot/imported/DiagonalArrow.png-81a7e688d85f1b93e37b2dd52d3288e3.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/DiagonalArrow.png"
|
||||||
|
dest_files=["res://.godot/imported/DiagonalArrow.png-81a7e688d85f1b93e37b2dd52d3288e3.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/RowColArrow.png
Normal file
BIN
Art/RowColArrow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 811 B |
34
Art/RowColArrow.png.import
Normal file
34
Art/RowColArrow.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c6q55ex5d5wgi"
|
||||||
|
path="res://.godot/imported/RowColArrow.png-e5c500cb2d2a9e324ea87decae2d824d.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Art/RowColArrow.png"
|
||||||
|
dest_files=["res://.godot/imported/RowColArrow.png-e5c500cb2d2a9e324ea87decae2d824d.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,7 +2,7 @@ using Godot;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
|
|
||||||
public partial class Actor : Sprite2D
|
public partial class Actor : Sprite2D
|
||||||
{
|
{
|
||||||
@@ -17,23 +17,80 @@ public partial class Actor : Sprite2D
|
|||||||
_markFocused = GetNode<Sprite2D>("MarkFocused");
|
_markFocused = GetNode<Sprite2D>("MarkFocused");
|
||||||
}
|
}
|
||||||
|
|
||||||
// public List<List<int>> CheckGoals()
|
// CALLABLE ACTIONS
|
||||||
// {
|
|
||||||
// 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();
|
public bool RotateCells(int ROTATIONS = 1, bool JUST_MARKS = false)
|
||||||
// for (int i = 0; i < _goal._eligibleGoals.Count; i++)
|
{
|
||||||
// {
|
List<Vector2> positions = new(_board._cells.Select(c=>c.Position).ToList());
|
||||||
// Goal.GoalName goalName = _goal._eligibleGoals[i];
|
List<int> addresses = new(_board._cells.Select(c=>c._address).ToList());
|
||||||
// List<int> goal = _goal._conditions[goalName];
|
Dictionary<int, int> cwShifts = new()
|
||||||
// if (goal.All(n=>ownedCellAddresses.Contains(n)))
|
{
|
||||||
// {
|
{0,1}, {1,2}, {2,5}, {3,0}, {4,4}, {5,8}, {6,3}, {7,6}, {8,7}
|
||||||
// goalsMet.Add(goal);
|
};
|
||||||
// }
|
Dictionary<int, int> ccwShifts = new()
|
||||||
// }
|
{
|
||||||
// return goalsMet;
|
{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 ShiftCells(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)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
List<Vector2> positions = new(_board._cells.Select(c=>c.Position).ToList());
|
||||||
|
Random random = new ();
|
||||||
|
if (CELL_A_ADDRESS == -1)
|
||||||
|
{
|
||||||
|
CELL_A_ADDRESS = random.Next(8);
|
||||||
|
}
|
||||||
|
if (CELL_B_ADDRESS == -1)
|
||||||
|
{
|
||||||
|
CELL_B_ADDRESS = random.Next(8);
|
||||||
|
while (CELL_B_ADDRESS == CELL_A_ADDRESS)
|
||||||
|
{
|
||||||
|
CELL_B_ADDRESS = random.Next(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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public partial class Board : Sprite2D
|
|||||||
_cells = GetChildren().Where(c=>c is Cell).Cast<Cell>().ToList();
|
_cells = GetChildren().Where(c=>c is Cell).Cast<Cell>().ToList();
|
||||||
for (int i = 0; i < _cells.Count; i++)
|
for (int i = 0; i < _cells.Count; i++)
|
||||||
{
|
{
|
||||||
_cells[i]._address = i+1;
|
_cells[i]._address = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,12 +88,15 @@ public partial class Board : Sprite2D
|
|||||||
|
|
||||||
public void RenumberCells()
|
public void RenumberCells()
|
||||||
{
|
{
|
||||||
_cells.OrderBy(c => c.Position.X).ThenBy(c => c.Position.Y).ToList();
|
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)));
|
||||||
|
|
||||||
for (int i = 0; i < _cells.Count; i++)
|
for (int i = 0; i < _cells.Count; i++)
|
||||||
{
|
{
|
||||||
Cell cell = _cells[i];
|
_cells[i]._address = i;
|
||||||
cell._address = i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ public partial class Boss : Enemy
|
|||||||
_dragons.ForEach(d=>d.PassPlayer(PLAYER));
|
_dragons.ForEach(d=>d.PassPlayer(PLAYER));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ClickCell(Cell CLICKEDCELL)
|
public override void ClickCell(Cell CLICKED_CELL)
|
||||||
{
|
{
|
||||||
_playerOpponent.Challenge(CLICKEDCELL._tenant);
|
_playerOpponent.Challenge(CLICKED_CELL._tenant);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,14 @@ public partial class BusinessCard : TextureButton
|
|||||||
List<Cell> ownedCells = _player._board.GetCellsByOwner(_player);
|
List<Cell> ownedCells = _player._board.GetCellsByOwner(_player);
|
||||||
List<int> addresses = _goal.GetAddresses(_goalName);
|
List<int> addresses = _goal.GetAddresses(_goalName);
|
||||||
_goalMet = addresses.All(a=>ownedCells.Select(c=>c._address).ToList().IndexOf(a)>-1);
|
_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)
|
public void PassPlayer(Player PLAYER)
|
||||||
|
|||||||
19
Gameplay/CallButton.cs
Normal file
19
Gameplay/CallButton.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public partial class CallButton : TextureButton
|
||||||
|
{
|
||||||
|
public bool _isHovered = false;
|
||||||
|
public Phone _phone;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
base._Ready();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _Pressed()
|
||||||
|
{
|
||||||
|
base._Pressed();
|
||||||
|
_phone.CallLoadedContact();
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/CallButton.cs.uid
Normal file
1
Gameplay/CallButton.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bis1fw8peln2x
|
||||||
@@ -11,6 +11,11 @@ public partial class Contact : Sprite2D
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void CallAction()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void PassNumber(int NUMBER)
|
public void PassNumber(int NUMBER)
|
||||||
{
|
{
|
||||||
_number = NUMBER;
|
_number = NUMBER;
|
||||||
@@ -19,5 +24,4 @@ public partial class Contact : Sprite2D
|
|||||||
{
|
{
|
||||||
_player = PLAYER;
|
_player = PLAYER;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
7
Gameplay/Contacts/Rotate90.cs
Normal file
7
Gameplay/Contacts/Rotate90.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
public partial class Rotate90 : Contact
|
||||||
|
{
|
||||||
|
public override void CallAction()
|
||||||
|
{
|
||||||
|
_player.RotateCells(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Contacts/Rotate90.cs.uid
Normal file
1
Gameplay/Contacts/Rotate90.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dtv3bqpuf0y33
|
||||||
7
Gameplay/Contacts/ShiftBack2.cs
Normal file
7
Gameplay/Contacts/ShiftBack2.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
public partial class ShiftBack2 : Contact
|
||||||
|
{
|
||||||
|
public override void CallAction()
|
||||||
|
{
|
||||||
|
_player.ShiftCells(-2);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Contacts/ShiftBack2.cs.uid
Normal file
1
Gameplay/Contacts/ShiftBack2.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://c14om0rrrui02
|
||||||
7
Gameplay/Contacts/Swap1And6.cs
Normal file
7
Gameplay/Contacts/Swap1And6.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
public partial class Swap1And6 : Contact
|
||||||
|
{
|
||||||
|
public override void CallAction()
|
||||||
|
{
|
||||||
|
_player.SwapCells(1-1,6-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
Gameplay/Contacts/Swap1And6.cs.uid
Normal file
1
Gameplay/Contacts/Swap1And6.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bl37rkfpucd5e
|
||||||
@@ -35,8 +35,8 @@ public partial class Dragon : Enemy
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ClickCell(Cell CLICKEDCELL)
|
public override void ClickCell(Cell CLICKED_CELL)
|
||||||
{
|
{
|
||||||
_playerOpponent.Challenge(CLICKEDCELL._tenant);
|
_playerOpponent.Challenge(CLICKED_CELL._tenant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ public partial class Enemy : Actor
|
|||||||
public Cell _cell;
|
public Cell _cell;
|
||||||
public Enemy _owner;
|
public Enemy _owner;
|
||||||
public List<GoalName> _defaultGoals = new();
|
public List<GoalName> _defaultGoals = new();
|
||||||
|
public List<GoalName> _goals = new();
|
||||||
|
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
@@ -49,20 +51,35 @@ public partial class Enemy : Actor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void ClickCell(Cell CLICKEDCELL)
|
public virtual void ClickCell(Cell CLICKED_CELL)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Defeat(GoalName WINNINGPATTERN)
|
public void Defeat(GoalName WINNING_PATTERN)
|
||||||
{
|
{
|
||||||
_board._winningPattern = WINNINGPATTERN;
|
_board._winningPattern = WINNING_PATTERN;
|
||||||
_owner._board.GetCellByTenant(this).Mark(_playerOpponent);
|
if (_owner != null)
|
||||||
|
{
|
||||||
|
_owner._board.GetCellByTenant(this).Mark(_playerOpponent);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_playerOpponent.RunWon();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Victory(GoalName WINNINGPATTERN)
|
public void Victory(GoalName WINNING_PATTERN)
|
||||||
{
|
{
|
||||||
_board._winningPattern = WINNINGPATTERN;
|
_board._winningPattern = WINNING_PATTERN;
|
||||||
_owner._board.GetCellByTenant(this).Mark(this);
|
if (_owner != null)
|
||||||
|
{
|
||||||
|
_owner._board.GetCellByTenant(this).Mark(this);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_playerOpponent.RunLost();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ public partial class Mook : Enemy
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ClickCell(Cell CLICKEDCELL)
|
public override void ClickCell(Cell CLICKED_CELL)
|
||||||
{
|
{
|
||||||
CLICKEDCELL.Mark(_playerOpponent);
|
CLICKED_CELL.Mark(_playerOpponent);
|
||||||
_playerOpponent.CheckGoals();
|
_playerOpponent.CheckGoals();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,20 +8,39 @@ public partial class Phone : Sprite2D
|
|||||||
public PhoneButton _hoveredButton;
|
public PhoneButton _hoveredButton;
|
||||||
public List<PhoneButton> _phoneButtons = new();
|
public List<PhoneButton> _phoneButtons = new();
|
||||||
public Player _player;
|
public Player _player;
|
||||||
|
public Contact _loadedContact;
|
||||||
|
public CallButton _callButton;
|
||||||
|
public RichTextLabel _debug;
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
|
_debug = GetNode<RichTextLabel>("Debug");
|
||||||
|
_callButton = GetNode<CallButton>("CallButton");
|
||||||
|
_callButton._phone = this;
|
||||||
_phoneButtons = GetChildren().Where(c=>c is PhoneButton).Cast<PhoneButton>().ToList();
|
_phoneButtons = GetChildren().Where(c=>c is PhoneButton).Cast<PhoneButton>().ToList();
|
||||||
for (int i = 0; i < _phoneButtons.Count; i++)
|
for (int i = 0; i < _phoneButtons.Count; i++)
|
||||||
{
|
{
|
||||||
_phoneButtons[i]._phone = this;
|
_phoneButtons[i]._phone = this;
|
||||||
}
|
}
|
||||||
|
_phoneButtons[0]._contact = new ShiftBack2();
|
||||||
|
_phoneButtons[1]._contact = new Rotate90();
|
||||||
|
_phoneButtons[2]._contact = new Swap1And6();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _Process(double DELTA_)
|
public override void _Process(double DELTA_)
|
||||||
{
|
{
|
||||||
// _hoveredButton = _phoneButtons.FirstOrDefault(c => c._isHovered, null);
|
// _hoveredButton = _phoneButtons.FirstOrDefault(c => c._isHovered, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CallLoadedContact()
|
||||||
|
{
|
||||||
|
_loadedContact.CallAction();
|
||||||
|
ResetContact();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadContact(Contact CONTACT)
|
||||||
|
{
|
||||||
|
_loadedContact = CONTACT;
|
||||||
|
_debug.Text = _loadedContact.GetType().ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PassPlayer(Player PLAYER)
|
public void PassPlayer(Player PLAYER)
|
||||||
@@ -34,4 +53,10 @@ public partial class Phone : Sprite2D
|
|||||||
_phoneButtons[i]._contact.PassNumber((i+1)%10);
|
_phoneButtons[i]._contact.PassNumber((i+1)%10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ResetContact()
|
||||||
|
{
|
||||||
|
// _loadedContact = null;
|
||||||
|
// _debug.Text = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,13 @@ public partial class PhoneButton : TextureButton
|
|||||||
_contact = GetNode<Contact>("Contact");
|
_contact = GetNode<Contact>("Contact");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void _Pressed()
|
||||||
|
{
|
||||||
|
base._Pressed();
|
||||||
|
_phone.LoadContact(_contact);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// private void OnMouseEntered()
|
// private void OnMouseEntered()
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://tk7fjdvu5c0u" path="res://Gameplay/goal.tscn" id="3_ejro6"]
|
[ext_resource type="PackedScene" uid="uid://tk7fjdvu5c0u" path="res://Gameplay/goal.tscn" id="3_ejro6"]
|
||||||
|
|
||||||
[node name="BusinessCard" type="TextureButton"]
|
[node name="BusinessCard" type="TextureButton"]
|
||||||
modulate = Color(1, 1, 1, 0.2)
|
|
||||||
texture_normal = ExtResource("1_8xr8s")
|
texture_normal = ExtResource("1_8xr8s")
|
||||||
texture_pressed = ExtResource("1_8xr8s")
|
texture_pressed = ExtResource("1_8xr8s")
|
||||||
texture_hover = ExtResource("1_8xr8s")
|
texture_hover = ExtResource("1_8xr8s")
|
||||||
|
|||||||
15
Gameplay/call_button.tscn
Normal file
15
Gameplay/call_button.tscn
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[gd_scene load_steps=3 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)
|
||||||
|
offset_right = 800.0
|
||||||
|
offset_bottom = 800.0
|
||||||
|
texture_normal = ExtResource("1_r2s83")
|
||||||
|
texture_pressed = ExtResource("1_r2s83")
|
||||||
|
texture_hover = ExtResource("1_r2s83")
|
||||||
|
texture_disabled = ExtResource("1_r2s83")
|
||||||
|
texture_focused = ExtResource("1_r2s83")
|
||||||
|
script = ExtResource("2_r2s83")
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
[gd_scene load_steps=4 format=3 uid="uid://yaybgshgeb3d"]
|
[gd_scene load_steps=5 format=3 uid="uid://yaybgshgeb3d"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://buee5y051op2" path="res://Art/phone.png" id="1_lrxfg"]
|
[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="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="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"]
|
||||||
texture = ExtResource("1_lrxfg")
|
texture = ExtResource("1_lrxfg")
|
||||||
@@ -77,3 +78,20 @@ offset_top = 565.0
|
|||||||
offset_right = 759.0
|
offset_right = 759.0
|
||||||
offset_bottom = 1365.0
|
offset_bottom = 1365.0
|
||||||
scale = Vector2(0.13, 0.13)
|
scale = Vector2(0.13, 0.13)
|
||||||
|
|
||||||
|
[node name="CallButton" parent="." 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="."]
|
||||||
|
offset_left = -209.0
|
||||||
|
offset_top = -339.0
|
||||||
|
offset_right = 225.0
|
||||||
|
offset_bottom = -30.0
|
||||||
|
theme_override_font_sizes/normal_font_size = 48
|
||||||
|
text = "DEBUG"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
[gd_scene load_steps=6 format=3 uid="uid://b7vhq2dkltsv"]
|
[gd_scene load_steps=8 format=3 uid="uid://b7vhq2dkltsv"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://c51oi06i4yrvv" path="res://Art/x.png" id="1_c6108"]
|
[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="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://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://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="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"]
|
[node name="Player" type="Sprite2D"]
|
||||||
script = ExtResource("1_enp12")
|
script = ExtResource("1_enp12")
|
||||||
@@ -51,100 +53,192 @@ offset_right = 298.0
|
|||||||
offset_bottom = 969.0
|
offset_bottom = 969.0
|
||||||
|
|
||||||
[node name="DefaultDiagonal1To9" parent="." instance=ExtResource("5_ek8wa")]
|
[node name="DefaultDiagonal1To9" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 461.0
|
offset_left = 610.0
|
||||||
offset_top = 41.0
|
offset_top = 190.0
|
||||||
offset_right = 661.0
|
offset_right = 660.0
|
||||||
offset_bottom = 241.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")]
|
[node name="DefaultTopRow" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 467.0
|
offset_left = 610.0
|
||||||
offset_top = 236.0
|
offset_top = 440.0
|
||||||
offset_right = 667.0
|
offset_right = 810.0
|
||||||
offset_bottom = 436.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")]
|
[node name="DefaultMiddleRow" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 461.0
|
offset_left = 610.0
|
||||||
offset_top = 437.0
|
offset_top = 640.0
|
||||||
offset_right = 661.0
|
offset_right = 810.0
|
||||||
offset_bottom = 637.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")]
|
[node name="DefaultBottomRow" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 458.0
|
offset_left = 610.0
|
||||||
offset_top = 637.0
|
offset_top = 840.0
|
||||||
offset_right = 658.0
|
offset_right = 810.0
|
||||||
offset_bottom = 837.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")]
|
[node name="DefaultLeftColumn" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 665.0
|
offset_left = 660.0
|
||||||
offset_top = 38.0
|
offset_top = 190.0
|
||||||
offset_right = 865.0
|
offset_right = 860.0
|
||||||
offset_bottom = 238.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")]
|
[node name="DefaultMiddleColumn" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 863.0
|
offset_left = 860.0
|
||||||
offset_top = 35.0
|
offset_top = 190.0
|
||||||
offset_right = 1063.0
|
offset_right = 1060.0
|
||||||
offset_bottom = 235.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")]
|
[node name="DefaultRightColumn" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 1061.0
|
offset_left = 1060.0
|
||||||
offset_top = 41.0
|
offset_top = 190.0
|
||||||
offset_right = 1261.0
|
offset_right = 1260.0
|
||||||
offset_bottom = 241.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")]
|
[node name="DefaultDiagonal3To7" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 1264.0
|
offset_left = 1310.0
|
||||||
offset_top = 44.0
|
offset_top = 190.0
|
||||||
offset_right = 1464.0
|
offset_right = 1360.0
|
||||||
offset_bottom = 244.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")]
|
[node name="DefaultTopRowAlt" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 1261.0
|
offset_left = 1310.0
|
||||||
offset_top = 236.0
|
offset_top = 240.0
|
||||||
offset_right = 1461.0
|
offset_right = 1510.0
|
||||||
offset_bottom = 436.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")]
|
[node name="DefaultMiddleRowAlt" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 1255.0
|
offset_left = 1310.0
|
||||||
offset_top = 434.0
|
offset_top = 440.0
|
||||||
offset_right = 1455.0
|
offset_right = 1510.0
|
||||||
offset_bottom = 634.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")]
|
[node name="DefaultBottomRowAlt" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 1261.0
|
offset_left = 1310.0
|
||||||
offset_top = 628.0
|
offset_top = 640.0
|
||||||
offset_right = 1461.0
|
offset_right = 1510.0
|
||||||
offset_bottom = 828.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")]
|
[node name="DefaultDiagonal1To9Alt" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 1264.0
|
offset_left = 1310.0
|
||||||
offset_top = 826.0
|
offset_top = 890.0
|
||||||
offset_right = 1464.0
|
offset_right = 1360.0
|
||||||
offset_bottom = 1026.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")]
|
[node name="DefaultDiagonal3To7Alt" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 467.0
|
offset_left = 610.0
|
||||||
offset_top = 829.0
|
offset_top = 890.0
|
||||||
offset_right = 667.0
|
offset_right = 660.0
|
||||||
offset_bottom = 1029.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")]
|
[node name="DefaultLeftColumnAlt" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 665.0
|
offset_left = 860.0
|
||||||
offset_top = 838.0
|
offset_top = 890.0
|
||||||
offset_right = 865.0
|
offset_right = 1060.0
|
||||||
offset_bottom = 1038.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")]
|
[node name="DefaultMiddleColumnAlt" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 869.0
|
offset_left = 1062.0
|
||||||
offset_top = 838.0
|
offset_top = 889.0
|
||||||
offset_right = 1069.0
|
offset_right = 1262.0
|
||||||
offset_bottom = 1038.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")]
|
[node name="DefaultRightColumnAlt" parent="." instance=ExtResource("5_ek8wa")]
|
||||||
offset_left = 1064.0
|
offset_left = 1260.0
|
||||||
offset_top = 838.0
|
offset_top = 890.0
|
||||||
offset_right = 1264.0
|
offset_right = 1460.0
|
||||||
offset_bottom = 1038.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="."]
|
[node name="BusDebug" type="RichTextLabel" parent="."]
|
||||||
offset_top = 276.0
|
offset_top = 276.0
|
||||||
|
|||||||
10
Player.cs
10
Player.cs
@@ -72,6 +72,16 @@ public partial class Player : Actor
|
|||||||
_businessCards.ForEach(b=>b.CheckGoal());
|
_businessCards.ForEach(b=>b.CheckGoal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RunLost()
|
||||||
|
{
|
||||||
|
_debug.Text = "YOU LOSE!!";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RunWon()
|
||||||
|
{
|
||||||
|
_debug.Text = "YOU WIN!!";
|
||||||
|
}
|
||||||
|
|
||||||
// public bool CheckWin(List<Cell> CELLS)
|
// public bool CheckWin(List<Cell> CELLS)
|
||||||
// {
|
// {
|
||||||
// foreach (Goal.GoalName cond in _goal._eligibleGoals)
|
// foreach (Goal.GoalName cond in _goal._eligibleGoals)
|
||||||
|
|||||||
Reference in New Issue
Block a user