Inheritance: MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
コード例 #1
0
    //private GameObject existentCrossSceneButtonController;
    // Start is called before the first frame update
    private void Awake()
    {
        Screen.fullScreen = true;



        if (!MessageSender.GetWhetherExist())
        {
            messageSender = Resources.Load <GameObject>("Prefabs/CrossSceneMessageSender");
            existentCrossSceneMessageSender      = Instantiate(messageSender, transform.position, transform.rotation) as GameObject;
            existentCrossSceneMessageSender.name = messageSender.name;
        }
        if (!BKMusicPlayer.GetWhetherExist())
        {
            bKMusicController = Resources.Load <GameObject>("Prefabs/CrossSceneBKMusicController");
            existentCrossSceneBKMusicController      = Instantiate(bKMusicController, transform.position, transform.rotation) as GameObject;
            existentCrossSceneBKMusicController.name = bKMusicController.name;
        }
        if (!ButtonSoundPlayer.GetWhetherExist())
        {
            buttonSoundController = Resources.Load <GameObject>("Prefabs/CrossSceneButtonSoundController");
            existentCrossSceneButtonSoundController      = Instantiate(buttonSoundController, transform.position, transform.rotation) as GameObject;
            existentCrossSceneButtonSoundController.name = buttonSoundController.name;
        }

        /*
         * if (!ButtonController.whetherExist)
         * {
         *  existentCrossSceneButtonController= Instantiate(buttonController, transform.position, transform.rotation) as GameObject;
         *  existentCrossSceneButtonController.name = buttonController.name;
         * }
         */
    }
コード例 #2
0
 static UncategorizedFilterableEntity()
 {
     ButtonSounds = new ButtonSoundPlayer()
     {
         Enabled = true
     };
 }
コード例 #3
0
 //***************************************************************************
 //生命周期
 private void Awake()
 {
     ButtonSoundPlayer.whetherExist = true;
     ButtonSoundPlayer.theExistentButtonSoundController = this.gameObject;
     audioSourceOfButtonSound      = ButtonSoundPlayer.theExistentButtonSoundController.GetComponent <AudioSource>();
     ButtonSoundPlayer.theInstance = this;
     DontDestroyOnLoad(this.gameObject);
 }
コード例 #4
0
 static PUITuning()
 {
     // Initialization: Button sounds
     ButtonSounds = new ButtonSoundPlayer()
     {
         Enabled = true
     };
     ToggleSounds = new ToggleSoundPlayer();
 }
コード例 #5
0
    void Start()
    {
        instance       = this;
        gearClipIndex  = 0;
        SoundButton    = GameObject.Find("SoundButton");
        SoundOffButton = GameObject.Find("SoundOffButton");
        MusicButton    = GameObject.Find("MusicButton");
        MusicOffButton = GameObject.Find("MusicOffButton");
        soundState     = PlayerPrefs.GetInt("Sound");
        musicState     = PlayerPrefs.GetInt("Music");
//		HideOffButtons();
        MuteOnState();
        UIManager.instance.hidePaused();
    }
コード例 #6
0
 public void PlayClickButtonSound()
 {
     ButtonSoundPlayer.GetTheInstance().PlayButtonSound();
 }