Exemple #1
0
    // Use this for initialization
    void Start()
    {
        //ゲームコントロールスクリプトの取得
        var go = GameObject.Find("GameControl");
        Camera2DControl = go.GetComponent<camera2d>();

        //初期位置を保存
        pos = transform.position;
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        Destroy (gameObject, 3.0f);

        //ゲームコントロールスクリプトの取得
        var go = GameObject.Find("GameControl");
        Camera2DControl = go.GetComponent<camera2d>();

        //初期位置を保存
        pos = transform.position;

        Update ();	//座標尾更新するのに1ど呼ぶ
    }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        var go = GameObject.Find("GameControl");
        Camera2DControl = go.GetComponent<camera2d>();

        background_front = GameObject.Find("backgrounds_front");
        background_center = GameObject.Find("background_center");
        background_back = GameObject.Find("backgroung_back");

        background_front.transform.position = new Vector3(-81.08362f, -53.67706f, 169.4585f);
        background_center.transform.position = new Vector3(-48.76801f, 227.8253f, 119.4256f);
        background_back.transform.position = new Vector3(-81.75049f, 237.6096f, 405.6156f);

        background_front_initpos = background_front.transform.position;
        background_center_initpos = background_center.transform.position;
        background_back_initpos = background_back.transform.position;
    }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     //ゲームコントロールスクリプトの取得
     {
         var go = GameObject.Find("GameControl");
         GameControl = go.GetComponent<gamemain>();
         Camera2DControl = go.GetComponent<camera2d>();
         effectcontrol = go.GetComponent<effect_control>();
     }
     {
         var go = GameObject.Find("SoundContrlo");
         soundcontrol = go.GetComponent<sound>();
     }
     {
         //プレイヤーのgameobjectから動作を判断する
         var go = GameObject.Find("character_template_3head_Control");
         playercntrol = go.GetComponent<player>();
     }
 }
Exemple #5
0
    // Use this for initialization
    void Start()
    {
        //繧イ繝シ繝?繧ウ繝ウ繝医Ο繝シ繝ォ繧ケ繧ッ繝ェ繝励ヨ縺ョ蜿門セ?
        var go = GameObject.Find("GameControl");
        Camera2DControl = go.GetComponent<camera2d>();
        audioSource = gameObject.GetComponent<AudioSource>();

        audioSource.clip = audioClip_bgm;
        audioSource.loop = true;
        audioSource.Play();

        KeyInit( );	//繧ュ繝シ蜈・蜉帛?譛溷喧

        int i;
        for ( i = 0; i < COLLISION_MAX; i++ )
        {
            coldisp[i] = GameObject.CreatePrimitive(PrimitiveType.Cube);
            coldisp[i].transform.position = new Vector3(-2000.0f, -2000.0f, 0.0f);
            coldisp[i].transform.localScale = new Vector3(0.0f, 0.0f, 1.0f);
        }
    }
Exemple #6
0
 // Use this for initialization
 void Start()
 {
     //ゲームコントロールスクリプトの取得
     {
         var go = GameObject.Find("GameControl");
         GameControl = go.GetComponent<gamemain>();
         Camera2DControl = go.GetComponent<camera2d>();
         effectcontrol = go.GetComponent<effect_control>();
     }
     {
         var go = GameObject.Find("SoundContrlo");
         soundcontrol = go.GetComponent<sound>();
     }
     direction = 0;									//左向き
 }