예제 #1
0
    public void setup(AIPersonalityType value, HomeScreenController controller)
    {
        this.homeScreenController = controller;
        this.value = value;
        Text myText = this.transform.GetChild(0).GetComponent <Text>();

        myText.text = this.value.ToString();
    }
 public void updatePersonality(AiPersonalityButton personalityButton)
 {
     this.aIPersonality = personalityButton.value;
     foreach (AiPersonalityButton b in this.aiPersonalityTypeButtons)
     {
         b.forceTurnOn();
     }
     personalityButton.forceTurnOff();
 }
예제 #3
0
    private BuildingGS modifyGameStateForPersonality(BuildingGS targetGsHuman, AIPersonalityType aiPersonality)
    {
        switch (aiPersonality)
        {
        case AIPersonalityType.GoldDigger:
            targetGsHuman.setStockpile(ResourceType.Gold, targetGsHuman.getStockpile(ResourceType.Gold) * 2);
            targetGsHuman.addResourcePerTick(ResourceType.Gold, targetGsHuman.getChangePerTick(ResourceType.Gold) * 2);
            break;

        case AIPersonalityType.Pragmatist:
            foreach (ResourceType rt in targetGsHuman.getStockpileResourceTypes())
            {
                targetGsHuman.setStockpile(rt, (int)(targetGsHuman.getStockpile(rt) * 1.3));
            }
            break;

        case AIPersonalityType.Warrior:
        case AIPersonalityType.ScienceGeek:
        case AIPersonalityType.Conservative:
        default:
            break;
        }
        return(targetGsHuman);
    }