miepzerino
2023-12-10 6761201c6321b50cd8d7517f8e502162b925ca0a
Added class for animation strings
1 files modified
2 files added
28 ■■■■ changed files
Assets/Scripts/AnimationStrings.cs 11 ●●●●● patch | view | raw | blame | history
Assets/Scripts/AnimationStrings.cs.meta 11 ●●●●● patch | view | raw | blame | history
Assets/Scripts/PlayerController.cs 6 ●●●●● patch | view | raw | blame | history
Assets/Scripts/AnimationStrings.cs
New file
@@ -0,0 +1,11 @@
using System.Collections;
using UnityEngine;
internal class AnimationStrings
{
    internal class Player
    {
        internal static string IsMoving = "IsMoving";
        internal static string IsFlying = "IsFlying";
    }
}
Assets/Scripts/AnimationStrings.cs.meta
New file
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9d7e1e1761a99344e9a9982a76ed283a
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Scripts/PlayerController.cs
@@ -18,7 +18,7 @@
        private set
        {
            _isMoving = value;
            animator.SetBool("IsMoving", value);
            animator.SetBool(AnimationStrings.Player.IsMoving, value);
        }
    }
@@ -30,7 +30,7 @@
        private set
        {
            _isFlying = value;
            animator.SetBool("IsFlying", value);
            animator.SetBool(AnimationStrings.Player.IsFlying, value);
            rotorSprite.enabled = value;
        }
    }
@@ -75,8 +75,6 @@
    private void FixedUpdate()
    {
        Debug.Log(moveInput.x);
        if (moveInput.y == 0)
        {
            if (rb.velocity.y <= maxFallSpeed)