You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
- using SUISS.Core;
- using UnityEngine;
-
- public class RoadSelectionPopupState : PopupBaseState
- {
- public override void Enter(State oldState)
- {
- base.Enter(oldState);
- CIGTutorialManager instanceIfAvailable = SingletonMonobehaviour<CIGTutorialManager>.InstanceIfAvailable;
- if (instanceIfAvailable != null && instanceIfAvailable.state == CIGTutorialState.Road)
- {
- this.ShowTutorialDialog();
- }
- else
- {
- this.HideTutorialDialog();
- }
- }
-
- public override void Leave(State newState)
- {
- base.Leave(newState);
- this.HideTutorialDialog();
- }
-
- public void RoadClicked()
- {
- base.ClosePopup(delegate()
- {
- CityIsland.Current.StartBuildingRoad(this._roadPrefab);
- });
- }
-
- public void WalkwayClicked()
- {
- base.ClosePopup(delegate()
- {
- CityIsland.Current.StartBuildingRoad(this._walkwayPrefab);
- });
- }
-
- public void RiverClicked()
- {
- base.ClosePopup(delegate()
- {
- CityIsland.Current.StartBuildingRoad(this._riverPrefab);
- });
- }
-
- private void ShowTutorialDialog()
- {
- ((RoadSelectionPopupView)this.View).ShowTutorialDialog();
- }
-
- private void HideTutorialDialog()
- {
- ((RoadSelectionPopupView)this.View).HideTutorialDialog();
- }
-
- [SerializeField]
- private GameObject _roadPrefab;
-
- [SerializeField]
- private GameObject _walkwayPrefab;
-
- [SerializeField]
- private GameObject _riverPrefab;
- }
|