From 4476b339f82e195ed0c398d112617eebcfdfaf76 Mon Sep 17 00:00:00 2001
From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com>
Date: Mon, 27 Nov 2023 21:45:09 +0100
Subject: [PATCH] removed high kick toe swing
---
Assets/Scenes/Editor.unity | 42 +++++++++----------
Assets/Scripts/Games/SpaceSoccer/Ball.cs | 9 +---
Assets/Scripts/Games/SpaceSoccer/Kicker.cs | 6 ---
.../Scripts/Games/SpaceSoccer/SpaceSoccer.cs | 4 --
.../GameSelectionCategoryManager.cs | 4 +-
5 files changed, 25 insertions(+), 40 deletions(-)
diff --git a/Assets/Scenes/Editor.unity b/Assets/Scenes/Editor.unity
index 3f994fa36..dd21ad082 100644
--- a/Assets/Scenes/Editor.unity
+++ b/Assets/Scenes/Editor.unity
@@ -371,9 +371,9 @@ RectTransform:
m_Father: {fileID: 574002313}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 1}
- m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 0, y: -21}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &9435782
@@ -3656,9 +3656,9 @@ RectTransform:
m_Father: {fileID: 539838476}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 1}
- m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 32, y: -21}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &121871281
@@ -3801,9 +3801,9 @@ RectTransform:
m_Father: {fileID: 539838476}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 1}
- m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 72, y: -21}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &129013734
@@ -3923,9 +3923,9 @@ RectTransform:
m_Father: {fileID: 539838476}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 1}
- m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 112, y: -21}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &151246938
@@ -21545,7 +21545,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_categoryRef: {fileID: 167275725}
- _spacing: -55
+ _spacing: 55
_headerOffset: 61
--- !u!1 &889256060
GameObject:
@@ -21749,7 +21749,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
m_Name:
m_EditorClassIdentifier:
- m_Padding: {x: 0, y: 0, z: 0, w: 0}
+ m_Padding: {x: 0, y: 0, z: 0, w: 1}
m_Softness: {x: 0, y: 0}
--- !u!1 &908855313
GameObject:
@@ -27043,7 +27043,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
- m_AnchoredPosition: {x: 0, y: 199.0612}
+ m_AnchoredPosition: {x: 0, y: 199.06123}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &1154875945
@@ -31125,9 +31125,9 @@ RectTransform:
m_Father: {fileID: 574002313}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 1}
- m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 40, y: -21}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1345846031
@@ -39119,9 +39119,9 @@ RectTransform:
m_Father: {fileID: 574002313}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 1}
- m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 80, y: -21}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1783491359
diff --git a/Assets/Scripts/Games/SpaceSoccer/Ball.cs b/Assets/Scripts/Games/SpaceSoccer/Ball.cs
index 55edff2ef..375d4aba0 100644
--- a/Assets/Scripts/Games/SpaceSoccer/Ball.cs
+++ b/Assets/Scripts/Games/SpaceSoccer/Ball.cs
@@ -22,7 +22,6 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
public double startBeat;
public State state;
public double nextAnimBeat;
- public float highKickSwing = 0f;
private float lastSpriteRot;
public bool canKick;
public bool waitKickRelease;
@@ -81,10 +80,6 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
}
else
{
- highKickSwing = highKicks[i]["swing"];
- if (highKickSwing == 0f)
- highKickSwing = 0.5f;
-
if (highKicks[i].beat + GetAnimLength(State.HighKicked) > currentBeat)
{
//Debug.Log("Setting state to high kick");
@@ -272,9 +267,9 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
case State.Kicked:
return 1f;
case State.HighKicked:
- return 2f - highKickSwing;
+ return 1.5f;
case State.Toe:
- return 2f - (1f - highKickSwing);
+ return 1.5f;
default:
Debug.LogError("Ball has invalid state. State number: " + (int)anim);
return 0f;
diff --git a/Assets/Scripts/Games/SpaceSoccer/Kicker.cs b/Assets/Scripts/Games/SpaceSoccer/Kicker.cs
index cf18e077b..9abac83bb 100644
--- a/Assets/Scripts/Games/SpaceSoccer/Kicker.cs
+++ b/Assets/Scripts/Games/SpaceSoccer/Kicker.cs
@@ -251,12 +251,6 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
canHighKick = true;
canKick = false;
- if (ball)
- {
- ball.highKickSwing = highKicks[i]["swing"];
- if (ball.highKickSwing == 0f)
- ball.highKickSwing = 0.5f;
- }
break;
}
else
diff --git a/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs b/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs
index 9d2472afc..6b9dd3b35 100644
--- a/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs
+++ b/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs
@@ -28,10 +28,6 @@ namespace HeavenStudio.Games.Loaders
new GameAction("high kick-toe!", "High Kick-Toe!")
{
defaultLength = 3f,
- parameters = new List()
- {
- new Param("swing", new EntityTypes.Float(0, 1, 0.5f), "Swing", "The amount of swing")
- }
},
new GameAction("npc kickers enter or exit", "NPC Kickers Enter or Exit")
{
diff --git a/Assets/Scripts/LevelEditor/EventSelector/GameSelectionCategoryManager.cs b/Assets/Scripts/LevelEditor/EventSelector/GameSelectionCategoryManager.cs
index b1899fd64..18e2f7736 100644
--- a/Assets/Scripts/LevelEditor/EventSelector/GameSelectionCategoryManager.cs
+++ b/Assets/Scripts/LevelEditor/EventSelector/GameSelectionCategoryManager.cs
@@ -46,7 +46,7 @@ namespace HeavenStudio.Editor
if ((i != 0 && gameName != "gameManager") || (gameName == "gameManager" && i != 1))
{
Canvas.ForceUpdateCanvases();
- currentY += _spacing - lastHeaderObject.GetComponent().rect.height;
+ currentY -= _spacing + lastHeaderObject.GetComponent().rect.height;
}
lastHeader = action.categoryName;
@@ -79,7 +79,7 @@ namespace HeavenStudio.Editor
for (int i = 0; i < _categories.Count; i++)
{
if (!_categories[i].HeaderIsActive()) sizeY -= _headerOffset;
- sizeY -= _spacing - _categories[i].GetComponent().rect.height;
+ sizeY += _spacing + _categories[i].GetComponent().rect.height;
}
_rectTransform.sizeDelta = new Vector3(0, sizeY, 0);