LevelData
This commit is contained in:
@@ -100,14 +100,12 @@ namespace Level
|
||||
}
|
||||
else if (placementOption == LevelBuilderButtons.PlacementOption.Crate)
|
||||
{
|
||||
cellData.cellContent = LayoutCellData.CellContent.Crate;
|
||||
|
||||
GameObject crateObject = GameObject.Instantiate(cratePrefab, worldPos, Quaternion.identity);
|
||||
crate = crateObject.GetComponent<Crate>();
|
||||
crate.layoutPosition = layoutPosition;
|
||||
// This call handles updating cellData as well
|
||||
PlaceCrate();
|
||||
}
|
||||
else if (placementOption == LevelBuilderButtons.PlacementOption.Player)
|
||||
{
|
||||
// This call handles updating cellData as well
|
||||
Player.Instance.Teleport(this);
|
||||
}
|
||||
|
||||
@@ -115,6 +113,16 @@ namespace Level
|
||||
}
|
||||
|
||||
|
||||
public void PlaceCrate()
|
||||
{
|
||||
cellData.cellContent = LayoutCellData.CellContent.Crate;
|
||||
|
||||
GameObject crateObject = GameObject.Instantiate(cratePrefab, worldPos, Quaternion.identity);
|
||||
crate = crateObject.GetComponent<Crate>();
|
||||
crate.layoutPosition = layoutPosition;
|
||||
}
|
||||
|
||||
|
||||
public void UpdateSprites()
|
||||
{
|
||||
if (cellData.cellContent == LayoutCellData.CellContent.Block)
|
||||
|
||||
Reference in New Issue
Block a user