コード例 #1
0
    // Use this for initialization
    void Start()
    {
        btncommon = GameObject.Find("Scripts").GetComponent <BtnCommon> ();

        changeMusicPlay = PlayerPrefs.GetInt("MusicPlay");
        changeSoundPlay = PlayerPrefs.GetInt("SoundPlay");
        if (changeMusicPlay == 2 && changeSoundPlay == 2)
        {
            btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteClickRed);
        }
        else if (changeMusicPlay == 2 && changeSoundPlay != 2)
        {
            btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteClickOrange);
        }
        else
        {
            btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteClickOriginal);
        }

        manager = GameObject.Find("Scripts").GetComponent <Manager> ();
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     spriteOriginal = GetComponent <SpriteRenderer>().sprite;
     btncommon      = GameObject.Find("Scripts").GetComponent <BtnCommon> ();
 }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     btncommon = GameObject.Find("Scripts").GetComponent <BtnCommon> ();
     manager   = GameObject.Find("Scripts").GetComponent <Manager> ();
 }