Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class anHero
- {
- public var heroHP:Int;
- public var heroDamage:Int;
- public var heroName:String;
- public function anHero(name:String,initHP:Int = "100")
- {
- heroName = name;
- heroHP = initHP;
- }
- public function takeDamage(damageTaken:int):Void
- {
- heroHP = (heroHP - damageTaken)
- }
- }
Add Comment
Please, Sign In to add comment