private void SpawnDesk(DeskAsset asset, Node node) { DeskView view = Object.Instantiate(asset.ViewPrefab); DeskData data = new DeskData(asset, node); data.AttachView(view); Game.Player.DeskDatas.Add(data); Debug.Log("Spawned Desk"); Debug.Log(view.transform.position); //Game.Player.TurretSpawned(data); //node.IsOccupied = true; // TryOccupy() //m_Grid.UpdatePathfinding(); }
public void AttachData(DeskData data) { m_Data = data; transform.position = m_Data.Node.Position; }