コード例 #1
0
    public override bool CheckRequirements()
    {
        CollisionCube cCube = collisionCube.GetComponent <CollisionCube>();

        foreach (GameObject go in cCube.CollidingGameObjects)
        {
            if ((playerMask.value & 1 << go.gameObject.layer) == 1 << go.gameObject.layer)
            {
                return(true);
            }
        }

        return(false);
    }
コード例 #2
0
    public override bool CheckRequirements()
    {
        CollisionCube cCube = collisionCube.GetComponent <CollisionCube>();

        foreach (GameObject go in cCube.CollidingGameObjects)
        {
            if ((playerMask.value & 1 << go.gameObject.layer) == 1 << go.gameObject.layer)
            {
                if (go.transform.GetComponentInChildren <CarryObject>().objectHeld == wrench)
                {
                    return(true);
                }
            }
        }

        return(false);
    }
コード例 #3
0
    public override bool CheckRequirements()
    {
        CollisionCube cCube = collisionCube.GetComponent <CollisionCube>();

        foreach (GameObject go in cCube.CollidingGameObjects)
        {
            if ((playerMask.value & 1 << go.gameObject.layer) == 1 << go.gameObject.layer)
            {
                AcceptingItem = go.transform.GetComponentInChildren <CarryObject>().objectHeld;

                if (AcceptingItem != null && AcceptedItemNames.Contains(AcceptingItem.GetComponent <PickUpIdentifier>().ID))
                {
                    return(true);
                }
            }
        }

        return(false);
    }