using System; using System.Collections; using AsteroidGame.Interfaces; using UnityEngine; namespace AsteroidGame.Entities.Structures.Scripts { public class StructureBase : EntityBase, IBuildable { [Header("BuildParameters")] [SerializeField] protected int cost; [SerializeField] private bool _buildPlacementBlocked; [SerializeField] protected float buildTimer; #region Private #endregion #region Publics public bool BuildPlacementBlocked => _buildPlacementBlocked; public string Name { get; set; } public int Cost { get; set; } #endregion private void OnTriggerStay(Collider other) { if(other.name == "BuildCollider") { _buildPlacementBlocked = true; } } private void OnTriggerExit(Collider other) { if(other.name == "BuildCollider") { _buildPlacementBlocked = false; } } } }