コード例 #1
0
    void OnActionComplete(ArAction actionTaken, GameObject prefabInstance)
    {
        if (prefabInstance && optionalPrefab)
        {
            if (prefabInstance != optionalPrefab)
            {
                return;
            }
        }

        if (actionTaken == actionRequired)
        {
            ActionCompletedEvent.Invoke();

            if (!overrideFadeOutTransition)
            {
                fader.FadeOutNow();
            }
            else
            {
                DoneFadeOut();
            }
        }
    }
コード例 #2
0
    IEnumerator FireActionTakenEvent(ArAction actionMade, GameObject inst)
    {
        bool isObjectManipulateAction = (actionMade == ArAction.PrefabMoved || actionMade == ArAction.PrefabScaled || actionMade == ArAction.PrefabRotated);

        if (actionMade == lastAction && isObjectManipulateAction) // same object, same thing, don't fire event
        {
            yield break;
        }

        if (inst)
        {
            Debug.Log("Action invoked: " + actionMade.ToString() + " on " + inst.name);
        }
        else
        {
            Debug.Log("Action invoked: " + actionMade.ToString());
        }

        OnActionTaken?.Invoke(actionMade, inst); // Inform whoever's listening (e.g. ArInstructionController)

        lastAction = actionMade;

        yield return(null);
    }
コード例 #3
0
 public virtual void remAction(ArAction action)
 {
     AriaCSPINVOKE.ArActionGroup_remAction(swigCPtr, ArAction.getCPtr(action));
 }
コード例 #4
0
 public static global::System.Runtime.InteropServices.HandleRef getCPtr(ArAction obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
コード例 #5
0
 public virtual void addAction(ArAction action, int priority)
 {
     AriaCSPINVOKE.ArActionGroup_addAction(swigCPtr, ArAction.getCPtr(action), priority);
 }