void Start() { // 状态控制器对象 controller = new SceneStateController(); // 设置默认(当前)状态为开始状态,设置默认状态的时候是不需要加载场景的 controller.SetState(new StartState(controller), false); }
// Use this for initialization void Start() { sceneController = new SceneStateController(); sceneController.SetState(new StartState(sceneController), false); ICharacter ch = new SoldierCaptain(); //ch.Weapon = new WeaponGun(); //ch.Attack(Vector3.zero); }
public StartScene(SceneStateController controller) : base(controller, "StartScene") { btn_Player = UITool.GetButton("btn_Play"); btn_Help = UITool.GetButton("btn_Help"); btn_End = UITool.GetButton("btn_End"); btn_Back = UITool.GetButton("btn_Back"); startPanel = UITool.FindUIGameObject("StartPanel"); helpPanel = UITool.FindUIGameObject("HelpPanel"); }
/// <summary> /// 初始化 /// </summary> private void Initialize() { //管理类单例 m_manage = UIManage.Instance; m_SceneManage = SceneStateController.Instance; //系统 uiEvent = new UIEventSystem(this); stageSystem = new StageSystem(this); cardManage = new CardManageSystem(this); attackSystem = new AttackSystem(this); //其他 serialize = new Serialize(this); deserialization = Deserialization.Instance; }
public CSInertactive cSInertactive; //客户端服务段交互控制 private void Awake() { if (instance != null) { Destroy(this.gameObject); return; } DontDestroyOnLoad(this.gameObject); instance = this; //获取客户端服务端交互组件 gameObject.AddComponent(typeof(CSInertactive)); cSInertactive = GetComponent <CSInertactive>(); //初始化场景状态控制器 sceneStateController = new SceneStateController(this); //初始化游戏数据控制器 gamingDataController = new GamingDataController(this); //打开游戏自动进入登陆场景状态 sceneStateController.SetState(new LoginSceneState(sceneStateController), -1); }
public MainState(SceneStateController controller) : base("03MainScene", controller) { }
public MainMenuState(SceneStateController controller) : base("02MainMenuScene", controller) { }
// Use this for initialization void Start() { controller = new SceneStateController(); //设置默认状态 controller.SetState(new StartSceneState(controller), false); }
public Test(SceneStateController controller) : base("Test", controller) { }
public LoginSceneState(SceneStateController controller) : base(SCENE_NAME, controller) { }
public BattleState(SceneStateController controller) : base(controller) { this.stateName = "BattleState"; this.sceneName = "GamePlay"; }
public BattleState1(SceneStateController Controller) : base(Controller) { this.StateName = "BattleState1"; }
public MainState(SceneStateController stateController) : base(stateController) { this.StateName = "MainScene"; }
public BattleState(SceneStateController controller) : base("03BattleScene", controller) { }
public EndState(SceneStateController controller) : base("03EndScene", controller) { }
public StartState(SceneStateController Controller):base(Controller) { this.StateName = "StartState"; }
public BattleState(SceneStateController Controller):base(Controller) { this.StateName = "BattleState"; }
// 建構者 public ISceneState(SceneStateController Controller) { m_Controller = Controller; }
public GameObject UITool; //sssss public MainMenuState(SceneStateController Controller) : base(Controller) { StateName = "MainMenuState"; }
public StartState(SceneStateController Controller) : base(Controller) { StateName = "StartState"; }
private GameMainProgram gameMainProgram;//主程序 public BattleEyeball(SceneStateController controller) : base(controller) { this.StateName = "BattleEyeball"; }
public MainMenuState(SceneStateController ctrl) : base("02MainMenuScene", ctrl) { }
public StartSceneState(SceneStateController controller) : base(SCENE_NAME, controller) { }
private GameMainProgram gameMainProgram;//主程序 public BattleStrongKnight(SceneStateController controller) : base(controller) { this.StateName = "BattleDungeon"; }
public GameResetScene(SceneStateController controller) : base(controller, "GameResetScene") { }
private void Start() { controller = new SceneStateController(); SetState(new StartState(controller), false); }
public StartState(SceneStateController controller) : base(controller) { stateName = "StartState"; sceneName = "StartScene"; }
public StartState(SceneStateController controller) : base("01_Start", controller) { controller.isLoadScene = false; }
public StartState(SceneStateController controller) : base("01-Begin", controller) { }
public SceneState(string sceneName, SceneStateController controller) { mSceneName = sceneName; mController = controller; }
public ISceneState(string stateName, SceneStateController controller) { mSceneName = stateName; mController = controller; } //构造函数
public BattleSceneState(SceneStateController controller) : base(SCENE_NAME, controller) { }
private GameMainProgram gameMainProgram; //主程序 public VillageScene(SceneStateController controller) : base(controller) { this.StateName = "Village"; }
public MainMenuState(SceneStateController Controller):base(Controller) { this.StateName = "MainMenuState"; }