5Y5T3M/Assets/Scripts/Player.cs

32 lines
982 B
C#

using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
/** Possible Moves:
* - NodeA to NodeB (connection built): move Units (will attack if NodeB is hostile; cant traverse multiple unclaimed nodes)
* - NodeA to NodeB (connection empty): build connection (-1 energy, takes 1 round)
* - NodeA to NodeB (connection under de/-construction): intervene by attacking (will destroy connection if succesfull)
* - Click connection: Option to Destruct (-1 energy, takes 1 round) or Blast (-2 energy, immediately) Connection
*
*
*/
public int id;
public int energyLeft;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public List<Node> GetOwnedNodes() => GameManager.Instance.GetNodes().FindAll(n => n.Owner == this.id);
}