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