Пример #1
0
        public void LoadNewGame()
        {
            Party = new Party(Data);

            _menuState = new MenuState(this);
            _menuState.Init();

            SetState(_menuState);
        }
Пример #2
0
        public void LoadSavedGame(int save)
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(Path.Combine(SavePath, GetSaveFilePath(save)));
            XmlNode saveGame = doc.SelectSingleNode("*");


            Party = new Party(Data, saveGame);


            _menuState = new MenuState(this);
            _menuState.Init();

            SetState(_menuState);
            //TestPostBattleState();
        }
Пример #3
0
    /// <summary>
    /// Fade menu elements out and change to fade in.
    /// </summary>
    public override void Update()
    {
        float speed = Time.deltaTime * 10f;

        for (int i = 0; i < transforms.Length; i++)
        {
            transforms[i].localPosition = Vector3.Lerp(transforms[i].localPosition, new Vector3(0f, 0f, 0f), speed);
        }
        for (int i = 0; i < renderers.Length; i++)
        {
            renderers[i].color = Color.Lerp(renderers[i].color, new Color(1, 1, 1, 0), speed);
        }

        if (renderers[0].color.a < 0.1)
        {
            state.Init();
            cc.menuSettingState = new MenuStateFadeIn(cc, state);
        }
    }
Пример #4
0
    void Start()
    {
        menu    = transform.GetChild(0).gameObject;
        cursor  = menu.transform.GetChild(0).gameObject;
        setting = menu.transform.GetChild(1).gameObject;
        Transform choises = menu.transform.GetChild(2);

        choises1 = choises.GetChild(0).gameObject;
        choises2 = choises.GetChild(1).gameObject;
        choises3 = choises.GetChild(2).gameObject;
        choises4 = choises.GetChild(3).gameObject;
        back     = menu.transform.GetChild(3).GetChild(0).gameObject;

        display     = transform.GetChild(1).gameObject;
        displayText = display.transform.GetChild(0).GetChild(0).GetComponent <Text>();

        menuOpenState    = new MenuStateOpened(this);
        menuSettingState = new MenuStateMode(this);
        menuSettingState.Init();
    }