Пример #1
0
 void OnAnyDragEnded(GameEventPayload _)
 {
     if (hoveredPicture != null)
     {
         UnlockActionManager.TryUnlock(character, hoveredPicture);
     }
 }
Пример #2
0
    void OnPictureUnlocked(GameEventPayload _)
    {
        Picture unlockedPicture = _.Get <Picture>("Picture");

        if (unlockedPicture.displayName == picture.displayName)
        {
            button.interactable = true;
        }
    }
Пример #3
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);
    }
    void OnUnlockActionEvent(GameEventPayload payload)
    {
        foreach (Picture picture in payload.Get <UnlockAction>("Action").unlockedPictures)
        {
            picture.state = Picture.PictureState.ToDiscover;

            GameEventManager.OnPictureToDiscover.Invoke(new Dictionary <string, object>()
            {
                ["Picture"] = picture
            });
        }
    }
Пример #5
0
    void OnCharacterChange(GameEventPayload _)
    {
        foreach (Transform transform in contentSpawner.transform)
        {
            Destroy(transform.gameObject);
        }

        Character character = _.Get <Character>("Character");

        foreach (string item in notes[character.displayName])
        {
            notePrefab.GetComponent <TMPro.TextMeshProUGUI>().text = item;
            GameObject.Instantiate(notePrefab, Vector3.zero, Quaternion.identity, contentSpawner.transform);
        }
    }
    static void OnAnyDragBegin(GameEventPayload payload)
    {
        if (behaviours.Count <= 1)
        {
            return;
        }

        DraggableBehaviour behaviour = payload.Get <DraggableBehaviour>("Behaviour");

        int i = behaviours.IndexOf(behaviour);

        behaviours.Move(i, 0);

        for (int j = 0; j < behaviours.Count; j++)
        {
            DraggableBehaviour b = behaviours[j];

            b.targetTransform.position = new Vector3(
                b.targetTransform.position.x,
                b.targetTransform.position.y,
                (1f - ((float)j / ((float)behaviours.Count - 1f))) * -1f
                );
        }
    }
Пример #7
0
 void OnCharacterChange(GameEventPayload _)
 {
     ToggleMap();
 }
Пример #8
0
 void OnPictureDiscovered(GameEventPayload _)
 {
     ToggleMap();
 }
Пример #9
0
 /// <summary>
 /// Méthode permettant l'invocation de l'évènement actuel et de ses parents
 /// </summary>
 public void Invoke(GameEventPayload o)
 {
     Event.Invoke(o);
 }
Пример #10
0
    /// <summary>
    /// Méthode permettant l'invocation de l'évènement actuel et de ses parents
    /// </summary>
    public void Invoke(Dictionary <string, System.Object> o = null)
    {
        GameEventPayload p = new GameEventPayload(o);

        Event.Invoke(p);
    }
    void OnPictureDiscovered(GameEventPayload _)
    {
        Picture p = _.Get <Picture>("Picture");

        Spawn(p);
    }