first commit
This commit is contained in:
40
Gameplay/Actor.cs
Normal file
40
Gameplay/Actor.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
public partial class Actor : Sprite2D
|
||||
{
|
||||
public Sprite2D _markNormal, _markPressed, _markHovered, _markDisabled, _markFocused;
|
||||
public Goal _goal;
|
||||
public Board _board;
|
||||
public override void _Ready()
|
||||
{
|
||||
_markNormal = GetNode<Sprite2D>("MarkNormal");
|
||||
_markPressed = GetNode<Sprite2D>("MarkPressed");
|
||||
_markHovered = GetNode<Sprite2D>("MarkHovered");
|
||||
_markDisabled = GetNode<Sprite2D>("MarkDisabled");
|
||||
_markFocused = GetNode<Sprite2D>("MarkFocused");
|
||||
}
|
||||
|
||||
// public List<List<int>> CheckGoals()
|
||||
// {
|
||||
// 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();
|
||||
// for (int i = 0; i < _goal._eligibleGoals.Count; i++)
|
||||
// {
|
||||
// Goal.GoalName goalName = _goal._eligibleGoals[i];
|
||||
// List<int> goal = _goal._conditions[goalName];
|
||||
// if (goal.All(n=>ownedCellAddresses.Contains(n)))
|
||||
// {
|
||||
// goalsMet.Add(goal);
|
||||
// }
|
||||
// }
|
||||
// return goalsMet;
|
||||
// }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user