Exemple #1
0
    private void Update()
    {
        scene         = SceneManager.GetActiveScene();
        battleManager = GameObject.FindObjectOfType <Sc_BattleManager>();
        gameManager   = GameObject.FindObjectOfType <Sc_GameManager>();
        navManager    = GameObject.FindObjectOfType <Sc_NavigationManager>();


/*
 *      if (Input.GetKeyDown(KeyCode.T) == true)
 *      {
 *
 *
 *
 *      }
 *      if (Input.GetKeyDown(KeyCode.S) == true)
 *      {
 *
 *
 *
 *          SaveGameData();
 *      }
 *
 *      if (Input.GetKeyDown(KeyCode.L) == true)
 *      {
 *          LoadGameData();
 *      }*/
    }
 public override void FirstEventFunction()
 {
     if (firstNumberRestore != 0)
     {
         Sc_NavigationManager navigationManager = GameObject.FindObjectOfType <Sc_NavigationManager>();
         navigationManager.Restore(firstNumberRestore);
     }
 }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        eventDataBase     = GameObject.FindObjectOfType <Sc_EventDataBase>();
        gameManger        = GameObject.FindObjectOfType <Sc_GameManager>();
        navigationManager = GameObject.FindObjectOfType <Sc_NavigationManager>();
        cardDataBase      = GameObject.FindObjectOfType <Sc_CardDataBase>();
        SpriteRenderer backgroundSR = this.GetComponent <SpriteRenderer>();

        currentEvent  = eventDataBase.FindEventByID(Eventid);
        title         = this.gameObject.transform.GetChild(0).gameObject;
        numberOfCards = this.gameObject.transform.GetChild(1).gameObject;
        TextMesh titleText = title.GetComponent <TextMesh>();

        if (OptionNumber == 0)
        {
            titleText.text      = currentEvent.decriptionFirstEvent;
            backgroundSR.sprite = currentEvent.FirstEventImage;

            TextMesh numberOfCardsText = numberOfCards.GetComponent <TextMesh>();
            numberOfCardsText.text = currentEvent.cardsFirstEvent.Count + "";
        }
        else if (OptionNumber == 1)
        {
            titleText.text      = currentEvent.decriptionSecondEvent;
            backgroundSR.sprite = currentEvent.TwoEventImage;
            TextMesh numberOfCardsText = numberOfCards.GetComponent <TextMesh>();
            numberOfCardsText.text = currentEvent.cardsSecondEvent.Count + "";
        }
        else if (OptionNumber == 2)
        {
            titleText.text      = currentEvent.decriptionThirdEvent;
            backgroundSR.sprite = currentEvent.ThreeEventImage;
            TextMesh numberOfCardsText = numberOfCards.GetComponent <TextMesh>();
            numberOfCardsText.text = currentEvent.cardsThirdEvent.Count + "";
        }
        // set the image
    }