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:
@@ -10,6 +10,8 @@ public partial class Enemy : Actor
|
||||
public Cell _cell;
|
||||
public Enemy _owner;
|
||||
public List<GoalName> _defaultGoals = new();
|
||||
public List<GoalName> _goals = new();
|
||||
|
||||
|
||||
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;
|
||||
_owner._board.GetCellByTenant(this).Mark(_playerOpponent);
|
||||
_board._winningPattern = WINNING_PATTERN;
|
||||
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;
|
||||
_owner._board.GetCellByTenant(this).Mark(this);
|
||||
_board._winningPattern = WINNING_PATTERN;
|
||||
if (_owner != null)
|
||||
{
|
||||
_owner._board.GetCellByTenant(this).Mark(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
_playerOpponent.RunLost();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user