mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 11:37:40 +02:00
Merge pull request #63 from Slaith12/main
Prevented out of order initialization
This commit is contained in:
@ -51,12 +51,8 @@ namespace HeavenStudio.Games
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// Finding grass sprite width for grass scrolling.
|
||||
instance = this;// Finding grass sprite width for grass scrolling.
|
||||
farmer.Init()
|
||||
var grassSprite = grass.sprite;
|
||||
var borderLeft = grassSprite.rect.xMin + grassSprite.border.x;
|
||||
var borderRight = grassSprite.rect.xMax - grassSprite.border.z;
|
||||
@ -295,7 +291,7 @@ namespace HeavenStudio.Games
|
||||
|
||||
var veggieX = (beat - startBeat) * -stepDistance / 2f;
|
||||
newVeggie.transform.localPosition = new Vector3(veggieX, 0f, 0f);
|
||||
|
||||
newVeggie.Init();
|
||||
newVeggie.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user