Ejemplo n.º 1
0
    private void OnPickup(MessageTypes.PickupComplete m)
    {
        if (animationStarted)
        {
            return;
        }

        isHeld = true;
        m.picked.SendMessage("OnPickupConfirmed", m);
    }
Ejemplo n.º 2
0
    public void OnPickupConfirmed(MessageTypes.PickupComplete m)
    {
        Vector3[] holdOffsets = { Vector3.left, Vector3.right };
        rootObject.transform.SetParent(m.picker.transform);
        rootObject.transform.localPosition = holdOffsets[m.slotIndex];
        rootBody.isKinematic = true;

        GameLogicController.PickupComplete.Invoke(new MessageTypes.PickupComplete {
            picker    = m.picker,
            picked    = rootObject,
            slotIndex = m.slotIndex,
        });
    }
Ejemplo n.º 3
0
    void OnPickupComplete(MessageTypes.PickupComplete m)
    {
        int objIndex = gameState.findObjectIndex(m.picked); // the outer sphere object

        gameState.objectStates[objIndex].isHeld = m.picker != null;
    }