Пример #1
0
    void IncreaseFind(string tag)
    {
        float inclease = Time.deltaTime * 0.5f;

        gauge += inclease;
        if (gauge <= 1)
        {
            findGauge.GetComponent <Image>().fillAmount += inclease;
        }
        else
        {
            findGauge.GetComponent <Image>().fillAmount = 1;

            state = tag;
            devLog.SendLog($"{tag}を見つけました");

            if (showPickUpButton)
            {
                pickUpController.TogglePickUpButton(
                    active: true,
                    newTargetTag: tag);
            }

            // nextCheck
            nextController.CheckNext("Find");
        }
    }
Пример #2
0
    public void PickUp()
    {
        // CH_のついたチルドレンオブジェクトの場合親を削除
        if (targetTag.Substring(0, 3) == "CH_")
        {
            targetTag = targetTag.Substring(3);
        }

        Destroy(GameObject.FindGameObjectWithTag(targetTag));
        Destroy(GameObject.FindGameObjectWithTag("TargetIndicator"));

        // nextCheck
        nextController.CheckNext("PickUp");
    }