diff --git a/Assets/Art/Annimations/PresserPress.anim b/Assets/Art/Annimations/PresserPress.anim index 22dd0c3..c48ba2e 100644 --- a/Assets/Art/Annimations/PresserPress.anim +++ b/Assets/Art/Annimations/PresserPress.anim @@ -224,6 +224,13 @@ AnimationClip: intParameter: 0 messageOptions: 0 - time: 0.55 + functionName: OpenBottom + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 + - time: 0.6666667 functionName: CloseBottom data: objectReferenceParameter: {fileID: 0} diff --git a/Assets/Prefabs/Buildings/PresserBuilding.prefab b/Assets/Prefabs/Buildings/PresserBuilding.prefab index 83d525f..0703958 100644 --- a/Assets/Prefabs/Buildings/PresserBuilding.prefab +++ b/Assets/Prefabs/Buildings/PresserBuilding.prefab @@ -211,7 +211,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!61 &2714168551213278428 BoxCollider2D: @@ -293,7 +293,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!61 &2448787661920129587 BoxCollider2D: @@ -375,7 +375,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!61 &8580655252957421185 BoxCollider2D: @@ -421,7 +421,7 @@ BoxCollider2D: drawMode: 0 adaptiveTiling: 0 m_AutoTiling: 0 - m_Size: {x: 120, y: 1} + m_Size: {x: 120, y: 12} m_EdgeRadius: 0 --- !u!1 &8718160904021803034 GameObject: @@ -457,7 +457,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!61 &7980248264564719518 BoxCollider2D: diff --git a/Assets/Scripts/Game/Buildings/Automation/PresserBuilding.cs b/Assets/Scripts/Game/Buildings/Automation/PresserBuilding.cs index 1853bce..f879681 100644 --- a/Assets/Scripts/Game/Buildings/Automation/PresserBuilding.cs +++ b/Assets/Scripts/Game/Buildings/Automation/PresserBuilding.cs @@ -11,7 +11,7 @@ namespace Fruitomation.Game [SerializeField] private Animator PresserAnimator; [SerializeField] private Collider2D TopCollider; [SerializeField] private Collider2D BottomCollider; - + private void Update() { if (GameStateController.Is(GameState.Simulation)) @@ -33,11 +33,33 @@ namespace Fruitomation.Game } } - [Preserve, UsedImplicitly] public void OpenTop() => TopCollider.enabled = false; - [Preserve, UsedImplicitly] public void CloseTop() => TopCollider.enabled = true; - - [Preserve, UsedImplicitly] public void OpenBottom() => BottomCollider.enabled = false; - [Preserve, UsedImplicitly] public void CloseBottom() => BottomCollider.enabled = true; + [Preserve, UsedImplicitly] + public void OpenTop() + { + Debug.Log(nameof(OpenTop)); + TopCollider.enabled = false; + } + + [Preserve, UsedImplicitly] + public void CloseTop() + { + Debug.Log(nameof(CloseTop)); + TopCollider.enabled = true; + } + + [Preserve, UsedImplicitly] + public void OpenBottom() + { + Debug.Log(nameof(OpenBottom)); + BottomCollider.enabled = false; + } + + [Preserve, UsedImplicitly] + public void CloseBottom() + { + Debug.Log(nameof(CloseBottom)); + BottomCollider.enabled = true; + } [Preserve, UsedImplicitly] public void Press() {