Example #1
0
 public void SetFermaLocationPlace(FermaLocationPlace place)
 {
     this.place           = place;
     fermaMissionEmmitter = GlobalOptions.GetMissionEmmitters().GetFermaMissionEmmitter();
     fermaMissionEmmitter.AddFermaMissionEmmitterListener(this);
     UpdateData();
 }
Example #2
0
 public override void SetFermaLocationPlace(FermaLocationPlace place)
 {
     base.SetFermaLocationPlace(place);
     fermaMissions.SetFermaLocationPlace(place);
     crmFont.text = place.factoryName;
     factoryMissionsHeader.text = place.factoryName + " missions";
     buttonPlay.ShowTutorialArrowsAndGetPlace();
 }
Example #3
0
 public void ShowTutorialArrowsAndGetPlace()
 {
     place = dialogFerma.GetFermaLocationPlace();
     if (!place.playedOneTime)
     {
         tutorial = Instantiate(initTutorial) as GameObject;
         tutorial.transform.position = new Vector3(singleTransform.position.x, singleTransform.position.y, -1.1f);
         tutorial.transform.parent   = singleTransform;
     }
 }
Example #4
0
 public void DialogOpened(FermaLocationPlace place)
 {
     for (int i = 0; i < places.Length; i++)
     {
         FermaLocationPlace plac = places[i];
         if (place != plac)
         {
             plac.Cancel();
         }
     }
 }
Example #5
0
 private void ShowDialog(DialogFerma dialogFermaPrefab, FermaLocationPlace place)
 {
     if (dialogFermaShown)
     {
         return;
     }
     dialogFermaShown = true;
     dialogFerma      = Instantiate(dialogFermaPrefab) as DialogFerma;
     dialogFerma.SetFermaLocationPlace(place);
     dialogFerma.singleTransform.localPosition = Vector3.zero;
     dialogFerma.Show();
 }
Example #6
0
    void Start()
    {
        for (int i = 0; i < places.Length; i++)
        {
            FermaLocationPlace fact = places[i];
            placesDictionary.Add(fact.name, fact);
            fact.SetFerma(this);
        }

        FermaLocationPlace place = placesDictionary[PersonInfo.lastFactoryName] as FermaLocationPlace;

        if (place != null)
        {
            GetComponent <ZoomMap>().SetPos(new Vector3(-place.singleTransform.localPosition.x, -place.singleTransform.localPosition.y, singleTransform.position.z));
            //place.ShowPlayDialog();
        }
    }
Example #7
0
 public override void SetFermaLocationPlace(FermaLocationPlace place)
 {
     base.SetFermaLocationPlace(place);
     if (place.needLevel > PersonInfo.personLevel)
     {
         money.SetActive(false);
         errorText.gameObject.SetActive(true);
         errorText.text = string.Format("You need {0} level", place.needLevel);
         buyButton.SetActive(false);
     }
     else
     {
         money.SetActive(true);
         priceValue.text = string.Format("{0}", place.price);
         errorText.gameObject.SetActive(false);
         buyButton.SetActive(true);
     }
 }
Example #8
0
 public void ShowPlayDialog(FermaLocationPlace place)
 {
     ShowDialog(dialogFermaPlayPrefab, place);
 }
Example #9
0
 public void SetFermaLocationPlace(FermaLocationPlace fermaLocationPlace)
 {
     this.fermaLocationPlace = fermaLocationPlace;
 }
Example #10
0
 public virtual void SetFermaLocationPlace(FermaLocationPlace place)
 {
     this.place = place;
 }