Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
 public void AddDecoration(int x, int y, DecorationController decoration)
 {
     decorations.Add(new Int2(x, y), decoration);
 }
Exemplo n.º 3
0
 protected override void SetUpPrefab(int x, int y, ref DecorationController decorationController)
 {
     decorationController.GetComponent <CropGrowth>().SetCropInfo(stageSprites, stageTimers);
 }
Exemplo n.º 4
0
 protected virtual void SetUpPrefab(int x, int y, ref DecorationController decorationController)
 {
 }