public DecorationController InstantiateDecoration(int x, int y, Transform container = null) { DecorationController decorCtrlr = Instantiate(Prefab, new Vector2(x, y), Quaternion.identity, container); decorCtrlr.id = id; decorCtrlr.position = new Int2(x, y); decorCtrlr.facingRight = true; SetUpPrefab(x, y, ref decorCtrlr); GameManager.Get <WorldManager>().AddDecoration(x, y, decorCtrlr); return(decorCtrlr); }
public void AddDecoration(int x, int y, DecorationController decoration) { decorations.Add(new Int2(x, y), decoration); }
protected override void SetUpPrefab(int x, int y, ref DecorationController decorationController) { decorationController.GetComponent <CropGrowth>().SetCropInfo(stageSprites, stageTimers); }
protected virtual void SetUpPrefab(int x, int y, ref DecorationController decorationController) { }