first commit
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user