Beispiel #1
0
 // --------------------------------------------------------------------------------
 // Awake
 // Startより早い処理
 // この関数は常に Start 関数の前およびプレハブのインスタンス化直後に呼び出されます。(もしゲームオブジェクトがスタートアップ時に無効である場合、有効になるまで Awake は呼び出されません。)
 // --------------------------------------------------------------------------------
 void Awake()
 {
     posx          = this.transform.position.x;
     posy          = this.transform.position.y;
     GameMain      = GameObject.Find("GameMain");
     GMScript      = GameMain.GetComponent <GameMainScript>();
     Hanamaru      = this.transform.Find("Hanamaru").GetComponent <Image>();
     Batu          = this.transform.Find("Batu").GetComponent <Image>();
     CARD_IMAGE    = this.transform.Find("Home").GetComponent <Image>(); // カードイメージ格納
     DeckMasterPos = GameObject.Find("DeckMaster").transform.Find("card").gameObject
                     .transform.position;
     thisnamenum   = int.Parse(this.name.Replace("card_", ""));
     TXT_CARD      = this.gameObject.GetComponentInChildren <Text>();   // カードテキスト
     TXT_CARD.text = "";
     PIN           = this.transform.Find("Pin").GetComponent <Image>(); // ピン
     PIN.enabled   = false;                                             // ピンを非表示
 }
Beispiel #2
0
    bool[] blArray;          // 置かれたオブジェクト名を保持するArray

    // Start is called before the first frame update
    void Start()
    {
        GameMain = GameObject.Find("GameMain");
        GMScript = GameMain.GetComponent <GameMainScript>();

        // カードオブジェクト管理用
        int        cnt  = 0;
        GameObject Deck = GameObject.Find("Deck");

        foreach (Transform child in Deck.transform)
        {
            foreach (Transform son in child.transform)
            {
                cnt++;
            }
        }
        blArray = new bool[cnt];
        Card_PutInit(); // カード情報初期化
    }
Beispiel #3
0
    int ivar;           // M,m,7,he

    // Use this for initialization
    void Start()
    {
        CorrectPrefab = Resources.Load <Transform> ("Image");

        C01_C             = Resources.Load <Sprite> ("Code/C/Image/C01_C");
        C02_Cm            = Resources.Load <Sprite> ("Code/C/Image/C02_Cm");
        C03_C7            = Resources.Load <Sprite> ("Code/C/Image/C03_C7");
        C04_C_Bass        = Resources.Load <Sprite> ("Code/C/Image/C04_C_Bass");
        C05_C_Dummy1      = Resources.Load <Sprite> ("Code/C/Image/C05_C_Dummy1");
        C06_C_Dummy2      = Resources.Load <Sprite> ("Code/C/Image/C06_C_Dummy2");
        C07_C7_Dummy1     = Resources.Load <Sprite> ("Code/C/Image/C07_C7_Dummy1");
        C08_C7_Dummy2     = Resources.Load <Sprite> ("Code/C/Image/C08_C7_Dummy2");
        C09_C7_Dummy3     = Resources.Load <Sprite> ("Code/C/Image/C09_C7_Dummy3");
        C10_C_Bass_Dummy1 = Resources.Load <Sprite> ("Code/C/Image/C10_C_Bass_Dummy1");
        C11_C_Bass_Dummy2 = Resources.Load <Sprite> ("Code/C/Image/C11_C_Bass_Dummy2");
        C12_C_Bass_Dummy3 = Resources.Load <Sprite> ("Code/C/Image/C12_C_Bass_Dummy3");
        C13_C             = Resources.Load <Sprite> ("Code/C/Image/C13_C");
        C14_Cm            = Resources.Load <Sprite> ("Code/C/Image/C14_Cm");
        C15_C7            = Resources.Load <Sprite> ("Code/C/Image/C15_C7");

        D01_D             = Resources.Load <Sprite> ("Code/D/Image/D01_D");
        D02_Dm            = Resources.Load <Sprite> ("Code/D/Image/D02_Dm");
        D03_D7            = Resources.Load <Sprite> ("Code/D/Image/D03_D7");
        D04_D_Bass        = Resources.Load <Sprite> ("Code/D/Image/D04_D_Bass");
        D05_D_Dummy1      = Resources.Load <Sprite> ("Code/D/Image/D05_D_Dummy1");
        D06_D_Dummy2      = Resources.Load <Sprite> ("Code/D/Image/D06_D_Dummy2");
        D07_D7_Dummy1     = Resources.Load <Sprite> ("Code/D/Image/D07_D7_Dummy1");
        D08_D7_Dummy2     = Resources.Load <Sprite> ("Code/D/Image/D08_D7_Dummy2");
        D09_D7_Dummy3     = Resources.Load <Sprite> ("Code/D/Image/D09_D7_Dummy3");
        D10_D_Bass_Dummy1 = Resources.Load <Sprite> ("Code/D/Image/D10_D_Bass_Dummy1");
        D11_D_Bass_Dummy2 = Resources.Load <Sprite> ("Code/D/Image/D11_D_Bass_Dummy2");
        D12_D_Bass_Dummy3 = Resources.Load <Sprite> ("Code/D/Image/D12_D_Bass_Dummy3");
        D13_D             = Resources.Load <Sprite> ("Code/D/Image/D13_D");
        D14_Dm            = Resources.Load <Sprite> ("Code/D/Image/D14_Dm");
        D15_D7            = Resources.Load <Sprite> ("Code/D/Image/D15_D7");

        E01_E             = Resources.Load <Sprite> ("Code/E/Image/E01_E");
        E02_Em            = Resources.Load <Sprite> ("Code/E/Image/E02_Em");
        E03_E7            = Resources.Load <Sprite> ("Code/E/Image/E03_E7");
        E04_E_Bass        = Resources.Load <Sprite> ("Code/E/Image/E04_E_Bass");
        E05_E_Dummy1      = Resources.Load <Sprite> ("Code/E/Image/E05_E_Dummy1");
        E06_E_Dummy2      = Resources.Load <Sprite> ("Code/E/Image/E06_E_Dummy2");
        E07_E7_Dummy1     = Resources.Load <Sprite> ("Code/E/Image/E07_E7_Dummy1");
        E08_E7_Dummy2     = Resources.Load <Sprite> ("Code/E/Image/E08_E7_Dummy2");
        E09_E7_Dummy3     = Resources.Load <Sprite> ("Code/E/Image/E09_E7_Dummy3");
        E10_E_Bass_Dummy1 = Resources.Load <Sprite> ("Code/E/Image/E10_E_Bass_Dummy1");
        E11_E_Bass_Dummy2 = Resources.Load <Sprite> ("Code/E/Image/E11_E_Bass_Dummy2");
        E12_E_Bass_Dummy3 = Resources.Load <Sprite> ("Code/E/Image/E12_E_Bass_Dummy3");
        E13_E             = Resources.Load <Sprite> ("Code/E/Image/E13_E");
        E14_Em            = Resources.Load <Sprite> ("Code/E/Image/E14_Em");
        E15_E7            = Resources.Load <Sprite> ("Code/E/Image/E15_E7");

        F01_F             = Resources.Load <Sprite> ("Code/F/Image/F01_F");
        F02_Fm            = Resources.Load <Sprite> ("Code/F/Image/F02_Fm");
        F03_F7            = Resources.Load <Sprite> ("Code/F/Image/F03_F7");
        F04_F_Bass        = Resources.Load <Sprite> ("Code/F/Image/F04_F_Bass");
        F05_F_Dummy1      = Resources.Load <Sprite> ("Code/F/Image/F05_F_Dummy1");
        F06_F_Dummy2      = Resources.Load <Sprite> ("Code/F/Image/F06_F_Dummy2");
        F07_F7_Dummy1     = Resources.Load <Sprite> ("Code/F/Image/F07_F7_Dummy1");
        F08_F7_Dummy2     = Resources.Load <Sprite> ("Code/F/Image/F08_F7_Dummy2");
        F09_F7_Dummy3     = Resources.Load <Sprite> ("Code/F/Image/F09_F7_Dummy3");
        F10_F_Bass_Dummy1 = Resources.Load <Sprite> ("Code/F/Image/F10_F_Bass_Dummy1");
        F11_F_Bass_Dummy2 = Resources.Load <Sprite> ("Code/F/Image/F11_F_Bass_Dummy2");
        F12_F_Bass_Dummy3 = Resources.Load <Sprite> ("Code/F/Image/F12_F_Bass_Dummy3");
        F13_F             = Resources.Load <Sprite> ("Code/F/Image/F13_F");
        F14_Fm            = Resources.Load <Sprite> ("Code/F/Image/F14_Fm");
        F15_F7            = Resources.Load <Sprite> ("Code/F/Image/F15_F7");

        G01_G             = Resources.Load <Sprite> ("Code/G/Image/G01_G");
        G02_Gm            = Resources.Load <Sprite> ("Code/G/Image/G02_Gm");
        G03_G7            = Resources.Load <Sprite> ("Code/G/Image/G03_G7");
        G04_G_Bass        = Resources.Load <Sprite> ("Code/G/Image/G04_G_Bass");
        G05_G_Dummy1      = Resources.Load <Sprite> ("Code/G/Image/G05_G_Dummy1");
        G06_G_Dummy2      = Resources.Load <Sprite> ("Code/G/Image/G06_G_Dummy2");
        G07_G7_Dummy1     = Resources.Load <Sprite> ("Code/G/Image/G07_G7_Dummy1");
        G08_G7_Dummy2     = Resources.Load <Sprite> ("Code/G/Image/G08_G7_Dummy2");
        G09_G7_Dummy3     = Resources.Load <Sprite> ("Code/G/Image/G09_G7_Dummy3");
        G10_G_Bass_Dummy1 = Resources.Load <Sprite> ("Code/G/Image/G10_G_Bass_Dummy1");
        G11_G_Bass_Dummy2 = Resources.Load <Sprite> ("Code/G/Image/G11_G_Bass_Dummy2");
        G12_G_Bass_Dummy3 = Resources.Load <Sprite> ("Code/G/Image/G12_G_Bass_Dummy3");
        G13_G             = Resources.Load <Sprite> ("Code/G/Image/G13_G");
        G14_Gm            = Resources.Load <Sprite> ("Code/G/Image/G14_Gm");
        G15_G7            = Resources.Load <Sprite> ("Code/G/Image/G15_G7");

        A01_A             = Resources.Load <Sprite> ("Code/A/Image/A01_A");
        A02_Am            = Resources.Load <Sprite> ("Code/A/Image/A02_Am");
        A03_A7            = Resources.Load <Sprite> ("Code/A/Image/A03_A7");
        A04_A_Bass        = Resources.Load <Sprite> ("Code/A/Image/A04_Bass");
        A05_A_Dummy1      = Resources.Load <Sprite> ("Code/A/Image/A05_A_Dummy1");
        A06_A_Dummy2      = Resources.Load <Sprite> ("Code/A/Image/A06_A_Dummy2");
        A07_A7_Dummy1     = Resources.Load <Sprite> ("Code/A/Image/A07_A7_Dummy1");
        A08_A7_Dummy2     = Resources.Load <Sprite> ("Code/A/Image/A08_A7_Dummy2");
        A09_A7_Dummy3     = Resources.Load <Sprite> ("Code/A/Image/A09_A7_Dummy3");
        A10_A_Bass_Dummy1 = Resources.Load <Sprite> ("Code/A/Image/A10_Bass_Dummy1");
        A11_A_Bass_Dummy2 = Resources.Load <Sprite> ("Code/A/Image/A11_Bass_Dummy2");
        A12_A_Bass_Dummy3 = Resources.Load <Sprite> ("Code/A/Image/A12_Bass_Dummy3");
        A13_A             = Resources.Load <Sprite> ("Code/A/Image/A13_A");
        A14_Am            = Resources.Load <Sprite> ("Code/A/Image/A14_Am");
        A15_A7            = Resources.Load <Sprite> ("Code/A/Image/A15_A7");

        B01_B             = Resources.Load <Sprite> ("Code/B/Image/B01_B");
        B02_Bm            = Resources.Load <Sprite> ("Code/B/Image/B02_Bm");
        B03_B7            = Resources.Load <Sprite> ("Code/B/Image/B03_B7");
        B04_B_Bass        = Resources.Load <Sprite> ("Code/B/Image/B04_B_Bass");
        B05_B_Dummy1      = Resources.Load <Sprite> ("Code/B/Image/B05_B_Dummy1");
        B06_B_Dummy2      = Resources.Load <Sprite> ("Code/B/Image/B06_B_Dummy2");
        B07_B7_Dummy1     = Resources.Load <Sprite> ("Code/B/Image/B07_B7_Dummy1");
        B08_B7_Dummy2     = Resources.Load <Sprite> ("Code/B/Image/B08_B7_Dummy2");
        B09_B7_Dummy3     = Resources.Load <Sprite> ("Code/B/Image/B09_B7_Dummy3");
        B10_B_Bass_Dummy1 = Resources.Load <Sprite> ("Code/B/Image/B10_B_Bass_Dummy1");
        B11_B_Bass_Dummy2 = Resources.Load <Sprite> ("Code/B/Image/B11_B_Bass_Dummy2");
        B12_B_Bass_Dummy3 = Resources.Load <Sprite> ("Code/B/Image/B12_B_Bass_Dummy3");
        B13_B             = Resources.Load <Sprite> ("Code/B/Image/B13_B");
        B14_Bm            = Resources.Load <Sprite> ("Code/B/Image/B14_Bm");
        B15_B7            = Resources.Load <Sprite> ("Code/B/Image/B15_B7");

        CDEAB = Resources.Load <Sprite> ("Code/C/Image/CDEAB");
        FG    = Resources.Load <Sprite> ("Code/F/Image/FG");

        ChooseButton = GameObject.Find("TChooseButton");

        audioC01M = Resources.Load <AudioClip>("Code/C/Sound/C");
        audioC02m = Resources.Load <AudioClip>("Code/C/Sound/Cm");
        audioC037 = Resources.Load <AudioClip>("Code/C/Sound/C7");
        audioC04b = Resources.Load <AudioClip>("Code/C/Sound/Cbass");

        audioD01M = Resources.Load <AudioClip>("Code/D/Sound/D");
        audioD02m = Resources.Load <AudioClip>("Code/D/Sound/Dm");
        audioD037 = Resources.Load <AudioClip>("Code/D/Sound/D7");
        audioD04b = Resources.Load <AudioClip>("Code/D/Sound/Dbass");

        audioE01M = Resources.Load <AudioClip>("Code/E/Sound/E");
        audioE02m = Resources.Load <AudioClip>("Code/E/Sound/Em");
        audioE037 = Resources.Load <AudioClip>("Code/E/Sound/E7");
        audioE04b = Resources.Load <AudioClip>("Code/E/Sound/Ebass");

        audioF01M = Resources.Load <AudioClip>("Code/F/Sound/F");
        audioF02m = Resources.Load <AudioClip>("Code/F/Sound/Fm");
        audioF037 = Resources.Load <AudioClip>("Code/F/Sound/F7");
        audioF04b = Resources.Load <AudioClip>("Code/F/Sound/Fbass");

        audioG01M = Resources.Load <AudioClip>("Code/G/Sound/G");
        audioG02m = Resources.Load <AudioClip>("Code/G/Sound/Gm");
        audioG037 = Resources.Load <AudioClip>("Code/G/Sound/G7");
        audioG04b = Resources.Load <AudioClip>("Code/G/Sound/Gbass");

        audioA01M = Resources.Load <AudioClip>("Code/A/Sound/A");
        audioA02m = Resources.Load <AudioClip>("Code/A/Sound/Am");
        audioA037 = Resources.Load <AudioClip>("Code/A/Sound/A7");
        audioA04b = Resources.Load <AudioClip>("Code/A/Sound/Abass");

        audioB01M = Resources.Load <AudioClip>("Code/B/Sound/B");
        audioB02m = Resources.Load <AudioClip>("Code/B/Sound/Bm");
        audioB037 = Resources.Load <AudioClip>("Code/B/Sound/B7");
        audioB04b = Resources.Load <AudioClip>("Code/B/Sound/Bbass");

        audioSource = gameObject.GetComponent <AudioSource>();          // audioInit

        GMS = GetComponent <GameMainScript> ();
    }