Exemplo n.º 1
0
    public void drop()
    {
        if (m_BeingCarried == null)
        {
            return;
        }

        m_BeingCarried.changeState(Throwable.states.nope);
        m_BeingCarried.transform.parent = null;

        m_BeingCarried = null;

        m_Movement.IsCarryingOBJ = false;
    }
Exemplo n.º 2
0
    protected virtual void OnControllerColliderHit(ControllerColliderHit hit)
    {
        if (m_State != states.airborn)
        {
            return;
        }

        Throwable temp = hit.gameObject.GetComponent <Throwable>();

        if (temp != null)
        {
            CharacterMovement tempy = temp as CharacterMovement;

            if (tempy == null)
            {
                temp.changeState(states.airborn);
                temp.Velocity = m_Velocity * VELOCITY_LOSS;
            }
            else
            {
                tempy.changeState(states.airborn);


                tempy.Velocity = new Vector2(m_Velocity.x, Mathf.Abs(m_Velocity.y) + 0.5f) * VELOCITY_LOSS;
            }
        }


        changeState(states.nope);
    }
Exemplo n.º 3
0
    void onPickUp(Throwable pickedUp)
    {
        //pick up sound

        m_BeingCarried = pickedUp;
        m_BeingCarried.changeState(Throwable.states.carry);
        m_BeingCarried.transform.parent = transform;
        m_BeingCarried.BeingCarriedBy   = this;

        m_BeingCarried.transform.position = i_MountPoint.transform.position;

        m_Movement.IsCarryingOBJ = true;
    }