Exemple #1
0
    public override void move(int count)
    {
        qAnime.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.FLY_STRAIGHT);
        obj.transform.Translate(Vector3.forward * speed / 2);
        float sinnum = 0.1f * Mathf.Cos(count * 0.1f);

        obj.transform.Translate(Vector3.right * sinnum);
    }
Exemple #2
0
    public void Left()
    {
        if (isTurning || isStop)
        {
            return;
        }

        // flip
        if (GameMain.Instance.IsBossTurn)
        {
            queryAnimationController.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.Right);
        }
        else
        {
            queryAnimationController.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.Left);
        }

        myAngle = angle * -0.8f;
    }
Exemple #3
0
    public override void move(int count)
    {
        qAnime.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.FLY_DOWN);
        // プレハブを取得
        //prefab = (GameObject)Resources.Load ("Prefabs/Laser1");
        // プレハブからインスタンスを生成
        //if(instant_object==null){
        //iti

        /**Vector3 vec3 = obj.transform.position;
         * instant_object = (GameObject) GameObject.Instantiate(
         *      prefab,vec3,Quaternion.identity);
         * //kakudo
         * vec3 = obj.transform.eulerAngles;
         * instant_object.transform.Rotate(vec3);
         * //kieru
         * GameObject.Destroy(instant_object,3);
         */
        //}
    }
Exemple #4
0
    // Update is called once per frame
    void Update()
    {
        // 座標を移動等させる時、値を一度格納し
        // それを代入しなおす形にしないとエラーをはかれる 謎


        // キー入力のテスト PCでも動作させるため
        if (Input.GetKey(KeyCode.RightArrow))
        {
            //temp.x += 0.3f;
        }

        if (Input.GetKey(KeyCode.LeftArrow))
        {
            //temp.x -= 0.3f;
        }

        // タッチパネル入力テスト

        /**
         * -memo-
         *
         *  Began タッチの開始
         *  Ended タッチの終了
         *	Moved 移動中
         *	Stationary タッチが継続中の場合(非移動中)
         *	Canceled タッチがキャンセルになった場合
         */
        /**
         * if (Input.touchCount > 0) {
         *      // パネルが1つ以上タッチされている
         *      if(Input.GetTouch (0).phase == TouchPhase.Began) {
         *              if(Screen.width / 5 > Input.GetTouch (0).position.x) {
         *                      temp.x += 0.3f;
         *              }
         *              else {
         *                      temp.x -= 0.3f;
         *              }
         *      }
         *
         *      if(Input.GetTouch (0).phase == TouchPhase.Moved
         || Input.GetTouch (0).phase == TouchPhase.Stationary) {
         ||             if(Screen.width / 2 < Input.GetTouch (0).position.x) {
         ||                     temp.x += 0.3f;
         ||             }
         ||             else {
         ||                     temp.x -= 0.3f;
         ||             }
         ||     }
         ||
         ||     if(Input.GetTouch (0).phase == TouchPhase.Ended) {
         ||
         ||     }
         ||}
         ||
         ||// 入力に応じて移動
         ||bar.transform.position = temp;
         */

        /*if (Input.touchCount > 0) {
         *      if(Input.GetTouch(0).phase == TouchPhase.Began) {
         *              Ray ray = Camera.main.ScreenPointToRay(Input.GetTouch(0).position);
         *              RaycastHit hit;
         *
         *              if(background.collider.Raycast (ray, out hit, 1000)) {*/
        if (count <= 0)
        {
            count = 80;

            GameObject obj;
            Circle     script;
            Animator   animator;

            Vector3 pos = new Vector3(player.transform.position.x, 0.1f, player.transform.position.z);

            // プレハブを複製
            //obj = Instantiate (circleSign, pos, Quaternion.identity) as GameObject;
            //obj.renderer.enabled = true;

            // プレハブに設定されているスクリプトを取得
            script = circleSign.GetComponent <Circle> ();
            script.create(pos, Circle.SPARK);
        }
        else
        {
            count--;
        }

        /*}
         * }
         *      }*/

        if (Input.GetKey(KeyCode.Q))
        {
            QueryAnimationController script = query.GetComponent <QueryAnimationController>();
            script.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.FLY_IDLE);
        }

        if (Input.GetKey(KeyCode.W))
        {
            QueryAnimationController script = query.GetComponent <QueryAnimationController>();
            script.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.FLY_STRAIGHT);
        }

        if (Input.GetKey(KeyCode.E))
        {
            QueryAnimationController script = query.GetComponent <QueryAnimationController>();
            script.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.FLY_ITEMGET_LOOP);
        }



        // タッチ座標にサインの表示

        /*if (Input.touchCount > 0) {
         *      if (Input.GetTouch (0).phase == TouchPhase.Began) {
         *              circleSign.renderer.enabled = true;
         *              //Instantiate (circleSign, Input.GetTouch (0).position, Quaternion.identity);
         *              Instantiate (circleSign, new Vector3(0, 0, 0), Quaternion.identity);
         *              circleSign.renderer.enabled = false;
         *      }
         */
    }
Exemple #5
0
 public override void move(int count)
 {
     qAnime.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.FLY_TORIGHT);
     obj.transform.Translate(Vector3.right * speed / 2);
     obj.transform.Rotate(0, 2, 0);
 }
Exemple #6
0
 public override void move(int count)
 {
     qAnime.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.FLY_DISAPPOINTMENT);
 }
Exemple #7
0
 public override void move(int count)
 {
     qAnime.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.FLY_DAMAGE);
 }
Exemple #8
0
 public override void move(int count)
 {
     qAnime.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.FLY_STRAIGHT);
     obj.transform.Translate(Vector3.forward * speed);
 }
Exemple #9
0
 public void Straight()
 {
     queryAnimationController.ChangeAnimation(QueryAnimationController.QueryChanAnimationType.Straight);
 }