コード例 #1
0
    /// <summary>
    /// Event raised when an object was clicked using the VR Clicker system
    /// </summary>
    /// <param name="rayOrigin">The Origin of the ray that just clicked something</param>
    /// <param name="objectClicked">The GameObject that was just clicked by the user (must have a collider)</param>
    public OnVRClickerStartClicking(ERayOrigin rayOrigin, GameObject objectClicked) : base("Event raised when an object was clicked using the VR Clicker system.")
    {
        RaycastOrigin = rayOrigin;
        ClickedObject = objectClicked;

        VRClickerVariablesContainer.SetCurrentClickedVariables(rayOrigin, objectClicked, true);

        FireEvent(this);
    }
コード例 #2
0
    /// <summary>
    /// Event raised when an object was being clicked and is not anymore, using the VR Clicker system
    /// </summary>
    /// <param name="rayOrigin">The Origin of the ray that just clicked something</param>
    /// <param name="unclickedObject">The GameObject that was unclicked by the user (must have a collider))</param>
    public OnVRClickerStopClicking(ERayOrigin rayOrigin, GameObject unclickedObject) : base("Event raised when an object was being clicked and is not anymore, using the VR Clicker system.")
    {
        RaycastOrigin   = rayOrigin;
        UnclickedObject = unclickedObject;

        VRClickerVariablesContainer.SetCurrentClickedVariables(rayOrigin, null, false);

        FireEvent(this);
    }