Du kannst nicht mehr als 25 Themen auswählen
Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
|
- 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;
- }
|