11 - Adding Power to the Game

添加 Power信息 没什么特别的 直接上代码

BatteryPickUp.h

11 - Adding Power to the Game_第1张图片
Paste_Image.png

BatteryPickUp.cpp

11 - Adding Power to the Game_第2张图片
Paste_Image.png

BatteryCollectorCharacter.h

添加protected 属性 InitialPower private 属性 CharacterPower

11 - Adding Power to the Game_第3张图片
Paste_Image.png

添加public get update方法

11 - Adding Power to the Game_第4张图片
Paste_Image.png

BatteryCollectorCharacter.cpp

11 - Adding Power to the Game_第5张图片
Paste_Image.png

你可能感兴趣的:(11 - Adding Power to the Game)