Commit 4f259094 authored by Jordan McKenney's avatar Jordan McKenney

Added a controller for determining what ability is selected when attack button is pressed

parent 5ee3e240
using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour {
enum ability {fireball, water, others };
private ability currentAbility = ability.fireball;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update(){
if (Input.GetButtonDown("Fire1")){
switch (currentAbility)
{
case ability.fireball:
Debug.Log("fireball");
break;
default:
Debug.Log("default");
break;
}
if (Input.GetButtonDown("Fire2")){
Debug.Log("melee");
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment