public static void Place(Pickable pickable, Vector3 position, bool isBuyable = false, bool playSpawnAnimation = true) { GameObject gObject = Instantiate(PickableDict.Instance.PickableInWorldPrefab); gObject.layer = LayerDict.Instance.GetPickableLayer(); PositionConverter.AdjustZ(ref position); gObject.transform.position = position; PickableInWorld piw = gObject.GetComponent <PickableInWorld>(); piw.pickable = pickable; piw.isBuyable = isBuyable; piw.playSpawnAnimation = playSpawnAnimation; NetworkServer.Spawn(gObject); }
private void Update() { PositionConverter.AdjustZ(transform); }
void Start() { PositionConverter.AdjustZ(transform); sr.sprite = BreakablesDict.Instance.GetBreakable(index).full; }
private void Start() { PositionConverter.AdjustZ(transform); }