コード例 #1
0
        // Update is called once per frame
        void Update()
        {
            _GestureManager = GestureManager.GetComponent <GestureManager>();
            _BodyManager    = BodySourceManager.GetComponent <BodySourceManager>();
            _ColorBodyView  = BodySourceManager.GetComponent <ColorBodySourceView>();

            if (_GestureManager == null || _ColorBodyView == null || _BodyManager == null)
            {
                return;
            }

            if (_MainCamera == null)
            {
                _MainCamera = GameObject.Find("ConvertCamera").GetComponent <Camera>();
            }

            if (!_IsRegMethod)
            {
                Debug.Log("REG");
                _GestureManager.GestureDetected += _GestureManager_GestureDetected;
                _IsRegMethod = true;
            }

            foreach (GameObject body in _ColorBodyView.GetBodies())
            {
                AddingTrailRendererToBody(body);
            }

            //
            EffekseerHandle eh         = EffekseerSystem.PlayEffect(_EffectNames[2], _ColorBodyView.GetBodies()[0].transform.Find(JointType.HandLeft.ToString()).transform.position);
            var             floorPlane = _BodyManager.FloorClipPlane;
            var             comp       = Quaternion.FromToRotation(new Vector3(floorPlane.X, floorPlane.Y, floorPlane.Z), Vector3.left);

            eh.SetRotation(_BodyManager.GetData()[0].JointOrientations[JointType.HandLeft].Orientation.ToQuaternion(comp));
        }
コード例 #2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        // アイテムを取ったらスコア加算をする
        if (collision.gameObject.tag == "Item")
        {
            ItemEffect item = collision.gameObject.GetComponent <ItemEffect>();

            scoreManager.AddScore(item.score);

            sweetGetCount++;

            // エフェクトの取得
            EffekseerHandle handle = default;

            // ボーナス中かどうかで取得した時のエフェクトを変更する
            if (gameMainManager.CoinGetRate > 1.0f)
            {
                handle = EffekseerSystem.PlayEffect(heartShineEffect, transform.position);
                SoundManager.Instance.PlaySE("Heart_Shine");
            }
            else
            {
                handle = EffekseerSystem.PlayEffect(heartEffect, transform.position);
                SoundManager.Instance.PlaySE("Heart");
            }

            // エフェクトを更新で追従させるためにリストにいれる
            heartEffectList.Add(handle);
        }
    }
コード例 #3
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (!isAngry)
        {
            if (collision.tag == "Player")
            {
                isAngry = true;

                // 店員の色を変える
                Color color = sprite.color;
                color.b      = 0.5f;
                color.g      = 0.5f;
                sprite.color = color;

                // 怒りエフェクトを再生
                effectHandle = EffekseerSystem.PlayEffect(effect, this.transform.position);

                // 怒り音を再生
                SoundManager.Instance.PlaySE("Angry");

                // 時間減算UIを表示
                GameObject obj = Instantiate(MinusTimeUIObject, CanvasObject.transform);
                obj.transform.position = RectTransformUtility.WorldToScreenPoint(cameraObject, this.transform.position);
                obj.GetComponent <TextMeshProUGUI>().text = (-MinusTime).ToString();

                //チュートリアルの変更
                m_TutrialManager.TutrialChange(m_StateID);
                batumage.StartDisplay();
            }
        }
    }
コード例 #4
0
 private void PlayEffect()
 {
     if (!String.IsNullOrEmpty(effectName) && emitterObject)
     {
         effectHandle = EffekseerSystem.PlayEffect(effectName,
                                                   emitterObject.transform.position);
     }
 }
コード例 #5
0
    /// <summary>
    /// 解放エフェクトの開始
    /// </summary>
    public void StartReleaseEffect()
    {
        float size = cameraController.GetScreenRight() - cameraController.GetScreenLeft();

        size = size / 5.0f;
        // エフェクト再生(画面の中心から1/5の位置に出す)
        releaseEffectHandle = EffekseerSystem.PlayEffect(releaseEffect, new Vector3(-size, 0f));
        SoundManager.Instance.PlaySE("Release");
    }
コード例 #6
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        // アイテムを取ったら
        if (collision.gameObject.tag == "Item")
        {
            ItemEffect item = collision.gameObject.GetComponent <ItemEffect>();



            // エフェクトの取得
            EffekseerHandle handle = EffekseerSystem.PlayEffect(heartEffect, transform.position);
            SoundManager.Instance.PlaySE("Heart");

            // エフェクトを更新で追従させるためにリストにいれる
            heartEffectList.Add(handle);
        }
    }