Inheritance: MonoBehaviour
        static internal int checkDelegate(IntPtr l,int p,out SceneLoader.LoadSceneDoneCallback ua) {
            int op = extractFunction(l,p);
			if(LuaDLL.lua_isnil(l,p)) {
				ua=null;
				return op;
			}
            else if (LuaDLL.lua_isuserdata(l, p)==1)
            {
                ua = (SceneLoader.LoadSceneDoneCallback)checkObj(l, p);
                return op;
            }
            LuaDelegate ld;
            checkType(l, -1, out ld);
            if(ld.d!=null)
            {
                ua = (SceneLoader.LoadSceneDoneCallback)ld.d;
                return op;
            }
			LuaDLL.lua_pop(l,1);
			
			l = LuaState.get(l).L;
            ua = (string a1) =>
            {
                int error = pushTry(l);

				pushValue(l,a1);
				ld.pcall(1, error);
				LuaDLL.lua_settop(l, error-1);
			};
			ld.d=ua;
			return op;
		}
コード例 #2
0
	void Awake()
	{
		if (instance == null)
			instance = this;
		else if (instance != this)
			Destroy (this.gameObject);
	}
コード例 #3
0
    void Awake()
    {
        if (instance == null)
            instance = this;
        else if (instance != this)
            Destroy (gameObject);

        DontDestroyOnLoad (gameObject);
    }
コード例 #4
0
 public void Awake()
 {
     if(instance == null)
     {
         instance = new SceneLoader();
     }
     instance = this;
     changeMenuSound = gameObject.GetComponent<AudioSource>();
 }
コード例 #5
0
 protected void Awake()
 {
     instance = this;
     DontDestroyOnLoad (transform.gameObject);
     foreach (GameObject go in persistentGameobjects) {
         DontDestroyOnLoad (go);
     }
     fade = gameObject.GetComponent<SceneFadeInOut> ();
 }
コード例 #6
0
	void Awake(){
		if(ins == null){

			ins = this;
			GameObject.DontDestroyOnLoad(gameObject);
			GameSceneManager.ins.OwnSecne = (int)this.curSceneName;

		}else if(ins != this){

			Destroy(gameObject);
		}
	}
コード例 #7
0
 void Awake()
 {
     if(manager == null)           //If manager doesn't exist, create one
     {
         DontDestroyOnLoad(gameObject);
         manager = this;
     } else if(manager != null)    //if manager does exist, destroy this copy
     {
         Destroy(gameObject);
     }
     manager = this;
 }
コード例 #8
0
    protected void Awake()
    {
        //Make this a singleton
        Object.DontDestroyOnLoad (gameObject);
        mainController = this;

        //Store all update functions in an array of delegates.
        updateDelegates = new UpdateDelegate[(int)SceneState.Count];
        updateDelegates [(int)SceneState.Reset] = UpdateSceneReset;
        updateDelegates [(int)SceneState.Preload] = UpdateScenePreload;
        updateDelegates [(int)SceneState.Load] = UpdateSceneLoad;
        updateDelegates [(int)SceneState.Unload] = UpdateSceneUnload;
        updateDelegates [(int)SceneState.Postload] = UpdateScenePostload;
        updateDelegates [(int)SceneState.Ready] = UpdateSceneReady;
        updateDelegates [(int)SceneState.Run] = UpdateSceneRun;

        nextSceneName = defaultSceneName;
        sceneState = SceneState.Reset;
    }
コード例 #9
0
 public void LoadMenu()
 {
     SceneLoader.LoadLevel("Menu");
 }
コード例 #10
0
ファイル: BaseRayEngine.cs プロジェクト: HungryBear/rayden
        public BaseRayEngine() {
            frameParsers = new Dictionary<Type, Action<IFrameElement>>();
            frameParsers.Add(typeof(FrameCamera), cameraItem =>
            {
                var item = (FrameCamera)cameraItem;
                Camera = new BasicPerspectiveCamera(item.Position, item.Target, item.Up, width, height) { Fov = 60 };
            });

            frameParsers.Add(typeof(FrameObjFileReference), item =>
            {
                var objFileRef = (FrameObjFileReference)item;
                var loader = new GlobalIndexObjLoader();
                scene = loader.Load(objFileRef.ObjFilePath);
                var mload = new MaterialLoader();
                mats = mload.LoadMaterials(objFileRef.MtlFilePath);

                foreach (var materialInfo in mats) {
                    if (materialInfo.Name.ToLower().Contains("glass") ||
                         materialInfo.Name.ToLower().Contains("wire_134006006")
                         ) {
                        materialInfo.Kt = materialInfo.Kd;
                        materialInfo.Kd = RgbSpectrum.ZeroSpectrum();

                        materialInfo.MediumInfo = Glass;
                    }
                    if (materialInfo.Name.ToLower().Contains("metal")) {
                        materialInfo.Kr = materialInfo.Kd;
                    }
                }
            });


            frameParsers.Add(typeof(Frame3DsFileReference), item =>
            {
                var sceneFileRef = (Frame3DsFileReference)item;
                var loader = new SceneLoader();
                scene = loader.Load(sceneFileRef.FilePath);
                mats = loader.LoadMaterials(sceneFileRef.FilePath);

                foreach (var materialInfo in mats) {
                    if (materialInfo.Name.ToLower().Contains("glass") ||
                         materialInfo.Name.ToLower().Contains("wire_134006006")
                         ) {
                        materialInfo.Kt = materialInfo.Kd;
                        materialInfo.Kd = RgbSpectrum.ZeroSpectrum();

                        materialInfo.MediumInfo = Glass;
                    }
                    if (materialInfo.Name.ToLower().Contains("metal")) {
                        materialInfo.Kr = materialInfo.Kd;
                    }
                }
                if (scene.Cameras != null && scene.Cameras.Any()) {
                    Camera = new BasicPerspectiveCamera(scene.Cameras[0].Position, scene.Cameras[0].Direction, scene.Cameras[0].Up, width, height) { Fov = scene.Cameras[0].Fov };
                }
            });


            frameParsers.Add(typeof(FrameLightsource), item =>
            {
                if (lights == null) {
                    lights = new List<ILight>();
                }
                var lightsource = (FrameLightsource)item;
                switch (lightsource.LightType) {
                    case LightSourceTypes.Point:
                        lights.Add(new PointLight(lightsource));
                        break;
                    case LightSourceTypes.EnvironmentMap:
                        lights.Add(envMap = new InfiniteLight(lightsource));
                        break;
                    case LightSourceTypes.Area:
                        //if (AreaLightAsMeshLight)
                            lights.Add(new MeshLight(lightsource));
                        break;
                }
            });
        }
コード例 #11
0
 void BacktoLobby(SocketIOEvent obj)
 {
     SceneLoader.ToScene("MenuScene");
 }
コード例 #12
0
 private void Start()
 {
     sceneLoader = FindObjectOfType <SceneLoader>();
 }
コード例 #13
0
 public Material( SceneLoader _Owner, string _Name )
     : base(_Owner, _Name)
 {
 }
コード例 #14
0
 // Start is called before the first frame update
 void Start()
 {
     sceneLoaderHandle = FindObjectOfType <SceneLoader>();
 }
コード例 #15
0
 private void Construct(SceneLoader sceneLoader)
 {
     _sceneLoader = sceneLoader;
 }
コード例 #16
0
 public void SwitchBackToMainScene()
 {
     SceneLoader.LoadMainScene();
 }
コード例 #17
0
 private void Start()
 {
     pindahScene = FindObjectOfType <SceneLoader>();
 }
コード例 #18
0
 // Start is called before the first frame update
 void Start()
 {
     Debug.Log(gameObject.name, gameObject);
     SceneLoader.LoadScene(load);
 }
コード例 #19
0
ファイル: SceneLoader.cs プロジェクト: myakin/IDEA-Project-1
 private void Awake()
 {
     SceneLoader.instance = this;
 }
コード例 #20
0
 public void Start()
 {
     _sceneLoader = FindObjectOfType <SceneLoader>();
     _playerC     = FindObjectOfType <PlayerController>();
 }
コード例 #21
0
ファイル: LoseCollider.cs プロジェクト: Arflee/BlockerBreaker
 private void Start()
 {
     loader    = GameObject.FindObjectOfType <SceneLoader>();
     lostScene = SceneManager.GetActiveScene().buildIndex;
 }
コード例 #22
0
 private void Awake()
 {
     SceneLoader.OnStartScene();
 }
コード例 #23
0
 public override void Restart()
 {
     SceneLoader.LoadSceneAsyncSingle(SceneManager.GetActiveScene().buildIndex);
 }
コード例 #24
0
ファイル: LoaderTempMesh.cs プロジェクト: Patapom/GodComplex
 public Primitive( LoaderTempMesh _OwnerMesh, SceneLoader _Owner, string _Name, FBXImporter.Material _Material )
     : base(_Owner, _Name)
 {
     m_OwnerMesh = _OwnerMesh;
     m_Material = _Material;
     // 				if ( m_Material == null )
     // 					throw new Exception( "Invalid material for primitive \"" + _Name + "\"!" );
 }
コード例 #25
0
 public override void LoadMainMenu()
 {
     SceneLoader.LoadSceneAsyncSingle(0);
 }
コード例 #26
0
ファイル: BattleUnit.cs プロジェクト: supertms/WolongYin
    public static BattleUnit Create(BattleUnitProto proto, EBattleFactionType factionType, SceneLoader loader)
    {
        GameObject go = new GameObject();
        GameMonoAgent agent = go.AddComponent<GameMonoAgent>();
        BattleUnit btUnit = agent.AddGameMonoComponent<BattleUnit>();
        btUnit.FactionType = factionType;
        btUnit.theTile = factionType == EBattleFactionType.FT_Player
            ? BattleField.instance.PlayerField.GetTile(proto.MainTileIndex)
            : BattleField.instance.EnemyField.GetTile(proto.MainTileIndex);

        btUnit.BindLoader = loader;
        btUnit.Parse(proto);

        return null;
    }
コード例 #27
0
ファイル: SceneLoader.cs プロジェクト: ryan-comer/Fidget-Wars
 void Awake()
 {
     DontDestroyOnLoad(gameObject);
     Instance = this;
 }
コード例 #28
0
ファイル: ScenesJunction.cs プロジェクト: Oxy949/Obscended
 private void Awake()
 {
     loader = GameObject.FindGameObjectWithTag("Scene").GetComponent<SceneLoader>();
     ObjectNear += ScenesJunction_ObjectNear;
 }
コード例 #29
0
 // Use this for initialization
 private void Awake()
 {
     sceneLoader = SceneLoader.Instance;
 }
コード例 #30
0
    IEnumerator Start()
    {
        baseMarkers = new List <BaseMarker>();

        sceneLoader = GameObject.Find("SceneController").GetComponent <SceneLoader>();

        for (int i = 0; i < sceneLoader.bases.Count; i++)
        {
            baseMarkers.Add(Instantiate(baseMarkerPrefab));
            baseMarkers[i].transform.parent = baseMarkerParent.transform;
            baseMarkers[i].ShowBase(sceneLoader.bases[i].lat, sceneLoader.bases[i].lon, sceneLoader.bases[i].lvl);
        }

        mapControl.ScrollToLatLon(0f, -0f);

        sceneLoader.BindMap();

        loadingPanel.gameObject.SetActive(true);

        // First, check if user has location service enabled
        if (!Input.location.isEnabledByUser)
        {
            Debug.Log("not enabled");
            yield break;
        }

        Input.compass.enabled = true;
        // Start service before querying location
        Input.location.Start(1, 1);

        // Wait until service initializes
        int maxWait = 20;

        while (Input.location.status == LocationServiceStatus.Initializing && maxWait > 0)
        {
            yield return(new WaitForSeconds(1));

            maxWait--;
            Debug.Log(maxWait);
        }

        // Service didn't initialize in 20 seconds
        if (maxWait < 1)
        {
            debugText.text = ("Timed out");
            yield break;
        }

        // Connection has failed
        if (Input.location.status == LocationServiceStatus.Failed)
        {
            debugText.text = ("Unable to determine device location");
            yield break;
        }
        else
        {
            // Access granted and location value could be retrieved
            debugText.text = ("Location: " + Input.location.lastData.latitude + " " + Input.location.lastData.longitude + " " + Input.location.lastData.timestamp + " " + Input.compass.enabled);
            mapControl.ScrollToLatLon(Input.location.lastData.latitude, Input.location.lastData.longitude);

            for (int i = 0; i < baseMarkers.Count; i++)
            {
                baseMarkers[i].ShowBase(sceneLoader.bases[i].lat, sceneLoader.bases[i].lon, sceneLoader.bases[i].lvl);
            }

            loadingPanel.gameObject.SetActive(false);
        }

        // Stop service if there is no need to query location updates continuously
        Input.location.Stop();
        loadingPanel.gameObject.SetActive(false);
    }
コード例 #31
0
        public void StartLoadScene(string sceneName)
        {
            SceneLoader loader = sceneLoader.AddComponent <SceneLoader>();

            loader.StartLoadScene(sceneName);
        }
コード例 #32
0
 public void LoadByName(string sceneName)
 {
     SceneLoader.LoadNextScene();
 }
コード例 #33
0
 public override IEnumerator InitializeEnumerator(object param)
 {
     _outGameButton.onClick.AddListener(() => SceneLoader.LoadScene("OutGame"));
     yield break;
 }
コード例 #34
0
ファイル: TestScene.cs プロジェクト: Arpple/projectend
 private void Awake()
 {
     _sceneLoader = GetComponent <SceneLoader>();
 }
コード例 #35
0
        public LoaderTempSceneObject( SceneLoader _Owner, string _Name )
        {
            if ( _Name == null )
                throw new Exception( "Invalid name for object ! You cannot provide null as a name for an object!" );

            m_Owner = _Owner;
            m_Name = _Name;
        }
コード例 #36
0
ファイル: SceneLoader.cs プロジェクト: rizzinek/personal
 void Awake()
 {
     if(_instance == null)
         _instance = this;
 }
コード例 #37
0
    // Start is called before the first frame update
    //void Start()
    //{
    //
    //}
    //
    //// Update is called once per frame
    //void Update()
    //{
    //
    //}

    public void SwapScenes()
    {
        SceneLoader.SwitchScene(1);
    }
コード例 #38
0
ファイル: CommanderUnit.cs プロジェクト: supertms/WolongYin
 protected override bool _OnCreate(int tableid, SceneLoader loader, params object[] args)
 {
     return true;
 }
コード例 #39
0
 private void Awake()
 {
     instance = this;
 }
コード例 #40
0
        private void Construct(IStageDataUseCase stageDataUseCase, IClearDataUseCase clearDataUseCase, ISaveLanguageUseCase languageUseCase, SceneLoader sceneLoader)
        {
            for (int i = 0; i < clearDataUseCase.clearData.Length; i++)
            {
                var index     = i;
                var stageData = stageDataUseCase.GetStageData(index);
                var isClear   = clearDataUseCase.clearData[index];
                stageButtonViews[index].Init(index + 1, stageData.GetButtonTexture(isClear), () =>
                {
                    sceneLoader.LoadScene(GameType.FreePlay, SceneName.Main, LoadType.Direct, index);
                });
            }

            var freePlayClearCount = clearDataUseCase.clearData
                                     .Count(x => x);

            tweetButtonView.Init(languageUseCase, freePlayClearCount);

            // FreePlay全クリア
            var isFreePlayClear = freePlayClearCount.Equals(GameConfig.FREE_PLAY_COUNT);

            red.SetActive(isFreePlayClear);

            // ScoreAttack全クリア
            var isScoreAttackClear = clearDataUseCase.rankData
                                     .Count(x => x)
                                     .Equals(GameConfig.STAGE_COUNT);

            green.SetActive(isScoreAttackClear);
        }
コード例 #41
0
    protected void OnDestroy()
    {
        if (updateDelegates != null)
        {
            for (int i = 0; i < (int)SceneState.Count; i++)
            {
                updateDelegates [i] = null;
            }
            updateDelegates = null;
        }

        if (mainController != null)
        {
            mainController = null;
        }
    }
コード例 #42
0
ファイル: LoaderTempMesh.cs プロジェクト: Patapom/GodComplex
 public LoaderTempMesh( SceneLoader _Owner, string _Name )
     : base(_Owner, _Name)
 {
     if ( _Name.IndexOf( "polysurface12", StringComparison.CurrentCultureIgnoreCase ) != -1 )
         m_Name = _Name;
 }
コード例 #43
0
 public void LoadGameScene()
 {
     StartCoroutine(SceneLoader.LoadSceneAsync("Game"));
 }
コード例 #44
0
 public LoaderTempTransform( SceneLoader _Owner, string _Name )
     : base(_Owner, _Name)
 {
 }
コード例 #45
0
 public void LoadAlbumScene()
 {
     StartCoroutine(SceneLoader.LoadSceneAsync("Album"));
 }
コード例 #46
0
 public LoaderTempTextureCube( SceneLoader _Owner, string _Name )
     : base(_Owner, _Name)
 {
 }
コード例 #47
0
ファイル: OutOfPlayArea.cs プロジェクト: Ericwhh/color-coated
 private void Start()
 {
     sceneLoader = FindObjectOfType <SceneLoader>();
     audioSource = GetComponent <AudioSource>();
 }
コード例 #48
0
ファイル: SceneLoader.cs プロジェクト: theSoenke/GGJ16
 void Awake()
 {
     Instance = this;
 }
コード例 #49
0
 private void Awake()
 {
     masterManager = FindObjectOfType <MasterManager>();
     sceneLoader   = masterManager.GetComponentInChildren <SceneLoader>();
 }
コード例 #50
0
 // Start is called before the first frame update
 void Start()
 {
     SceneLoader = FindObjectOfType <SceneLoader>();
     rigidbody2D = GetComponent <Rigidbody2D>();
     //rigidbody2D.velocity = new Vector2(UnityEngine.Random.Range(3, 10), UnityEngine.Random.Range(3, 10));
 }
コード例 #51
0
 private void Awake()
 {
     _mainMenuManager = transform.parent.GetComponent <MainMenuManager>();
     _highScoreMenu   = _mainMenuManager.HighScoreMenuRLR;
     _sceneLoader     = _mainMenuManager.SceneLoader;
 }