Esempio n. 1
0
    // Use this for initialization
    private void Start()
    {
        this.villageStats = this.VillageStats.GetComponent <VillageStats>();
        this.clock        = this.Clock.GetComponent <Clock>();
        this.terrorBank   = this.TerrorBank.GetComponent <TerrorBank>();

        this.player = this.LoadPlayer();

        if (this.IsTesting)
        {
            this.terrorBank.AddTerror(this.ExtraTerror);
            return;
        }
        var extraTerror = this.player.Levels
                          .Where(l => l.LevelNumber < this.CurrentLevel)
                          .Sum(l => l.TerrorRating);

        this.terrorBank.AddTerror(extraTerror);
    }
Esempio n. 2
0
 void Start()
 {
     villageStats = FindObjectOfType<VillageStats>();
     image = GetComponent<Image>();
     image.sprite = unachieved;
 }
Esempio n. 3
0
    // Use this for initialization
    private void Start()
    {
        this.villageStats = this.VillageStats.GetComponent<VillageStats>();
        this.clock = this.Clock.GetComponent<Clock>();
        this.terrorBank = this.TerrorBank.GetComponent<TerrorBank>();

        this.player = this.LoadPlayer();

        if(this.IsTesting)
        {
            this.terrorBank.AddTerror(this.ExtraTerror);
            return;
        }
        var extraTerror = this.player.Levels
            .Where(l => l.LevelNumber < this.CurrentLevel)
            .Sum(l => l.TerrorRating);
        this.terrorBank.AddTerror(extraTerror);
    }
Esempio n. 4
0
 private void OnVillageSelect(GameObject o)
 {
     Show();
     _stats = o.GetComponent <VillageStats>();
 }
Esempio n. 5
0
 void Start()
 {
     textWidget = GetComponent<UnityEngine.UI.Text>();
     villageStats = FindObjectOfType<VillageStats>();
 }
Esempio n. 6
0
 void Start()
 {
     villageStats = FindObjectOfType <VillageStats>();
     image        = GetComponent <Image>();
     image.sprite = unachieved;
 }
Esempio n. 7
0
 void Start()
 {
     textWidget   = GetComponent <UnityEngine.UI.Text>();
     villageStats = FindObjectOfType <VillageStats>();
 }