protected Data(Unit unit) { pos = unit.transform.position.WorldToArray(); armyColor = unit.army.color; minAttack = unit.minAttack; maxAttack = unit.maxAttack; defend = unit.defend; moveRange = unit.moveRange; cost = unit.cost; increase_exp_speed = unit.increase_exp_speed; experience = unit.experience; health = unit.health; poisonTurn = unit.poisonTurn; powerTurn = unit.powerTurn; isSleep = unit.isSleep; }
public bool IsLocalArmy(Army.Color color) { int id = PhotonNetwork.LocalPlayer.ActorNumber; if (id == -1) { return(true); } return(players.ContainsKey(id) && players[id] == color); }
private static void OnColorChanged(ArmyConfig cfg, Army.Color oldColor, Army.Color newColor) { var opt = new Dropdown.OptionData(oldColor.ToString()); foreach (var c in instance.armyConfigs) { if (c != cfg && c.isOn) { int index = c.colorList.IndexOf(newColor); c.colorList[index] = oldColor; c.selectColor.options[index] = opt; } } }
public Data(Battle battle) { turn = battle.turn; armyColor = battle.army.color; }