public void SetPlayerInventoryGrid(PlayerInventoryGrid pig) { playerInventoryGrid = pig; animator = GetComponent <Animator> (); firstSlotTransform = firstSlot.GetComponent <RectTransform> (); secondSlotTransform = secondSlot.GetComponent <RectTransform> (); firstPlantIndex = -1; secondPlantIndex = -1; button.holdingDuration = crossingDuration; //animator.speed = 1f / crossingDuration; }
public void SetInventoryGrid(PlayerInventoryGrid playerInventoryGrid) { this.playerInventoryGrid = playerInventoryGrid; geneticCrossingPanel = playerInventoryGrid.geneticCrossingPanel.GetComponent <GeneticCrossingPanel>(); }