예제 #1
0
    // Start is called before the first frame update
    public void Init()
    {
        _trackPlacer = FindObjectOfType <TrackPlacer>();
        if (_building == null)
        {
            return;
        }


        image.sprite = _building.previewImage;


        Buyable buyable = _building.GetBuyable();

        if (buyable is Object)
        {
            _buyable = (Buyable)Instantiate((Object)buyable, transform);
        }
    }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     trackPlacer  = FindObjectOfType <TrackPlacer>();
     trackManager = TrackManager.Instance;
     moneyManager = MoneyManager.Instance;
 }