You've already forked Darklings-FightingGame
mirror of
https://github.com/izzy2lost/Darklings-FightingGame.git
synced 2026-03-10 11:35:19 -07:00
Minor fixes
This commit is contained in:
@@ -16,12 +16,11 @@ MonoBehaviour:
|
||||
attackTypeEnum: 2
|
||||
hitStun: 30
|
||||
blockStun: 8
|
||||
travelDistance: 3
|
||||
travelDistance: {x: 0.04, y: 0.3}
|
||||
travelDirection: {x: 0, y: 5}
|
||||
knockback: 3
|
||||
knockbackForce: {x: 0, y: 0}
|
||||
knockbackForce: {x: 2.8, y: 3.5}
|
||||
knockbackDirection: {x: 0, y: 1}
|
||||
knockbackDuration: 0
|
||||
knockbackDuration: 66
|
||||
hasSuperArmor: 0
|
||||
isAirAttack: 0
|
||||
isProjectile: 0
|
||||
@@ -35,7 +34,7 @@ MonoBehaviour:
|
||||
hitEffectPosition: {x: 4, y: 0.1}
|
||||
hitEffectRotation: 0
|
||||
hurtEffect: {fileID: 6697712921357175186, guid: 42fff4f540e4cdd4b9969996164b54a8, type: 3}
|
||||
hurtEffectPosition: {x: 3.5, y: -3.3850098}
|
||||
hurtEffectPosition: {x: 3.6418457, y: -3.284912}
|
||||
hurtEffectRotation: 0
|
||||
cameraShaker: {fileID: 11400000, guid: c395b25290cca7344a2deb1aa45f16df, type: 2}
|
||||
startUpFrames: 1
|
||||
|
||||
@@ -16,12 +16,12 @@ MonoBehaviour:
|
||||
attackTypeEnum: 2
|
||||
hitStun: 30
|
||||
blockStun: 8
|
||||
travelDistance: 1
|
||||
travelDistance: {x: 0, y: 0}
|
||||
travelDirection: {x: 0, y: 5}
|
||||
knockback: 3
|
||||
knockbackForce: {x: 0, y: 0}
|
||||
knockbackForce: {x: 1, y: 0}
|
||||
knockbackDirection: {x: 0, y: 1}
|
||||
knockbackDuration: 0.172
|
||||
knockbackDuration: 5
|
||||
hasSuperArmor: 0
|
||||
isAirAttack: 0
|
||||
isProjectile: 0
|
||||
isArcana: 1
|
||||
|
||||
@@ -16,10 +16,9 @@ MonoBehaviour:
|
||||
attackTypeEnum: 3
|
||||
hitStun: 25
|
||||
blockStun: 16
|
||||
travelDistance: 0
|
||||
travelDistance: {x: 0, y: 0}
|
||||
travelDirection: {x: 0, y: 0}
|
||||
knockback: 0.5
|
||||
knockbackForce: {x: 0, y: 0}
|
||||
knockbackForce: {x: 0.5, y: 0}
|
||||
knockbackDirection: {x: 0, y: 0}
|
||||
knockbackDuration: 5
|
||||
hasSuperArmor: 0
|
||||
@@ -35,7 +34,7 @@ MonoBehaviour:
|
||||
hitEffectPosition: {x: 0.9, y: 0.5}
|
||||
hitEffectRotation: 0
|
||||
hurtEffect: {fileID: 6697712921357175186, guid: 42fff4f540e4cdd4b9969996164b54a8, type: 3}
|
||||
hurtEffectPosition: {x: -4.84425, y: -4.01}
|
||||
hurtEffectPosition: {x: 3.2145996, y: -3.4848633}
|
||||
hurtEffectRotation: 0
|
||||
cameraShaker: {fileID: 0}
|
||||
startUpFrames: 7
|
||||
|
||||
@@ -16,10 +16,9 @@ MonoBehaviour:
|
||||
attackTypeEnum: 3
|
||||
hitStun: 26
|
||||
blockStun: 10
|
||||
travelDistance: 0.4
|
||||
travelDistance: {x: 0.025, y: 0}
|
||||
travelDirection: {x: 0, y: 0}
|
||||
knockback: 0.5
|
||||
knockbackForce: {x: 0, y: 0}
|
||||
knockbackForce: {x: 0.5, y: 0}
|
||||
knockbackDirection: {x: 0, y: 0}
|
||||
knockbackDuration: 5
|
||||
hasSuperArmor: 0
|
||||
@@ -35,7 +34,7 @@ MonoBehaviour:
|
||||
hitEffectPosition: {x: 0.9, y: 0.5}
|
||||
hitEffectRotation: 0
|
||||
hurtEffect: {fileID: 6697712921357175186, guid: 42fff4f540e4cdd4b9969996164b54a8, type: 3}
|
||||
hurtEffectPosition: {x: -4.30725, y: -3.4850001}
|
||||
hurtEffectPosition: {x: 2.7145996, y: -3.4848633}
|
||||
hurtEffectRotation: 0
|
||||
cameraShaker: {fileID: 0}
|
||||
startUpFrames: 6
|
||||
|
||||
@@ -16,10 +16,9 @@ MonoBehaviour:
|
||||
attackTypeEnum: 3
|
||||
hitStun: 34
|
||||
blockStun: 12
|
||||
travelDistance: 1.5
|
||||
travelDistance: {x: 0.09, y: 0}
|
||||
travelDirection: {x: 0, y: 0}
|
||||
knockback: 2.62
|
||||
knockbackForce: {x: 0, y: 0}
|
||||
knockbackForce: {x: 2, y: 0}
|
||||
knockbackDirection: {x: 0, y: 0}
|
||||
knockbackDuration: 5
|
||||
hasSuperArmor: 0
|
||||
@@ -30,12 +29,12 @@ MonoBehaviour:
|
||||
causesKnockdown: 0
|
||||
attackSound: Hit
|
||||
impactSound: Impact1
|
||||
hitstop: 9
|
||||
hitstop: 116
|
||||
hitEffect: {fileID: 3782010356200484119, guid: 47b4915fae0034c45b98dedc650be9af, type: 3}
|
||||
hitEffectPosition: {x: 1, y: 0.7}
|
||||
hitEffectRotation: 0
|
||||
hurtEffect: {fileID: 6697712921357175186, guid: 42fff4f540e4cdd4b9969996164b54a8, type: 3}
|
||||
hurtEffectPosition: {x: 6, y: -3.4848633}
|
||||
hurtEffectPosition: {x: 6.6069336, y: -3.4848633}
|
||||
hurtEffectRotation: 0
|
||||
cameraShaker: {fileID: 0}
|
||||
startUpFrames: 12
|
||||
|
||||
@@ -16,10 +16,9 @@ MonoBehaviour:
|
||||
attackTypeEnum: 2
|
||||
hitStun: 28
|
||||
blockStun: 18
|
||||
travelDistance: 0.4
|
||||
travelDistance: {x: 0.07, y: 0}
|
||||
travelDirection: {x: 0, y: 0}
|
||||
knockback: 0.75
|
||||
knockbackForce: {x: 0, y: 0}
|
||||
knockbackForce: {x: 1.5, y: 0}
|
||||
knockbackDirection: {x: 0, y: 0}
|
||||
knockbackDuration: 5
|
||||
hasSuperArmor: 0
|
||||
@@ -35,7 +34,7 @@ MonoBehaviour:
|
||||
hitEffectPosition: {x: 1.3, y: 1}
|
||||
hitEffectRotation: 0
|
||||
hurtEffect: {fileID: 6697712921357175186, guid: 42fff4f540e4cdd4b9969996164b54a8, type: 3}
|
||||
hurtEffectPosition: {x: 5.25, y: -3.4848633}
|
||||
hurtEffectPosition: {x: 3.7145996, y: -3.4848633}
|
||||
hurtEffectRotation: 0
|
||||
cameraShaker: {fileID: 0}
|
||||
startUpFrames: 10
|
||||
|
||||
@@ -16,10 +16,9 @@ MonoBehaviour:
|
||||
attackTypeEnum: 1
|
||||
hitStun: 31
|
||||
blockStun: 16
|
||||
travelDistance: 0
|
||||
travelDistance: {x: 0, y: 0}
|
||||
travelDirection: {x: 0, y: 0}
|
||||
knockback: 0.56
|
||||
knockbackForce: {x: 0, y: 0}
|
||||
knockbackForce: {x: 1, y: 0}
|
||||
knockbackDirection: {x: 0, y: 0}
|
||||
knockbackDuration: 5
|
||||
hasSuperArmor: 0
|
||||
@@ -35,7 +34,7 @@ MonoBehaviour:
|
||||
hitEffectPosition: {x: 1, y: 1.5}
|
||||
hitEffectRotation: -72.1
|
||||
hurtEffect: {fileID: 6697712921357175186, guid: 42fff4f540e4cdd4b9969996164b54a8, type: 3}
|
||||
hurtEffectPosition: {x: 1.9401855, y: -3.3850098}
|
||||
hurtEffectPosition: {x: -3.2216797, y: -3.284912}
|
||||
hurtEffectRotation: 0
|
||||
cameraShaker: {fileID: 0}
|
||||
startUpFrames: 12
|
||||
|
||||
@@ -7,11 +7,13 @@ public class DemonicsPhysics : MonoBehaviour
|
||||
{
|
||||
public FixVector2 Velocity { get; set; }
|
||||
public FixVector2 Position { get; set; }
|
||||
private FixVector2 _freezePosition;
|
||||
private Fix64 _gravity;
|
||||
private bool _freeze;
|
||||
public static Fix64 GROUND_POINT = (Fix64)(-4.485);
|
||||
public static Fix64 CELLING_POINT = (Fix64)(7);
|
||||
public static Fix64 WALL_POINT = (Fix64)(10.75);
|
||||
public bool Freeze { get; set; }
|
||||
|
||||
|
||||
public void OnCollision(DemonicsPhysics otherPhysics)
|
||||
{
|
||||
@@ -33,6 +35,15 @@ public class DemonicsPhysics : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void SetFreeze(bool state)
|
||||
{
|
||||
_freeze = state;
|
||||
if (_freeze)
|
||||
{
|
||||
_freezePosition = Position;
|
||||
}
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
Move();
|
||||
@@ -40,12 +51,14 @@ public class DemonicsPhysics : MonoBehaviour
|
||||
|
||||
private void Move()
|
||||
{
|
||||
if (_freeze)
|
||||
{
|
||||
Position = _freezePosition;
|
||||
return;
|
||||
}
|
||||
//Sets physics
|
||||
Velocity = new FixVector2(Velocity.x, Velocity.y - _gravity);
|
||||
if (Freeze)
|
||||
{
|
||||
Velocity = FixVector2.Zero;
|
||||
}
|
||||
|
||||
Position = new FixVector2(Position.x + Velocity.x, Position.y + Velocity.y);
|
||||
|
||||
Bounds();
|
||||
@@ -53,6 +66,12 @@ public class DemonicsPhysics : MonoBehaviour
|
||||
transform.position = new Vector2((float)Position.x, (float)Position.y);
|
||||
}
|
||||
|
||||
public void SetPositionWithRender(FixVector2 position)
|
||||
{
|
||||
Position = position;
|
||||
transform.position = new Vector2((float)Position.x, (float)Position.y);
|
||||
}
|
||||
|
||||
private void Bounds()
|
||||
{
|
||||
if (Position.y <= GROUND_POINT)
|
||||
@@ -77,7 +96,7 @@ public class DemonicsPhysics : MonoBehaviour
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
_gravity = (Fix64)0.02;
|
||||
_gravity = (Fix64)0.018;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -35,6 +35,8 @@ public class GameManager : MonoBehaviour
|
||||
[SerializeField] private int _gameSpeed = 1;
|
||||
[Range(10, 300)]
|
||||
[SerializeField] private int _countdownTime = 99;
|
||||
[SerializeField] private float _leftSpawn = 9;
|
||||
[SerializeField] private float _rightSpawn = 6;
|
||||
[SerializeField] private float[] _spawnPositionsX = default;
|
||||
[Header("Data")]
|
||||
[SerializeField] private CinemachineTargetGroup _targetGroup = default;
|
||||
@@ -925,7 +927,7 @@ public class GameManager : MonoBehaviour
|
||||
_reverseReset = !_reverseReset;
|
||||
if (!_reverseReset)
|
||||
{
|
||||
playerOneResetPosition= _cachedOneResetPosition;
|
||||
playerOneResetPosition = _cachedOneResetPosition;
|
||||
playerTwoResetPosition = _cachedTwoResetPosition;
|
||||
}
|
||||
else
|
||||
@@ -944,7 +946,7 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
playerOneResetPosition= _cachedTwoResetPosition;
|
||||
playerOneResetPosition = _cachedTwoResetPosition;
|
||||
playerTwoResetPosition = _cachedOneResetPosition;
|
||||
}
|
||||
}
|
||||
@@ -967,13 +969,13 @@ public class GameManager : MonoBehaviour
|
||||
{
|
||||
if (!_reverseReset)
|
||||
{
|
||||
playerOneResetPosition = new Vector2(_spawnPositionsX[0] + 9, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerTwoResetPosition = new Vector2(_spawnPositionsX[1] + 6, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerOneResetPosition = new Vector2(_spawnPositionsX[0] + _leftSpawn, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerTwoResetPosition = new Vector2(_spawnPositionsX[1] + _rightSpawn, (float)DemonicsPhysics.GROUND_POINT);
|
||||
}
|
||||
else
|
||||
{
|
||||
playerTwoResetPosition = new Vector2(_spawnPositionsX[0] + 9, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerOneResetPosition = new Vector2(_spawnPositionsX[1] + 6, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerTwoResetPosition = new Vector2(_spawnPositionsX[0] + _leftSpawn, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerOneResetPosition = new Vector2(_spawnPositionsX[1] + _rightSpawn, (float)DemonicsPhysics.GROUND_POINT);
|
||||
}
|
||||
_cachedOneResetPosition = PlayerOne.transform.position;
|
||||
_cachedTwoResetPosition = PlayerTwo.transform.position;
|
||||
@@ -982,13 +984,13 @@ public class GameManager : MonoBehaviour
|
||||
{
|
||||
if (!_reverseReset)
|
||||
{
|
||||
playerOneResetPosition = new Vector2(_spawnPositionsX[0] - 9, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerTwoResetPosition = new Vector2(_spawnPositionsX[1] - 6, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerOneResetPosition = new Vector2(_spawnPositionsX[0] - _rightSpawn, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerTwoResetPosition = new Vector2(_spawnPositionsX[1] - _leftSpawn, (float)DemonicsPhysics.GROUND_POINT);
|
||||
}
|
||||
else
|
||||
{
|
||||
playerTwoResetPosition = new Vector2(_spawnPositionsX[0] - 9, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerOneResetPosition = new Vector2(_spawnPositionsX[1] - 6, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerTwoResetPosition = new Vector2(_spawnPositionsX[0] - _rightSpawn, (float)DemonicsPhysics.GROUND_POINT);
|
||||
playerOneResetPosition = new Vector2(_spawnPositionsX[1] - _leftSpawn, (float)DemonicsPhysics.GROUND_POINT);
|
||||
}
|
||||
_cachedOneResetPosition = PlayerOne.transform.position;
|
||||
_cachedTwoResetPosition = PlayerTwo.transform.position;
|
||||
|
||||
@@ -391,7 +391,7 @@ public class Player : MonoBehaviour, IHurtboxResponder, IHitboxResponder, IHitst
|
||||
{
|
||||
if (!CurrentAttack.isArcana && CurrentAttack.attackTypeEnum != AttackTypeEnum.Throw)
|
||||
{
|
||||
_playerMovement.Knockback(new Vector2(OtherPlayer.transform.localScale.x, 0.0f), new Vector2(CurrentAttack.knockback, 0.0f), CurrentAttack.knockbackDuration);
|
||||
_playerMovement.Knockback(new Vector2(OtherPlayer.transform.localScale.x, 0), new Vector2(CurrentAttack.knockbackForce.x, 0), CurrentAttack.knockbackDuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class PlayerMovement : MonoBehaviour
|
||||
|
||||
public void TravelDistance(Vector2 travelDistance)
|
||||
{
|
||||
Physics.Velocity = new FixVector2((Fix64)travelDistance.x, (Fix64)travelDistance.x);
|
||||
Physics.Velocity = new FixVector2((Fix64)travelDistance.x, (Fix64)travelDistance.y);
|
||||
}
|
||||
|
||||
public void CheckForPlayer()
|
||||
@@ -123,7 +123,7 @@ public class PlayerMovement : MonoBehaviour
|
||||
{
|
||||
_knockbackFrame++;
|
||||
Fix64 ratio = (Fix64)_knockbackFrame / (Fix64)_knockbackDuration;
|
||||
Physics.Position = new FixVector2(_startPosition.x * ((Fix64)1 - ratio) + _endPosition.x * ratio, _startPosition.y * ((Fix64)1 - ratio) + _endPosition.y * ratio);
|
||||
Physics.SetPositionWithRender(new FixVector2(_startPosition.x * ((Fix64)1 - ratio) + _endPosition.x * ratio, _startPosition.y * ((Fix64)1 - ratio) + _endPosition.y * ratio));
|
||||
if (_knockbackFrame == _knockbackDuration)
|
||||
{
|
||||
Physics.Position = _endPosition;
|
||||
@@ -185,8 +185,7 @@ public class PlayerMovement : MonoBehaviour
|
||||
if (!IsInHitstop)
|
||||
{
|
||||
IsInHitstop = true;
|
||||
_velocity = Physics.Velocity;
|
||||
Physics.Freeze = true;
|
||||
Physics.SetFreeze(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,8 +194,7 @@ public class PlayerMovement : MonoBehaviour
|
||||
if (IsInHitstop)
|
||||
{
|
||||
IsInHitstop = false;
|
||||
Physics.Freeze = false;
|
||||
Physics.Velocity = _velocity;
|
||||
Physics.SetFreeze(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,8 @@ public class AttackSO : ScriptableObject
|
||||
public AttackTypeEnum attackTypeEnum;
|
||||
public int hitStun;
|
||||
public int blockStun;
|
||||
public float travelDistance;
|
||||
public Vector2 travelDistance;
|
||||
public Vector2 travelDirection;
|
||||
[Range(0.0f, 16.0f)]
|
||||
public float knockback;
|
||||
public Vector2 knockbackForce;
|
||||
public Vector2 knockbackDirection;
|
||||
public int knockbackDuration;
|
||||
|
||||
@@ -45,11 +45,11 @@ public class PlayerStatsSO : ScriptableObject
|
||||
switch (speedLevel)
|
||||
{
|
||||
case 1:
|
||||
return (Fix64)0.05;
|
||||
return (Fix64)0.03;
|
||||
case 2:
|
||||
return (Fix64)0.07;
|
||||
return (Fix64)0.05;
|
||||
case 3:
|
||||
return (Fix64)0.09;
|
||||
return (Fix64)0.07;
|
||||
default:
|
||||
return (Fix64)0;
|
||||
}
|
||||
@@ -81,11 +81,11 @@ public class PlayerStatsSO : ScriptableObject
|
||||
switch (jumpLevel)
|
||||
{
|
||||
case 1:
|
||||
return (Fix64)0.4;
|
||||
return (Fix64)0.3;
|
||||
case 2:
|
||||
return (Fix64)0.4;
|
||||
return (Fix64)0.33;
|
||||
case 3:
|
||||
return (Fix64)0.4;
|
||||
return (Fix64)0.35;
|
||||
default:
|
||||
return (Fix64)0;
|
||||
}
|
||||
@@ -99,11 +99,11 @@ public class PlayerStatsSO : ScriptableObject
|
||||
switch (dashLevel)
|
||||
{
|
||||
case 1:
|
||||
return (Fix64)0.15;
|
||||
return (Fix64)0.22;
|
||||
case 2:
|
||||
return (Fix64)0.18;
|
||||
return (Fix64)0.25;
|
||||
case 3:
|
||||
return (Fix64)0.21;
|
||||
return (Fix64)0.28;
|
||||
default:
|
||||
return (Fix64)0;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class AirParentState : State
|
||||
protected KnockbackState _knockbackState;
|
||||
protected RedFrenzyState _redFrenzyState;
|
||||
|
||||
protected Fix64 _jumpCancelForce = (Fix64)1;
|
||||
protected Fix64 _jumpCancelForce = (Fix64)0.2;
|
||||
protected virtual void Awake()
|
||||
{
|
||||
_fallState = GetComponent<FallState>();
|
||||
|
||||
@@ -8,7 +8,7 @@ public class JumpForwardState : AirParentState
|
||||
private Fix64 _jumpY;
|
||||
private int _jumpFrame = 5;
|
||||
private bool _jumpCancel;
|
||||
private readonly Fix64 _jumpForwardSubtract = (Fix64)0.25;
|
||||
private readonly Fix64 _jumpForwardX = (Fix64)0.14;
|
||||
|
||||
public void Initialize(bool jumpCancel = false)
|
||||
{
|
||||
@@ -25,24 +25,25 @@ public class JumpForwardState : AirParentState
|
||||
_playerMovement.ResetToWalkSpeed();
|
||||
if (_jumpCancel)
|
||||
{
|
||||
_jumpX = _baseController.InputDirection.x * (_jumpCancelForce);
|
||||
Debug.Log("A");
|
||||
_physics.Velocity = new FixVector2(_jumpForwardX * (Fix64)_baseController.InputDirection.x, _jumpCancelForce);
|
||||
}
|
||||
else
|
||||
{
|
||||
_jumpX = _baseController.InputDirection.x * (_player.playerStats.JumpForce - _jumpForwardSubtract);
|
||||
_physics.Velocity = new FixVector2(_jumpForwardX * (Fix64)_baseController.InputDirection.x, _player.playerStats.JumpForce + 0.01);
|
||||
}
|
||||
_jumpY = _player.playerStats.JumpForce;
|
||||
//_jumpY = _player.playerStats.JumpForce;
|
||||
}
|
||||
|
||||
|
||||
public override void UpdateLogic()
|
||||
{
|
||||
base.UpdateLogic();
|
||||
if (!DemonicsWorld.WaitFrames(ref _jumpFrame))
|
||||
{
|
||||
_physics.Velocity = new FixVector2(_physics.Velocity.x, (Fix64)_jumpY);
|
||||
}
|
||||
_physics.Velocity = new FixVector2((Fix64)_jumpX, _physics.Velocity.y);
|
||||
// if (!DemonicsWorld.WaitFrames(ref _jumpFrame))
|
||||
// {
|
||||
// _physics.Velocity = new FixVector2(_physics.Velocity.x, (Fix64)_jumpY);
|
||||
// }
|
||||
// _physics.Velocity = new FixVector2((Fix64)_jumpX, _physics.Velocity.y);
|
||||
}
|
||||
|
||||
public override void Exit()
|
||||
|
||||
@@ -41,7 +41,7 @@ public class BlockParentState : State
|
||||
_audio.Sound("Block").Play();
|
||||
_blockFrame = _blockAttack.hitStun;
|
||||
_playerMovement.Knockback(new Vector2(
|
||||
_player.OtherPlayer.transform.localScale.x, 0), new Vector2(_blockAttack.knockback, 0), _blockAttack.knockbackDuration);
|
||||
_player.OtherPlayer.transform.localScale.x, 0), new Vector2(_blockAttack.knockbackForce.x, 0), _blockAttack.knockbackDuration);
|
||||
|
||||
if (!_skip)
|
||||
{
|
||||
|
||||
@@ -44,26 +44,17 @@ public class ArcanaState : State
|
||||
_player.CurrentAttack = _playerComboSystem.GetArcana(_crouch, _air);
|
||||
_audio.Sound(_player.CurrentAttack.attackSound).Play();
|
||||
_player.ArcanaGauge -= (Fix64)1;
|
||||
if (_player.CurrentAttack.travelDistance == 0)
|
||||
if (_player.CurrentAttack.travelDistance.x == 0)
|
||||
{
|
||||
_playerMovement.ZeroGravity();
|
||||
}
|
||||
_playerUI.DecreaseArcana();
|
||||
_playerUI.SetArcana((float)_player.ArcanaGauge);
|
||||
_playerMovement.TravelDistance(new Vector2(
|
||||
_player.CurrentAttack.travelDistance * transform.root.localScale.x, 0));
|
||||
_playerMovement.TravelDistance(new Vector2(_player.CurrentAttack.travelDistance.x * transform.root.localScale.x, _player.CurrentAttack.travelDistance.y));
|
||||
_playerAnimator.Arcana(_player.CurrentAttack.name);
|
||||
_playerAnimator.OnCurrentAnimationFinished.AddListener(ArcanaEnd);
|
||||
}
|
||||
|
||||
public override void UpdateLogic()
|
||||
{
|
||||
if (!_playerComboSystem.GetArcana(_crouch, _air).reversal)
|
||||
{
|
||||
_playerMovement.TravelDistance(new Vector2(_player.CurrentAttack.travelDistance * transform.root.localScale.x, 0));
|
||||
}
|
||||
}
|
||||
|
||||
private void ArcanaEnd()
|
||||
{
|
||||
if (_stateMachine.CurrentState == this)
|
||||
|
||||
@@ -83,8 +83,7 @@ public class AttackState : State
|
||||
ToJumpForwardState();
|
||||
if (!_air && !_playerMovement.HasJumped)
|
||||
{
|
||||
_playerMovement.TravelDistance(new Vector2(
|
||||
_player.CurrentAttack.travelDistance * transform.root.localScale.x, _player.CurrentAttack.travelDistance * _player.CurrentAttack.travelDirection.y));
|
||||
_playerMovement.TravelDistance(new Vector2(_player.CurrentAttack.travelDistance.x * transform.root.localScale.x, _player.CurrentAttack.travelDistance.y));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -360,7 +359,10 @@ public class AttackState : State
|
||||
public override void Exit()
|
||||
{
|
||||
base.Exit();
|
||||
_physics.Velocity = FixVector2.Zero;
|
||||
if (!_air)
|
||||
{
|
||||
_physics.Velocity = new FixVector2((Fix64)0, _physics.Velocity.y);
|
||||
}
|
||||
_player.CanSkipAttack = false;
|
||||
_playerAnimator.OnCurrentAnimationFinished.RemoveAllListeners();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class AirborneHurtState : HurtParentState
|
||||
GameObject effect = Instantiate(_hurtAttack.hurtEffect);
|
||||
effect.transform.localPosition = _hurtAttack.hurtEffectPosition;
|
||||
_playerMovement.Knockback(new Vector2(
|
||||
_player.OtherPlayer.transform.localScale.x, _hurtAttack.knockbackDirection.y), new Vector2(_hurtAttack.knockback, _hurtAttack.knockback), _hurtAttack.knockbackDuration);
|
||||
_player.OtherPlayer.transform.localScale.x, _hurtAttack.knockbackDirection.y), _hurtAttack.knockbackForce, _hurtAttack.knockbackDuration);
|
||||
}
|
||||
CameraShake.Instance.Shake(_hurtAttack.cameraShaker);
|
||||
_canCheckGroundCoroutine = StartCoroutine(CanCheckGroundCoroutine());
|
||||
@@ -114,7 +114,6 @@ public class AirborneHurtState : HurtParentState
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public override bool ToGrabbedState()
|
||||
{
|
||||
_stateMachine.ChangeState(_grabbedState);
|
||||
|
||||
@@ -33,7 +33,7 @@ public class HurtParentState : State
|
||||
if (!_playerMovement.IsInCorner)
|
||||
{
|
||||
_playerMovement.Knockback(new Vector2(
|
||||
_player.OtherPlayer.transform.localScale.x, 1), new Vector2(_hurtAttack.knockback, _hurtAttack.knockbackForce.y), _hurtAttack.knockbackDuration);
|
||||
_player.OtherPlayer.transform.localScale.x, 1), new Vector2(_hurtAttack.knockbackForce.x, _hurtAttack.knockbackForce.y), _hurtAttack.knockbackDuration);
|
||||
}
|
||||
_player.OtherPlayerUI.IncreaseCombo();
|
||||
if (_player.OtherPlayerUI.CurrentComboCount == 1)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user