Ejemplo n.º 1
0
    private void OnSetOffset(IComponentEvent componentEvent)
    {
        SetOffsetEvent setOffsetEvent = componentEvent as SetOffsetEvent;

        Transform transform = m_SetOffsetComponentProperty.GetRootTransform();

        transform.localPosition += setOffsetEvent.Offset;

        Rigidbody rigidbody = m_SetOffsetComponentProperty.GetRigidbody();

        if (rigidbody != null)
        {
            rigidbody.position += setOffsetEvent.Offset;
        }
    }
Ejemplo n.º 2
0
    private void OnSetOffset(IComponentEvent componentEvent)
    {
        SetOffsetEvent setOffsetEvent = componentEvent as SetOffsetEvent;

        m_BehaviorController.OnDragWorldPosition(setOffsetEvent.Offset);
    }