Example #1
0
    public void DisableDebris(int debrisNo)
    {
        limbs[debrisNo].SetBool("Grab", false);
        if (debris[debrisNo] != null)
        {
            debris[debrisNo].transform.parent = world.transform;
            if (debris[debrisNo].name == "plank(Clone)")
            {
                debris[debrisNo].tag = "Plank";
                Bars.GetWoodBoard();
            }
            else if (debris[debrisNo].name == "jerrycan(Clone)")
            {
                debris[debrisNo].tag = "JerryCan";
                Bars.GetFuelCan();
                //Debug.Log("got fuel");
            }


            debris[debrisNo].SetActive(false);
            debris[debrisNo]  = null;
            canGrab[debrisNo] = false;
        }
        //Bars.ChangeHealth(10);
        //Scoring.ChangeScore(100);
    }