コード例 #1
0
    private void BroadcastCustomerSnippetSpawn()
    {
        ConversationSnippetEventArgs args = new ConversationSnippetEventArgs
        {
            SpawningResponse = false
        };

        SpawningNewConversationSnippet.BroadcastEvent(this, args);
    }
コード例 #2
0
    private void BroadcastResponseSnippetSpawn()
    {
        ConversationSnippetEventArgs args = new ConversationSnippetEventArgs
        {
            SpawningResponse = true
        };

        SpawningNewConversationSnippet.BroadcastEvent(this, args);
    }
コード例 #3
0
    void OnDestroySpecifiedSnippets(object source, ConversationSnippetEventArgs args)
    {
        bool checkDestroy = isResponse ? args.DestroyResponseSnippets : args.DestroyCustomerSnippets;

        if (checkDestroy)
        {
            IEnumerator destroyRoutine = ShrinkAndDestroy();
            StartCoroutine(destroyRoutine);
        }
    }
コード例 #4
0
    public static void DestroyAllCustomerResponseSnippets(object source)
    {
        ConversationSnippetEventArgs args = new ConversationSnippetEventArgs
        {
            DestroyCustomerSnippets = true,
            DestroyResponseSnippets = false
        };

        DestroySpecifiedSnippets.BroadcastEvent(source, args);
    }
コード例 #5
0
    private void OnSnippetSpawnMoveConversationBubble(object source, ConversationSnippetEventArgs args)
    {
        if (!newSnip)
        {
            int factor = isResponse ? -1 : 1;

            Vector3 jump     = bubbleElements.LocalPosition + (Vector3.up * 200) - 100 * factor * Vector3.right;
            Vector3 rotation = 25f * -factor * Vector3.forward;

            StartCoroutine(ShrinkAndDestroy(jump, rotation, isResponse));
        }

        newSnip = false;
    }