コード例 #1
0
    void Start()
    {
        hc = controller.GetComponent <HarvestableController>();
        pt = controller.GetComponent <ProfsTables>();
        pp = player.GetComponent <PlayerProfs>();

        //Check through the existing harvestables
        for (int i = 0; i < hc.harvestables.Count; i++)
        {
            //Check for a match with this harvestable in the controller
            if (this.gameObject.name == hc.harvestables[i].name)
            {
                maxDensity = hc.harvestables[i].density;
                density    = maxDensity;
            }
        }
    }
コード例 #2
0
 void Start()
 {
     //Script references
     pt = controller.GetComponent <ProfsTables>();
 }