-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
998aa54
commit c997e07
Showing
7 changed files
with
146 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
using System.Collections; | ||
|
||
public class HeroAvatar : MonoBehaviour { | ||
|
||
public Text mana; | ||
public Image portrait; | ||
public Image heroPower; | ||
|
||
// Use this for initialization | ||
void Start () { | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update () { | ||
|
||
} | ||
|
||
|
||
|
||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
var entity = require('../entityManager') | ||
var heroUtil = require("../heroUtil"); | ||
|
||
exports.hero = { | ||
"name":"Hunter", | ||
"health":heroUtil.BASE_HERO_HEALTH, | ||
"mana": 0, | ||
"type":entity.HERO, | ||
"power":{ | ||
"targetType":entity.HERO, | ||
"cost":2 | ||
}, | ||
//A short note about IDS, THEY CANNOT CHANGE unless all files that use it change as a well, they are the only way to go from an instance of a entity to the file that they use | ||
"id":"testhero" | ||
} | ||
|
||
exports.attackPower = 2; | ||
|
||
exports.canUse = function (heroController, targetController, state) { | ||
var hero = state.controllers[heroController].hero; | ||
var target = state.controllers[targetController].hero; | ||
|
||
if(hero.mana >= hero.power.cost) | ||
{ | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
exports.validatePowerTarget = function (hero, target, state) { | ||
if(target.type == entity.HERO) | ||
{ | ||
|
||
} | ||
} | ||
|
||
exports.usePower = function (hero, target, state) { | ||
//This needs to be a rune | ||
// target.health -= exports.attackPower; | ||
} | ||
|
||
exports.needMoreTargetInfo = function () { | ||
return false; | ||
} | ||
//This is a for if an ability that self targets, IE, Hunter, Warlock, Paladin, Shaman | ||
exports.getTarget = function (controller, state) { | ||
var keys = Object.keys(state.controller); | ||
} |