Beispiel #1
0
 private void Awake()
 {
     if (itemDown == null)
     {
         itemDown = new UnityEvent();
     }
     if (itemUp == null)
     {
         itemUp = new UnityEvent();
     }
     if (wallGrab == null)
     {
         wallGrab = new UnityEvent();
     }
     if (wallRelease == null)
     {
         wallRelease = new UnityEvent();
     }
     if (move == null)
     {
         move = new VectorEvent();
     }
     if (moveUpdate == null)
     {
         moveUpdate = new VectorEvent();
     }
 }
Beispiel #2
0
 public VectorEvent(VectorEvent other) : this(PapillonPINVOKE.new_VectorEvent__SWIG_1(VectorEvent.getCPtr(other)), true)
 {
     if (PapillonPINVOKE.SWIGPendingException.Pending)
     {
         throw PapillonPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Beispiel #3
0
 public VectorEventEnumerator(VectorEvent collection)
 {
     collectionRef = collection;
     currentIndex  = -1;
     currentObject = null;
     currentSize   = collectionRef.Count;
 }
Beispiel #4
0
 public void SetRange(int index, VectorEvent values)
 {
     PapillonPINVOKE.VectorEvent_SetRange(swigCPtr, index, VectorEvent.getCPtr(values));
     if (PapillonPINVOKE.SWIGPendingException.Pending)
     {
         throw PapillonPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public SVector(Joystick[] names, NormalizationMode normalizationMode, bool sendWhenZeroToo)
 {
     this.names             = names;
     this.normalizationMode = normalizationMode;
     this.sendWhenZeroToo   = sendWhenZeroToo;
     events            = new ButtonEvents();
     JoystickValue     = null;
     JoystickMagnitude = null;
     isPressed         = false;
 }
Beispiel #6
0
    public static VectorEvent Repeat(PEvent value, int count)
    {
        global::System.IntPtr cPtr = PapillonPINVOKE.VectorEvent_Repeat(PEvent.getCPtr(value), count);
        VectorEvent           ret  = (cPtr == global::System.IntPtr.Zero) ? null : new VectorEvent(cPtr, true);

        if (PapillonPINVOKE.SWIGPendingException.Pending)
        {
            throw PapillonPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Beispiel #7
0
    public VectorEvent GetRange(int index, int count)
    {
        global::System.IntPtr cPtr = PapillonPINVOKE.VectorEvent_GetRange(swigCPtr, index, count);
        VectorEvent           ret  = (cPtr == global::System.IntPtr.Zero) ? null : new VectorEvent(cPtr, true);

        if (PapillonPINVOKE.SWIGPendingException.Pending)
        {
            throw PapillonPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Beispiel #8
0
    public static void StartListening(string eventName, UnityAction <Vector3> listener)
    {
        UnityEvent <Vector3> thisEvent = null;

        if (instance.eventDictionaryVector.TryGetValue(eventName, out thisEvent))
        {
            thisEvent.AddListener(listener);
        }
        else
        {
            thisEvent = new VectorEvent();
            thisEvent.AddListener(listener);
            instance.eventDictionaryVector.Add(eventName, thisEvent);
        }
    }
 public ClimbingListener(State s, VectorEvent v) : base(s, v)
 {
     rigid     = ownerState.GetComponent <Rigidbody2D>();
     moveEvent = v;
 }
Beispiel #10
0
 public MoveListener(State s, VectorEvent v) : base(s)
 {
     rigid     = ownerState.GetComponent <Rigidbody2D>();
     moveEvent = v;
     stats     = ownerState.GetComponent <Stats>();
 }
Beispiel #11
0
 public MoveCommand(Vector2 d, VectorEvent e)
 {
     _direction = d;
     OnInput    = e;
 }
Beispiel #12
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VectorEvent obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
 public SwingDIListener(State s, VectorEvent v, Rope r) : base(s, v)
 {
     rope = r;
 }