Example #1
0
    void Awake()
    {
        // アセットの参照受け取り
        playerData = Resources.Load <PlayerData>("Assets/PlayerData");
        defineData = Resources.Load <DefineData>("Assets/DefineData");

        // ゲームオブジェクトの参照受け取り
        sceneObj = FindObjectOfType <GameMainSceneController>();
        childObjCreatePointObj = FindObjectOfType <ChildObjCreatePoint>();

        // プレハブの読み込み
//		prefabAttackObj = (GameObject)Resources.Load("Prefabs/GameMain/AttackObj");

        // パーティクルオブジェ取得
        foreach (Transform child in transform)
        {
            if (child.name == "AttackWater")
            {
                attackWaterObj = child.GetComponent <ParticleSystem>();
            }
        }

        // プレイヤーアイコンオブジェの取得
        numIconObj = this.transform.FindChild("Player_NumIcon");
        numIconPos = numIconObj.localPosition;

        // ボタン文字列に自分のIDを追加
        horizontalStr += this.name;
        verticalStr   += this.name;
        upStr         += this.name;
        attackStr     += this.name;

        // 移動限界値の設定
        max = defineData.STAGE_BOARDER_SIZE / 2.0f;
        min = -(defineData.STAGE_BOARDER_SIZE / 2.0f);

        // rootの参照を取得
        foreach (Transform child in transform)
        {
            if (child.name == "root")
            {
                rootObj = child.gameObject;
            }
        }

        // リジッドボディの取得
        rigidbody = GetComponent <Rigidbody>();

        // レンダラーコンポーネントの取得
        rendererObj = GetComponent <MeshRenderer>();
    }
Example #2
0
    void Awake()
    {
        sceneObj = FindObjectOfType <GameMainSceneController>();

        timerObjArray = new GameObject[transform.childCount];

        foreach (Transform child in transform)
        {
            if (child.name == "Minute")
            {
                timerObjArray[(int)E_TIMERTYPE.MINUTE] = child.gameObject;
            }

            if (child.name == "Sec")
            {
                timerObjArray[(int)E_TIMERTYPE.SEC] = child.gameObject;
            }
        }

        timerObjArray[(int)E_TIMERTYPE.MINUTE].SetActive(true);
        timerObjArray[(int)E_TIMERTYPE.SEC].SetActive(false);
    }
Example #3
0
    void Awake()
    {
        // GameMainSceneControllerのゲームオブジェクトを取得
        sceneObj = GameObject.FindObjectOfType <GameMainSceneController>();

        // このスクリプトを付けているTextオブジェを取得
        RawImage[] childArray = GetComponentsInChildren <RawImage>();

        rawImageObjArray = new RawImage[childArray.Length];

        for (int i = 0; i < childArray.Length; i++)
        {
            foreach (RawImage rawImageObj in childArray)
            {
                if (int.Parse(rawImageObj.name) == i)
                {
                    rawImageObjArray[i] = rawImageObj;
                }
            }
        }

        UVRect = rawImageObjArray[0].uvRect;
    }
Example #4
0
 void Awake()
 {
     // GameMainSceneControllerのゲームオブジェクトを取得
     sceneObj = GameObject.FindObjectOfType <GameMainSceneController>();
 }