commit
c813d46662
5 changed files with 15 additions and 14 deletions
|
@ -29,7 +29,7 @@ Transform:
|
|||
m_GameObject: {fileID: 5909392949477884267}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.0552, y: 0.0418, z: 0}
|
||||
m_LocalScale: {x: 1.0162, y: 0.7533, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 6508079771898401246}
|
||||
m_Father: {fileID: 0}
|
||||
|
|
|
@ -8519,7 +8519,7 @@ PrefabInstance:
|
|||
- target: {fileID: 6843575828445418652, guid: d3055091a17dc4aa1accf2e33ccef144,
|
||||
type: 3}
|
||||
propertyPath: m_Size.x
|
||||
value: 1
|
||||
value: 0.8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6843575828445418652, guid: d3055091a17dc4aa1accf2e33ccef144,
|
||||
type: 3}
|
||||
|
@ -8529,7 +8529,7 @@ PrefabInstance:
|
|||
- target: {fileID: 6843575828445418652, guid: d3055091a17dc4aa1accf2e33ccef144,
|
||||
type: 3}
|
||||
propertyPath: m_Size.y
|
||||
value: 1
|
||||
value: 0.8
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: d3055091a17dc4aa1accf2e33ccef144, type: 3}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using src.Helpers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace src.Base
|
||||
|
@ -25,7 +26,7 @@ namespace src.Base
|
|||
|
||||
public void onExplosion()
|
||||
{
|
||||
Debug.Log("Player hit by explosion");
|
||||
DebugHelper.LogInfo("Player hit by explosion");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using src.Base;
|
||||
using src.Helpers;
|
||||
using src.Wall;
|
||||
|
@ -73,13 +72,13 @@ namespace src.Managers
|
|||
{
|
||||
if (_destructibleWalls.Count == 0)
|
||||
{
|
||||
Debug.LogWarning("No destructible walls left, cannot spawn upgrade.");
|
||||
DebugHelper.LogWarning("No destructible walls left, cannot spawn upgrade.");
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Get the destructible wall script and make it to spawn the upgrade */
|
||||
var wall = _destructibleWalls.PopRandom().GetComponent<DestructibleWall>();
|
||||
Debug.Log($"Spawned upgrade at: x:{wall.XCoordinate} y:{wall.YCoordinate}");
|
||||
DebugHelper.LogInfo($"Spawned upgrade at: x:{wall.XCoordinate} y:{wall.YCoordinate}");
|
||||
wall.SpawnsUpgrade();
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +93,7 @@ namespace src.Managers
|
|||
|
||||
/* Get the destructible wall script and make it to spawn the exit */
|
||||
var wall = _destructibleWalls.PopRandom().GetComponent<DestructibleWall>();
|
||||
Debug.Log($"Spawned exit at: x:{wall.XCoordinate} y:{wall.YCoordinate}");
|
||||
DebugHelper.LogInfo($"Spawned exit at: x:{wall.XCoordinate} y:{wall.YCoordinate}");
|
||||
wall.SpawnsExit();
|
||||
}
|
||||
|
||||
|
@ -159,7 +158,7 @@ namespace src.Managers
|
|||
|
||||
private void PlaceDestructibleTile(Vector3 position)
|
||||
{
|
||||
Debug.Log($"PlaceDestructibleTile: x:{position.x} y:{position.y}");
|
||||
DebugHelper.LogInfo($"PlaceDestructibleTile: x:{position.x} y:{position.y}");
|
||||
var randomWall = destructibleWallPrefabs.ChoseRandom();
|
||||
var instance = Instantiate(randomWall, position, Quaternion.identity);
|
||||
_destructibleWalls.Add(instance);
|
||||
|
@ -168,7 +167,7 @@ namespace src.Managers
|
|||
|
||||
private bool PlaceIndestructibleTile(float x, float y)
|
||||
{
|
||||
Debug.Log($"PlaceIndestructibleTile: x:{x} y:{y}");
|
||||
DebugHelper.LogInfo($"PlaceIndestructibleTile: x:{x} y:{y}");
|
||||
var absX = Mathf.RoundToInt(x);
|
||||
var absY = Mathf.RoundToInt(y);
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using UnityEngine;
|
||||
|
||||
using src.Base;
|
||||
using src.Helpers;
|
||||
|
||||
namespace src.Wall
|
||||
{
|
||||
|
@ -31,19 +32,19 @@ namespace src.Wall
|
|||
Instantiate(explosionPrefab, currentPosition, Quaternion.identity);
|
||||
if (_spawnExit)
|
||||
{
|
||||
Debug.Log($"Destructible spawned exit {transform.position}");
|
||||
DebugHelper.LogInfo($"Destructible spawned exit {transform.position}");
|
||||
Instantiate(exitDoorPrefab, currentPosition, Quaternion.identity);
|
||||
}
|
||||
else if (_spawnUpgrade)
|
||||
{
|
||||
Debug.Log($"Destructible spawned upgrade {transform.position}");
|
||||
DebugHelper.LogInfo($"Destructible spawned upgrade {transform.position}");
|
||||
// TODO: Get and instantiate upgrade from manager
|
||||
}
|
||||
}
|
||||
|
||||
public void onExplosion()
|
||||
{
|
||||
Debug.Log($"Destructible wall hit by explosion {transform.position}");
|
||||
DebugHelper.LogInfo($"Destructible wall hit by explosion {transform.position}");
|
||||
BeforeDestroy();
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue