コード例 #1
0
    // Pick up has been collected
    public void PickupCollected(GameObject pickup)
    {
        Debug.Log("Pickup collected!");

        // Count the pickup collected
        questManager.PickupCollected(pickup.GetComponent <Pickup>().Index());

        // Set the screen ui
        hud.SetQuestProgressText(questManager.PickupsCollected() + "/" + questManager.TotalPickups());

        // If the pickups have all been collected
        if (questManager.AllPickupsCollected())
        {
            questComplete = true;
            Debug.Log("Collect Pickups quest complete");
        }
    }