Beispiel #1
0
    void AddNote(GameEventPayload _)
    {
        UnlockAction action = _.Get <UnlockAction>("Action");

        notes[action.targetCharacter.displayName].Add(action.noteToJournal);

        notePrefab.GetComponent <TMPro.TextMeshProUGUI>().text = action.noteToJournal;
        GameObject.Instantiate(notePrefab, Vector3.zero, Quaternion.identity, contentSpawner.transform);
    }
Beispiel #2
0
    public static void TryUnlock(Character character, Picture picture)
    {
        UnlockAction action = DatabaseManager.instance.unlockActions.Find(_ =>
                                                                          _.targetCharacter.displayName == character.displayName &&
                                                                          _.targetPicture.displayName == picture.displayName &&
                                                                          _.isUnlocked == false);

        if (action == null)
        {
            return;
        }

        action.isUnlocked = true;

        GameEventManager.OnUnlockAction.Invoke(new Dictionary <string, object>()
        {
            ["Action"] = action
        });
    }