Inheritance: MonoBehaviour
Exemplo n.º 1
0
 void Start()
 {
     thePlayer = FindObjectOfType <Player_Movement>();
     theCamera = FindObjectOfType <Main_Camera>();
     theFade   = FindObjectOfType <FadeManager>();
     BGM       = FindObjectOfType <BGMManager>();
 }
Exemplo n.º 2
0
    // Use this for initialization

    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);

        foreach (var s in audioFiles)
        {
            s.source = gameObject.AddComponent <AudioSource>();
            s.source.outputAudioMixerGroup = s.audioGroup;
            s.source.clip        = s.audioClip;
            s.source.volume      = s.volume;
            s.source.loop        = s.isLooping;
            s.source.playOnAwake = false;

            if (s.playOnAwake)
            {
                s.source.Play();
            }
        }
    }
    private void Awake()
    {
        this.objectBGMManager = GameObject.FindWithTag("BGMManager");
        this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>();

        this.shaper2D = this.GetComponent <Shaper2D>();
    }
    void Awake()
    {
        cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();
        sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();

        switches = GetComponentsInChildren<MechSwitch>();
        blocks = GetComponentsInChildren<MechBlock>();
        spawner = GetComponentInChildren<MonsterSpawning>();

        unlocked = 0;
        puzzleActivated = false;

        blockPositions = new List<List<Vector2>> {
            new List<Vector2> {
                new Vector2(-3f, 17f),
                new Vector2(3f, 17f),
                new Vector2(3f, 11f)
            },
            new List<Vector2> {
                new Vector2(4f, 39f),
                new Vector2(-4f, 39f),
                new Vector2(4f, 31f)
            },
            new List<Vector2> {
                new Vector2(-4f, 53f),
                new Vector2(4f, 53f),
                new Vector2(4f, 63f)
            }
        };
    }
Exemplo n.º 5
0
 public void PressGoTitle()
 {
     //初期化処理
     BGMManager.PlayBGM(BGMManager.menuBGM);
     SEManager.PlaySE(SEManager.decision);
     SceneManager.LoadScene("Title");
 }
Exemplo n.º 6
0
 void Awake()
 {
     sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
     bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();
     startTime = Time.time;
     j = 0;
 }
Exemplo n.º 7
0
    public override void OnInspectorGUI()
    {
        BGMManager obj = target as BGMManager;

        for (int i = 0; i < obj.BGM_List.Count; i++)
        {
            EditorGUILayout.LabelField(obj.BGM_List[i].name);

            EditorGUILayout.BeginHorizontal();
            {
                obj.BGM_List[i].have_Intoro = EditorGUILayout.Toggle("Intoro", obj.BGM_List[i].have_Intoro);
                if (obj.BGM_List[i].have_Intoro)
                {
                    obj.BGM_List[i].intoro_Clip = (AudioClip)EditorGUILayout.ObjectField("", obj.BGM_List[i].intoro_Clip, typeof(AudioClip), false);
                }
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                obj.BGM_List[i].clip   = (AudioClip)EditorGUILayout.ObjectField("", obj.BGM_List[i].clip, typeof(AudioClip), false);
                obj.BGM_List[i].volume = EditorGUILayout.FloatField("volume", obj.BGM_List[i].volume);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();
        }

        EditorUtility.SetDirty(obj);
    }
Exemplo n.º 8
0
    private void Start()
    {
        gameManager            = GameManager.Instance;
        subHeartSpriteRenderer = GetComponent <SpriteRenderer>();

        mainHeart        = GameObject.FindGameObjectWithTag("MainHeart");
        mainHeartManager = mainHeart.GetComponent <MainHeartManager>();

        touchEffectSpriteRenderer = touchEffectSprite.GetComponent <SpriteRenderer>();

        bgmManager = BGMManager.Instance;
        //============色同期================
        ColorManager colorManager = ColorManager.Instance;

        defaultColor = colorManager.GetDefaultColor;

        if (!doSpecialColor)
        {
            readyColor = colorManager.GetSubColor;
            touchEffectSpriteRenderer.color = colorManager.GetSubColor;
        }

        lightning.glowColor = readyColor;

        //=============Lightning初期化===============
        lightning.startPoint = this.transform.position;
        lightning.isPlaying  = false;
    }
Exemplo n.º 9
0
    public void OnPressBGMFlag()
    {
        switch (BGMManager.baseVolume)
        {
        case 1f:
            BGMManager.baseVolume = 0f;
            BGMManager.SetVolume(1f);
            BGMVolumeButtonText.text = "サウンド:ON(小)";
            break;

        case 0.5f:
            BGMManager.baseVolume = 1f;
            BGMManager.SetVolume(1f);
            BGMVolumeButtonText.text = "サウンド:OFF";
            break;

        case 0f:
            BGMManager.baseVolume = 0.5f;
            BGMManager.SetVolume(1f);
            BGMVolumeButtonText.text = "サウンド:ON(中)";
            break;

        default:
            break;
        }
    }
Exemplo n.º 10
0
    public override void OnInspectorGUI()
    {
        BGMManager obj = target as BGMManager;

        for (int i = 0; i < obj.BGM_List.Count; i++)
        {
            EditorGUILayout.BeginHorizontal();
            {
                if (obj.BGM_List[i].is_Folding = EditorGUILayout.Toggle("", obj.BGM_List[i].is_Folding, GUILayout.Width(10)))
                {
                    EditorGUILayout.LabelField(obj.BGM_List[i].name);
                    EditorGUILayout.EndHorizontal();
                    GUILayout.Box("", GUILayout.ExpandWidth(true), GUILayout.Height(2));
                    continue;
                }
                GUI.color            = new Color(0.5f, 1f, 0.5f);
                obj.BGM_List[i].name = EditorGUILayout.TextField("", obj.BGM_List[i].name, GUILayout.Width(200), GUILayout.Height(15));
                GUI.color            = Color.white;
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                obj.BGM_List[i].have_Intoro = EditorGUILayout.Toggle("Intoro", obj.BGM_List[i].have_Intoro);
                if (obj.BGM_List[i].have_Intoro)
                {
                    obj.BGM_List[i].intoro_Clip = (AudioClip)EditorGUILayout.ObjectField("", obj.BGM_List[i].intoro_Clip, typeof(AudioClip), false);
                }
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                obj.BGM_List[i].clip   = (AudioClip)EditorGUILayout.ObjectField("", obj.BGM_List[i].clip, typeof(AudioClip), false);
                obj.BGM_List[i].volume = EditorGUILayout.FloatField("volume", obj.BGM_List[i].volume);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Remove", GUILayout.Width(100), GUILayout.Height(10)))
                {
                    obj.Remove(i);
                }
                GUILayout.FlexibleSpace();
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();
            GUILayout.Box("", GUILayout.ExpandWidth(true), GUILayout.Height(2));
        }

        if (GUILayout.Button("Add", GUILayout.Width(200), GUILayout.Height(20)))
        {
            obj.Add_BGM();
        }

        EditorUtility.SetDirty(obj);
    }
Exemplo n.º 11
0
 public void OnDestroy()
 {
     if (this == instance)
     {
         _instance = null;
     }
 }
Exemplo n.º 12
0
    // Awake Start Update

    private void Awake()
    {
        this.objectOptionManager = GameObject.FindWithTag("OptionManager");
        this.scriptGameOption    = this.objectOptionManager.GetComponent <GameOption>();

        this.objectBGMManager = GameObject.FindWithTag("BGMManager");
        this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>();

        this.cameraMain = this.objectMainCamera.GetComponent <Camera>();

        this.imageHowToPlay     = this.objectHowToPlayButton.GetComponent <Image>();
        this.imageStart         = this.objectStartButton.GetComponent <Image>();
        this.imageRanking       = this.objectRankingButton.GetComponent <Image>();
        this.textHowToPlay      = this.objectHowToPlayButtonText.GetComponent <Text>();
        this.textStart          = this.objectStartButtonText.GetComponent <Text>();
        this.textRanking        = this.objectRankingButtonText.GetComponent <Text>();
        this.imageHowToPlayIcon = this.objectHowToPlayButtonIcon.GetComponent <Image>();
        this.imageStartIcon     = this.objectStartButtonIcon.GetComponent <Image>();
        this.imageRankingIcon   = this.objectRankingButtonIcon.GetComponent <Image>();

        this.imageOptionButton     = this.objectOptionButton.GetComponent <Image>();
        this.imageOptionButtonIcon = this.objectOptionButtonIcon.GetComponent <Image>();

        this.rendererBackgroundPanels     = this.objectBackgroundPanels.GetComponent <SpriteRenderer>();
        this.rendererBackgroundPhaseScore = this.objectBackgroundPhaseScore.GetComponent <SpriteRenderer>();
        this.rendererBackgroundTotalScore = this.objectBackgroundTotalScore.GetComponent <SpriteRenderer>();

        this.textMeshTitle = this.objectTextTitle.GetComponent <TextMeshProUGUI>();
        this.textCopyright = this.objectTextCopyright.GetComponent <Text>();
        this.textVersion   = this.objectTextVersion.GetComponent <Text>();
        this.textDebug     = this.objectTextDebug.GetComponent <Text>();
    }
Exemplo n.º 13
0
 void Start()
 {
     isPause  = false;
     isConfig = false;
     Tutorial.SetActive(false);
     Setting.SetActive(false);
     bgmManager = GameObject.Find("BGMManager").GetComponent <BGMManager> ();
 }
 void Awake()
 {
     layer = GameObject.FindGameObjectWithTag(Tags.gameController)
         .GetComponent<Layers>();
     gamecon = GameObject.FindGameObjectWithTag(Tags.gameController)
         .GetComponent<GameController>();
     bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();
 }
Exemplo n.º 15
0
 static public BGMManager GetInstance()
 {
     if (instance == null)
     {
         instance = FindObjectOfType <BGMManager>();
     }
     return(instance);
 }
Exemplo n.º 16
0
 private void Awake()
 {
     if (Instance)
     {
         return;
     }
     Instance = this;
 }
Exemplo n.º 17
0
 private void Start()
 {
     this.bossHPText.text = "敵HP: " + boss.Hp.ToString();
     if (BGMManager.playingBGM == E_BGM.boss1)
     {
         BGMManager.PlayBGM(BGMManager.bossBGM0);
     }
 }
Exemplo n.º 18
0
 public void ToMainMenu()
 {
     SceneManager.LoadScene(0);
     if (BGMManager.Instance() != null)
     {
         Destroy(BGMManager.Instance().gameObject.GetComponent <AudioSource>());
     }
 }
Exemplo n.º 19
0
 void Start()
 {
     menu.SetActive(false);
     ClearOutRenderTexture(texture);
     //theVideo.Play();
     StartCoroutine(Wait());
     BGM = FindObjectOfType <BGMManager>();
 }
    void Awake()
    {
        obstaclePrefab = Resources.Load("comp_block");
        sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
        cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();

        currentSetNumber = 0;

        sets = new List<List<Vector2>>();

        List<Vector2> set1 = new List<Vector2>();
        set1.Add(new Vector2(2, 0));
        set1.Add(new Vector2(7, 0));
        set1.Add(new Vector2(6, 1));
        set1.Add(new Vector2(1, 3));
        set1.Add(new Vector2(5, 3));
        set1.Add(new Vector2(2, 5));
        set1.Add(new Vector2(0, 6));
        set1.Add(new Vector2(6, 6));
        set1.Add(new Vector2(3, 7));
        sets.Add(set1);

        List<Vector2> set2 = new List<Vector2>();
        set2.Add(new Vector2(1, 0));
        set2.Add(new Vector2(7, 1));
        set2.Add(new Vector2(9, 2));
        set2.Add(new Vector2(2, 3));
        set2.Add(new Vector2(4, 4));
        set2.Add(new Vector2(6, 4));
        set2.Add(new Vector2(1, 5));
        set2.Add(new Vector2(7, 6));
        set2.Add(new Vector2(0, 7));
        sets.Add(set2);

        List<Vector2> set3 = new List<Vector2>();
        set3.Add(new Vector2(4, 0));
        set3.Add(new Vector2(0, 1));
        set3.Add(new Vector2(9, 4));
        set3.Add(new Vector2(3, 5));
        set3.Add(new Vector2(6, 6));
        set3.Add(new Vector2(1, 7));
        sets.Add(set3);

        List<Vector2> set4 = new List<Vector2>();
        set4.Add(new Vector2(4, 0));
        set4.Add(new Vector2(9, 0));
        set4.Add(new Vector2(8, 2));
        set4.Add(new Vector2(9, 3));
        set4.Add(new Vector2(0, 4));
        set4.Add(new Vector2(2, 5));
        set4.Add(new Vector2(4, 6));
        set4.Add(new Vector2(3, 7));
        set4.Add(new Vector2(8, 7));
        sets.Add(set4);

        StartCoroutine(InitializeObstacles());
    }
Exemplo n.º 21
0
    // Awake Start Update

    private void Awake()
    {
        this.objectOptionManager = GameObject.FindWithTag("OptionManager");
        this.scriptGameOption    = this.objectOptionManager.GetComponent <GameOption>();

        this.objectBGMManager = GameObject.FindWithTag("BGMManager");
        this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>();

        this.cameraMain = this.objectMainCamera.GetComponent <Camera>();

        this.rendererBackgroundPanels     = this.objectBackgroundPanels.GetComponent <SpriteRenderer>();
        this.rendererBackgroundPhaseScore = this.objectBackgroundPhaseScore.GetComponent <SpriteRenderer>();
        this.rendererBackgroundTotalScore = this.objectBackgroundTotalScore.GetComponent <SpriteRenderer>();
        this.rendererBackgroundOption     = this.objectBackgroundOption.GetComponent <SpriteRenderer>();

        int indexSamplePanel = 0;

        foreach (Transform samplePanel in this.objectSamplePanels.transform)
        {
            this.rendererSamplePanels[indexSamplePanel] = samplePanel.gameObject.GetComponent <SpriteRenderer>();
            indexSamplePanel++;
        }

        this.imageTitleButton              = this.objectTitleButton.GetComponent <Image>();
        this.imageTitleButtonIcon          = this.objectTitleButtonIcon.GetComponent <Image>();
        this.imageThemeMenuButton          = this.objectThemeMenuButton.GetComponent <Image>();
        this.imageThemeMenuButtonIcon      = this.objectThemeMenuButtonIcon.GetComponent <Image>();
        this.imageSoundMenuButton          = this.objectSoundMenuButton.GetComponent <Image>();
        this.imageSoundMenuButtonIcon      = this.objectSoundMenuButtonIcon.GetComponent <Image>();
        this.imageSelectedButtonBackground = this.objectSelectedButtonBackground.GetComponent <Image>();

        this.imageSwitchThemeButton     = this.objectSwitchThemeButton.GetComponent <Image>();
        this.imageSwitchThemeButtonIcon = this.objectSwitchThemeButtonIcon.GetComponent <Image>();

        this.imageBGMTestButton = this.objectBGMTestButton.GetComponent <Image>();
        this.textBGMTestButton  = this.objectBGMTestButtonText.GetComponent <Text>();
        this.imageSETestButton  = this.objectSETestButton.GetComponent <Image>();
        this.textSETestButton   = this.objectSETestButtonText.GetComponent <Text>();

        this.imageSliderBGMVolumeIcon       = this.objectSliderBGMVolumeIcon.GetComponent <Image>();
        this.imageSliderSEVolumeIcon        = this.objectSliderSEVolumeIcon.GetComponent <Image>();
        this.imageSliderBGMVolumeBackground = this.objectSliderBGMVolumeBackground.GetComponent <Image>();
        this.imageSliderSEVolumeBackground  = this.objectSliderSEVolumeBackground.GetComponent <Image>();
        this.imageSliderBGMVolumeFill       = this.objectSliderBGMVolumeFill.GetComponent <Image>();
        this.imageSliderSEVolumeFill        = this.objectSliderSEVolumeFill.GetComponent <Image>();
        this.imageSliderBGMVolumeHandleEdge = this.objectSliderBGMVolumeHandleEdge.GetComponent <Image>();
        this.imageSliderSEVolumeHandleEdge  = this.objectSliderSEVolumeHandleEdge.GetComponent <Image>();
        this.imageSliderBGMVolumeHandleCore = this.objectSliderBGMVolumeHandleCore.GetComponent <Image>();
        this.imageSliderSEVolumeHandleCore  = this.objectSliderSEVolumeHandleCore.GetComponent <Image>();

        this.textOptionHeader      = this.objectTextOptionHeader.GetComponent <Text>();
        this.textSwitchThemeHeader = this.objectTextSwitchThemeHeader.GetComponent <Text>();
        this.textPreview           = this.objectTextPreview.GetComponent <Text>();
        this.textNote = this.objectTextNote.GetComponent <Text>();

        this.textBGMVolume = this.objectTextBGMVolume.GetComponent <Text>();
        this.textSEVolume  = this.objectTextSEVolume.GetComponent <Text>();
    }
Exemplo n.º 22
0
 public void OnResumeButtonClicked()
 {
     BGMManager.SetVolume(1f);
     this.pausePanel.SetActive(false);
     StartCoroutine(DelayMethod(5, () =>
     {
         Time.timeScale = 1f;
     }));
 }
Exemplo n.º 23
0
    void Awake()
    {
        gameMgr   = GameObject.FindObjectOfType <GameManager>();
        sectorMgr = GameObject.FindObjectOfType <SectorManager>();
        bgmMgr    = GameObject.FindObjectOfType <BGMManager>();

        maxHp     = 100;
        currentHp = maxHp;
        um        = GameObject.FindObjectOfType <UIManager>();
    }
Exemplo n.º 24
0
    // Awake Start Update

    private void Awake()
    {
        this.scriptOptionDirector = this.objectOptionDirector.GetComponent <OptionDirector>();

        this.objectBGMManager = GameObject.FindWithTag("BGMManager");
        this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>();

        this.objectSEManager = GameObject.FindWithTag("SEManager");
        this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>();
    }
Exemplo n.º 25
0
        public void ReloadPage()
        {
            BGMManager.ChangeSong("");
            BGMManager.ChangeSong(@"BGM/th128_01");

            /*MediaPlayer.Play(bgm);
             * MediaPlayer.Volume = GameConfig.FBgmvol;
             * MediaPlayer.Pause();
             * MediaPlayer.Resume();*/
        }
Exemplo n.º 26
0
      /**************************************************************************************************/
      /*!
       *    \fn      public static void Create()
       *             インスタンスの生成
       *    \return  インスタンス
       *    \remakrs SoundMangaer 下に配置
       *    \date    2014.12.25(Thu)
       *    \author  Masayoshi.Matsuyama@Donuts
       */
      /**************************************************************************************************/
			public static void Create() {
				if (instance == null) {
					Donuts.Sound.Manager.Create();
					GameObject obj 				= new GameObject();
					obj.name 							= "BGMManager";
					GameObject managerObj = Donuts.Sound.Manager.GetManagerObj();
					obj.transform.parent  = managerObj.transform;
					instance 							= obj.AddComponent<BGMManager>();
				}
			}
Exemplo n.º 27
0
    void Awake()
    {
        gameMgr = GameObject.FindObjectOfType<GameManager>();
        sectorMgr = GameObject.FindObjectOfType<SectorManager>();
        bgmMgr = GameObject.FindObjectOfType<BGMManager>();

        maxHp = 100;
        currentHp = maxHp;
        um = GameObject.FindObjectOfType<UIManager>();
    }
Exemplo n.º 28
0
    void OnDestroy()
    {
        // ※破棄時に、登録した実体の解除を行なっている

        // 自身がインスタンスなら登録を解除
        if (this == instance)
        {
            _instance = null;
        }
    }
Exemplo n.º 29
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Debug.LogError("More Than two instance");
     }
 }
Exemplo n.º 30
0
    private WaitForSeconds waitTime = new WaitForSeconds(0.01f); //반복문 안에서 계속 new 실행하는 것보다 이게 성능 좋음

    //Start보다 먼저 실행됨
    private void Awake()
    {
        if (instance == null)
        {
            DontDestroyOnLoad(this.gameObject);//다른 신으로 로드할 때마다 이 객체를 파괴하지 말아라
            instance = this;
        }
        else
        {
            Destroy(this.gameObject);
        }
    }
Exemplo n.º 31
0
    void Awake()
    {
        sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();
        startTime = Time.time;
        bossState = 0;
        status = transform.parent.gameObject.GetComponent<Boss>();
        boss = transform.parent;
        StageRefPoint = GameObject.FindGameObjectWithTag("StageRefPoint").transform.position;

        status.isInvicible = true;
    }
Exemplo n.º 32
0
 private void Awake() //스타트보다 먼저 실행되는 함수
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         DontDestroyOnLoad(this.gameObject);
         instance = this;
     }
 }
Exemplo n.º 33
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 34
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         DontDestroyOnLoad(this.gameObject);
         instance = this;
     }
 }  //--------------인스턴스화를 위함 ----
Exemplo n.º 35
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         DontDestroyOnLoad(this.gameObject);
         instance = this;
     }
 }
Exemplo n.º 36
0
 void Start()
 {
     if (Globel.stage == 1)
     {
         transform.GetChild(0).GetChild(1).gameObject.SetActive(false);
     }
     else
     {
         transform.GetChild(0).GetChild(1).gameObject.SetActive(true);
     }
     BGMManager.PlayUnbattle();
 }
Exemplo n.º 37
0
 void Awake()
 {
     if (manager == null)
     {
         manager = this;
     }
     else if (manager != this)
     {
         Destroy(this.gameObject);
     }
     DontDestroyOnLoad(this.gameObject);
 }
    void Awake()
    {
        cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();

        blackDoors = blackDoorsParent.GetComponentsInChildren<ElecDoor>();
        blueDoors = blueDoorsParent.GetComponentsInChildren<ElecDoor>();
        redDoors = redDoorsParent.GetComponentsInChildren<ElecDoor>();

        blackDoorsOpen = false;
        redDoorsOpen = false;
        blueDoorsOpen = false;
    }
Exemplo n.º 39
0
    private void Awake()
    {
        gamecon = GameObject.FindGameObjectWithTag(Tags.gameController)
            .GetComponent<GameController>();
        gman = GameObject.FindGameObjectWithTag(Tags.gameController)
            .GetComponent<GUIManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();
        bgimg = Resources.Load<Texture2D>("cover_1920x1080");
        titleimg = Resources.Load<Texture2D>("title_name");

        buttonRect = new Rect(700, 500, 640, 600);
        titleRect = new Rect(100, 0, 1800, 400);
        choice = 0;
    }
Exemplo n.º 40
0
    void Awake()
    {
        
        Screen.SetResolution(1280, 720, true);
        audioSource = GetComponent<AudioSource>();
        sectorMgr = GameObject.FindObjectOfType<SectorManager>();
        uiMgr = GameObject.FindObjectOfType<UIManager>();
        bgmMgr = GameObject.FindObjectOfType<BGMManager>();
        tutorial = GameObject.FindObjectOfType<Tutorial>();
        Application.targetFrameRate = 60;
        line.color = Color.clear;

        isStarsVisible = new bool[stars.Length];
        starsET = new float[stars.Length];

        Ranking.instance.CheckInstance();
    }
Exemplo n.º 41
0
    void Awake()
    {
        if (instance == null) {
            instance = this;
            DontDestroyOnLoad(gameObject);
        } else {
            Destroy(gameObject);
        }
        gameover = GetComponent<GameOverMenu>();
        fader = GetComponent<Fader>();
        gman = GetComponent<GUIManager>();
        pauseScreen = GetComponent<PauseScreen>();
        bgmm = GetComponent<BGMManager>();
        semm = GetComponent<SEManager>();
        GameObject storyController = GameObject.FindGameObjectWithTag(Tags.storyController);
        if (storyController != null) {
            storysemm = storyController.GetComponent<SEManager>();
        }

        paused = false;
    }