Пример #1
0
    /// <summary>
    /// This method is called when we want to put a cutted object on the player's hand
    /// </summary>
    /// <param name="ori">The cutted object</param>
    public void putCuttedItemToHand(GameObject ori)
    {
        ori.GetComponent <CuttedObject>().istrigger();
        holdingObject = ori;

        inventoryUI.AddToHandSlot(ori);

        status_script.Hands_change(Hands.cutted);

        spawnDistance         = identify(ori).getRegeditValue("cuttedSpawnDistance") != null ? (float)identify(ori).getRegeditValue("cuttedSpawnDistance") : defaultSpawnDistance;
        minHoldingDistance    = identify(ori).getRegeditValue("minimumDistance") != null ? (float)identify(ori).getRegeditValue("minimumDistance") : defaultMinHoldingDistance;
        maxHoldingDistance    = identify(ori).getRegeditValue("maximumDistance") != null ? (float)identify(ori).getRegeditValue("maximumDistance") : defaultMaxHoldingDistance;
        fartherOrCloserFactor = 1;
    }