2019-04-28 14:28:31 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class PlayerAttack : MonoBehaviour
|
|
|
|
{
|
2019-04-28 14:34:50 +00:00
|
|
|
protected EntityPlayer player;
|
2019-04-28 14:28:31 +00:00
|
|
|
protected GameObject gameController;
|
|
|
|
protected TurnHandler turnHandler;
|
|
|
|
protected Map map;
|
|
|
|
|
|
|
|
protected void Start() {
|
2019-04-28 14:34:50 +00:00
|
|
|
player = GetComponent<EntityPlayer>();
|
2019-04-28 14:28:31 +00:00
|
|
|
gameController = GameObject.FindGameObjectWithTag("GameController");
|
|
|
|
turnHandler = gameController.GetComponentInChildren<TurnHandler>();
|
|
|
|
map = gameController.GetComponentInChildren<Map>();
|
|
|
|
}
|
|
|
|
|
|
|
|
public virtual bool Attack(Vector2Int target) {
|
|
|
|
//Returns if the attack was successful.
|
|
|
|
Debug.LogWarning("Attack not overridden");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|