Exemplo n.º 1
0
 public bool BuyAltar(GameObject node, AltarName altarName)
 {
     if (altarBlueprints.ContainsKey(altarName) && money >= altarBlueprints[altarName].cost)
     {
         node.GetComponent <Node>().BuildAltar(altarBlueprints[altarName]);
         money -= altarBlueprints[altarName].cost;
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
    public Altar(AltarName newName, int newCost, string desc)
    {
        name        = newName;
        cost        = newCost;
        description = desc;
        portrait    = newName.ToString();
        MakeUnit();

        unit.Reset();
    }
Exemplo n.º 3
0
 public AllocateOption(OptionType altarOption, float newUtility, int newCost, GameObject buildingNode, AltarName newname)
 {
     node         = buildingNode;
     army         = null;
     type         = altarOption;
     utility      = newUtility;
     cost         = newCost;
     unitIndex    = 0;
     oldUnitIndex = 0;
     unitPos      = new UnitPos();
     templeName   = TempleName.None;
     altarName    = newname;
 }
Exemplo n.º 4
0
 public AllocateOption(OptionType replenishOption, float newUtility, int newCost, GameObject armyToReplenish)
 {
     node         = null;
     army         = armyToReplenish;
     type         = replenishOption;
     utility      = newUtility;
     cost         = newCost;
     unitIndex    = 0;
     oldUnitIndex = 0;
     unitPos      = new UnitPos();
     templeName   = TempleName.None;
     altarName    = AltarName.None;
 }
Exemplo n.º 5
0
 public AllocateOption(OptionType replaceOption, float newUtility, int newCost, GameObject newArmy, int mapunitIndex, UnitPos position)
 {
     node         = null;
     army         = newArmy;
     type         = replaceOption;
     utility      = newUtility;
     cost         = newCost;
     unitIndex    = mapunitIndex;
     unitPos      = position;
     oldUnitIndex = 0;
     templeName   = TempleName.None;
     altarName    = AltarName.None;
 }
Exemplo n.º 6
0
 public AllocateOption(OptionType upgradeOption, float newUtility, int newCost, GameObject newArmy, int mapunitIndex, int oldIndex)
 {
     node         = null;
     army         = newArmy;
     type         = upgradeOption;
     utility      = newUtility;
     cost         = newCost;
     unitIndex    = mapunitIndex;
     oldUnitIndex = oldIndex;
     unitPos      = new UnitPos();
     templeName   = TempleName.None;
     altarName    = AltarName.None;
 }
Exemplo n.º 7
0
 public AllocateOption(OptionType prophetOption, float newUtility, int newCost)
 {
     node         = null;
     army         = null;
     type         = prophetOption;
     utility      = newUtility;
     cost         = newCost;
     unitIndex    = 0;
     oldUnitIndex = 0;
     unitPos      = new UnitPos();
     templeName   = TempleName.None;
     altarName    = AltarName.None;
 }