コード例 #1
0
    void LaneFlow()
    {
        if (liftFlag)
        {
            return;
        }

        Vector3 work = Vector3.zero;

        if (LaneControl.BugFreezeFlag())
        {
            selfRigidBody.velocity = work;
            return;
        }

        work.y = selfRigidBody.velocity.y;

        work.x = moveLaneVelocity.x * LANE_SPEED;
        work.z = moveLaneVelocity.z * LANE_SPEED;

        selfRigidBody.velocity = work;
    }
コード例 #2
0
 public void FirstSet(LaneControl lane, eItemType type, Material mat)
 {
     laneControlClass = lane;
     itemType         = type;
     GetComponent <MeshRenderer>().material = mat;
 }
コード例 #3
0
    public void ItemGoal(FlowItem.eItemType type)
    {
        //正解かどうかの情報をとっておく
        if (type == recipes[recipeIndex][itemIndex])
        {
            correctDatas[recipeIndex]++;
        }
        else if (type == FlowItem.eItemType.disturb)
        {
            //お邪魔アイテムの場合はフリーズ
            LaneControl.StartBug();
        }

        //正解の場合
        //if (type == recipes[recipeIndex][itemIndex])
        //{
        itemIndex++;

        //4つそろったら次へ
        if (itemIndex > 3)
        {
            itemIndex = 0;
            recipeIndex++;
            if (recipeIndex >= recipes.Count)
            {
                Debug.Log("ウイルス退治演出へ");
            }
            else
            {
                if (recipeIndex <= recipes.Count - 4)
                {
                    GameObject go;
                    go = Instantiate(recipeUiPrefav, Vector3.zero, Quaternion.identity);
                    go.transform.parent        = transform;
                    go.transform.localScale    = new Vector3(7.0f, 1.0f, 1.0f);
                    go.transform.localPosition = new Vector3(0.0f, -4.6f, 0.0f);
                    go.transform.localRotation = new Quaternion(0.0f, 0.0f, 0.0f, 1.0f);
                    recipeUis.Add(go.GetComponent <Recipe>());
                    recipeUis[recipeUis.Count - 1].SetColors(uiItemColors[(int)recipes[recipeIndex + 3][0]],
                                                             uiItemColors[(int)recipes[recipeIndex + 3][1]], uiItemColors[(int)recipes[recipeIndex + 3][2]], uiItemColors[(int)recipes[recipeIndex + 3][3]]);
                }

                //次のアイテムを生成
                ItemLaneAdd();

                //レシピリストのクリーン
                for (int i = 0; i < recipeUis.Count; i++)
                {
                    if (!recipeUis[i])
                    {
                        recipeUis.RemoveAt(i);
                    }
                }

                //--- レシピを上にあげる ---
                // ここでレシピの演出よんで、演出終わったら上にあげるこの処理呼ぶのがよさそう
                for (int i = 0; i < recipeUis.Count; i++)
                {
                    recipeUis[i].UpPos();
                }
                //----------------------
            }
            return;
        }


        //}
        //不正解の場合はもう一度アイテムを再生成
        //else
        //   laneControlClass.AddCreateList(type);
    }