public void assignData(MyCharacterModel model) { hp = model.hp; store = model.store; ammo = model.ammo; hpSlider.value = hp; hpText.text = hp.ToString(); }
public void assignData(MyCharacterModel model) { hp = model.hp; store = model.store; ammo = model.ammo; invisiblePower = model.invisiblePower; skillPower = model.skillPower; hpPower = model.hpPower; if (myTeam) { invisiblePower = false; skillPower = false; hpPower = false; } synchronizePowers(); }
public static MyCharacterModel toObject(DocumentSnapshot dict) { MyCharacterModel myCharacterModel = new MyCharacterModel(); myCharacterModel.index = dict.GetValue <int>("index"); myCharacterModel.ammo = dict.GetValue <int>("ammo"); myCharacterModel.charType = dict.GetValue <string>("charType"); myCharacterModel.hp = dict.GetValue <int>("hp"); myCharacterModel.posX = dict.GetValue <float>("posX"); myCharacterModel.posY = dict.GetValue <float>("posY"); myCharacterModel.store = dict.GetValue <List <int> >("store"); myCharacterModel.invisiblePower = dict.GetValue <bool>("invisiblePower"); myCharacterModel.hpPower = dict.GetValue <bool>("hpPower"); myCharacterModel.skillPower = dict.GetValue <bool>("skillPower"); myCharacterModel.newC = dict.GetValue <bool>("newC"); return(myCharacterModel); }