コード例 #1
0
    public FoliageInfo(FoliageObject newFoliageObject, float currentTime)
    {
        foliageObject      = newFoliageObject;
        callback           = ThreadedScaleUpdater.Instance.UpdateScaleCallback;
        destroyedCallback  = ThreadedScaleUpdater.Instance.RemoveObject;
        updateScalePercent = foliageObject.selfTerrainObjectType.dna.scaleDifferenceUpdatePercent;

        //prevent the scale from smooth updating at the start, as it'll already be set
        currentScale = foliageObject.GetAgedScaleFloat(currentTime);
        lastScale    = currentScale;
    }
コード例 #2
0
	public FoliageInfo (FoliageObject newFoliageObject, float currentTime)
	{
		foliageObject = newFoliageObject;
		callback = ThreadedScaleUpdater.Instance.UpdateScaleCallback;
		destroyedCallback = ThreadedScaleUpdater.Instance.RemoveObject;
		updateScalePercent = foliageObject.selfTerrainObjectType.dna.scaleDifferenceUpdatePercent;

		//prevent the scale from smooth updating at the start, as it'll already be set
		currentScale = foliageObject.GetAgedScaleFloat(currentTime);
		lastScale = currentScale;
	}