Beispiel #1
0
 void Start()
 {
     _controller = GameObject.Find("Scene2/Scene2(Controller)");
     _controller.SetActive(false);
     _ui = UITexture.GetInstance();
     m_SceneStateController.SetState(new FirstSceneState());    //設置當前場景為 WaitingCafeState,並直接開始
 }
Beispiel #2
0
    private void Start()
    {
        //初始化咱的UI管理类
        IUserInterfaceManager.GetInstance();

        Tips.Instance.Hide();

        // 设置开始场景
        m_SceneStateController.SetState("StartScene");

        MessManager.GetInstance().RegisterMessage("SwitchState", SwitchState);
    }
Beispiel #3
0
    void Start()
    {
        UnityTool.M_Debug("游戏初始挂载");

        //加载到一号场景
        m_SceneStateController.SetState(SceneType.RoleSelectScene, typeof(RoleSelectScene));
    }
Beispiel #4
0
 void Start()
 {
     // 状态控制器对象
     controller = new SceneStateController();
     // 设置默认(当前)状态为开始状态,设置默认状态的时候是不需要加载场景的
     controller.SetState(new StartState(controller), false);
 }
Beispiel #5
0
    /// <summary>
    /// 切换场景
    /// </summary>
    /// <param name="state"></param>
    /// <param name="isLoadScene"></param>
    public void SwitchScene(ISceneState state, bool isLoadScene = true)
    {
        if (mCurSceneController == null)
        {
            return;
        }

        mCurSceneController.SetState(state, isLoadScene);
    }
Beispiel #6
0
    // 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);
    }
Beispiel #7
0
 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);
 }
Beispiel #8
0
 // Use this for initialization
 void Start()
 {
     stateController = new SceneStateController();
     stateController.SetState(new StartState("Start", stateController), false);;
 }
Beispiel #9
0
 // Start is called before the first frame update
 void Start()
 {
     //游戏初始化
     GameInit();
     sceneStateController.SetState(new StartState(sceneStateController), "");
 }
Beispiel #10
0
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameLoop : MonoBehaviour {

    private SceneStateController controller = null;

    private void Awake()
    {
        DontDestroyOnLoad(this.gameObject);
    }

    // Use this for initialization
    void Start () {
        controller = new SceneStateController();
        controller.SetState(new StartState(controller),false);
		
	}
	
	// Update is called once per frame
	void Update () {
Beispiel #11
0
 private void Start()
 {
     mController = new SceneStateController();
     mController.SetState(new StartState(mController), false);
 }
Beispiel #12
0
 // Use this for initialization
 void Start()
 {
     // 设定起始的场景
     m_SceneStateController.SetState(new StartState(m_SceneStateController), "MainMenuScene");
 }
 void Start()
 {
     m_SceneStateController.SetState(new StartState(m_SceneStateController), "");
 }
Beispiel #14
0
 void Start()
 {
     // Set initial scene.
     m_SceneStateController.SetState(new StartState(m_SceneStateController), "");
 }
Beispiel #15
0
 void Start()
 {
     controller = new SceneStateController();
     controller.SetState(new StartState(controller));
 }
Beispiel #16
0
 // Use this for initialization
 void Start()
 {
     // 設定起始的場景
     m_SceneStateController.SetState(new StartState(m_SceneStateController), "");
 }
Beispiel #17
0
 private void ScenesStart()
 {
     controller = new SceneStateController();
     controller.SetState(new StartState(controller), false);
 }
Beispiel #18
0
    public void Restart()
    {
        SceneStateController controller = BarrageGame.Instance.sceneStateController;

        controller.SetState(new MainMenuState(controller), "MainMenuScene");
    }
Beispiel #19
0
 void Start()
 {
     //设置起始场景状态
     m_SceneStateController.SetState(new StartState(m_SceneStateController), "");
 }
Beispiel #20
0
 private void Start()
 {
     //设置起始场景
     sceneStateController.SetState(new StartState(sceneStateController), "");
 }
Beispiel #21
0
 private void Start()
 {
     //設定起始場景
     m_SceneStateController.SetState(new StartState(m_SceneStateController), "", this);
     //m_SceneStateController.SetState(new StartState(m_SceneStateController), 1, this);
 }
Beispiel #22
0
 // Use this for initialization
 void Start()
 {
     Debug.Log("--------GameLoop-----Start");
     m_sceneStateController.SetState(new LoginScene(m_sceneStateController), "LoginScene");
 }
Beispiel #23
0
 //改变场景状态
 public void SetNewSceneState(SceneState _state, int _sceneIndex)
 {
     sceneStateController.SetState(_state, _sceneIndex);
 }
Beispiel #24
0
 private void Start()
 {
     //设置初始场景
     _controller.SetState("", new LogoMenuState(_controller));
 }
Beispiel #25
0
 // Use this for initialization
 void Start()
 {
     controller = new SceneStateController();
     //设置默认状态
     controller.SetState(new StartSceneState(controller), false);
 }
 // Use this for initialization
 void Start()
 {
     //设置初始场景
     sceneStateController.SetState(new StartSceneState(sceneStateController), "StartScene");
 }