Exemple #1
0
 private void OnActorEntryClicked(HierarchyActorEntry entry, HierarchyActorEntry.ActionType actionType)
 {
     if (onActorEntryClicked != null)
     {
         onActorEntryClicked(entry, actionType);
     }
 }
Exemple #2
0
    void OnActorEntryClicked(HierarchyActorEntry entry, HierarchyActorEntry.ActionType actionType)
    {
        // The user has clicked on an actor in the list.
        VoosActor actor = engine.GetActor(entry.GetActorName());

        if (actor == null)
        {
            // Shouldn't happen.
            Debug.LogError("Clicked on actor that doesn't exist " + entry.GetActorName() + ". Bug?");
            return;
        }
        if (selectCallback != null)
        {
            selectCallback(actor);
            selectCallback = null;
            return;
        }
        switch (actionType)
        {
        case HierarchyActorEntry.ActionType.SELECT:
            if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
            {
                AddActorToSelection(actor);
            }
            else
            {
                SelectActor(actor);
            }
            break;

        case HierarchyActorEntry.ActionType.INFO:
            SelectActor(actor, true);
            break;

        case HierarchyActorEntry.ActionType.MOVE:
            ToggleActorOffstage(actor);
            break;
        }
    }
Exemple #3
0
 private void OnActorClicked(HierarchyActorEntry entry, HierarchyActorEntry.ActionType actionType)
 {
     // TODO: we should not need to have actionType passed in
     CloseAndReturn(true, entry.GetActorName());
 }