1
Fork 0
slime-blood-and-pain/Assets/Scripts/PlayerAttack.cs

24 lines
727 B
C#
Raw Normal View History

2019-04-28 14:28:31 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerAttack : MonoBehaviour
{
protected Player player;
protected GameObject gameController;
protected TurnHandler turnHandler;
protected Map map;
protected void Start() {
player = GetComponent<Player>();
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;
}
}