示例#1
0
 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;
 }
示例#2
0
        public bool IsLocalArmy(Army.Color color)
        {
            int id = PhotonNetwork.LocalPlayer.ActorNumber;

            if (id == -1)
            {
                return(true);
            }
            return(players.ContainsKey(id) && players[id] == color);
        }
示例#3
0
            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;
                    }
                }
            }
示例#4
0
 public Data(Battle battle)
 {
     turn      = battle.turn;
     armyColor = battle.army.color;
 }