예제 #1
0
    public void Init()
    {
        mStageSystem  = new StageSystem();
        mTankSystem   = new TankSystem();
        mBulletSystem = new BulletSystem();
        mCameraSystem = new CameraSystem();

        mStageSystem.Init();
        mTankSystem.Init();
        mBulletSystem.Init();
        mCameraSystem.Init();
    }
예제 #2
0
    private void Awake()
    {
        Instance = this;

        PlayerPool   = GetComponent <PlayerPool>();
        MatchManager = GetComponent <MatchManager>();
        UIManager    = GetComponent <UIManager>();
        CameraSystem = GetComponent <CameraSystem>();
        LevelManager = GetComponent <LevelManager>();

        PlayerPool.Init();
        MatchManager.Init();
        //UIManager.Init();
        CameraSystem.Init();
        LevelManager.Init();
    }
    // Your custom code here
    void Start()
    {
        _player = new Player();
        _player.Init();

        _obstaclelSystem = new ObstacleSystem();
        _obstaclelSystem.Init();
        _obstaclelSystem.PlayerTrans = _player.PlayerTrans;

        _cameraSystem = new CameraSystem();
        _cameraSystem.Init(_player.PlayerTrans);

        UGame.EventManager.StartListening(EventNames.PLAYER_PASS_OBSTACLE, PlayerPassObstacle);
        UGame.EventManager.StartListening(EventNames.PAUSE_GAME, PauseGame);
        UGame.EventManager.StartListening(EventNames.RESUME_GAME, ResumeGame);
        UGame.EventManager.StartListening(EventNames.GMAE_OVER, GameOver);

        GameData.Instance.UserData.Score = 0;
        Score = GameData.Instance.UserData.Score;
    }