public Temple(TempleName newName, int newCost, string desc, Faction newFaction)
    {
        name        = newName;
        cost        = newCost;
        description = desc;
        portrait    = newName.ToString();
        faction     = newFaction;
        MakeUnit();

        unit.Reset();
    }
 public bool BuyTemple(GameObject node, TempleName templeName)
 {
     if (node && node.GetComponent <Node>() && node.GetComponent <Node>().owner == gameObject && templeBlueprints.ContainsKey(templeName) && money >= templeBlueprints[templeName].cost)
     {
         print("node name:" + node.name);
         //print("temple name:" + templeName);
         //print("temple:" + templeBlueprints[templeName]);
         node.GetComponent <Node>().BuildTemple(templeBlueprints[templeName]);
         money -= templeBlueprints[templeName].cost;
         return(true);
     }
     return(false);
 }
Exemple #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;
 }
Exemple #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;
 }
Exemple #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;
 }
Exemple #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;
 }
Exemple #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;
 }