Cleaning a bit
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
namespace Marro.PacManUdon
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Components;
|
||||
using VRC.SDKBase;
|
||||
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
using System;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
using VRC.SDK3.Components;
|
||||
|
||||
[RequireComponent(typeof(Animator))]
|
||||
[RequireComponent(typeof(Renderer))]
|
||||
public class PacMan : GridMover
|
||||
{
|
||||
private GameManager gameController;
|
||||
@@ -28,12 +28,11 @@
|
||||
private Vector2[] predefinedPath;
|
||||
private int predefinedPathIndex;
|
||||
|
||||
private Vector2 syncedPosition;
|
||||
private Vector2 targetDirection;
|
||||
private float freezeSeconds;
|
||||
private bool frozen;
|
||||
|
||||
#region Animator constants
|
||||
#region Animator constants
|
||||
private const string AnimatorKeyDead = "Dead";
|
||||
private const string AnimatorKeyDirection = "Direction";
|
||||
private const float AnimatorDirectionNone = 0f;
|
||||
@@ -42,7 +41,7 @@
|
||||
private const float AnimatorDirectionUp = 0.75f;
|
||||
private const float AnimatorDirectionDown = 1f;
|
||||
private const float AnimatorDirectionRightBig = 1.25f;
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
public void Initialize(PlayerInput input, VRCObjectPool pelletPool, GameManager gameController)
|
||||
@@ -62,8 +61,7 @@
|
||||
public void Reset()
|
||||
{
|
||||
// Debug.Log($"{gameObject} Reset!");
|
||||
transform.localPosition = startPosition;
|
||||
transform.localRotation = startRotation;
|
||||
transform.SetLocalPositionAndRotation(startPosition, startRotation);
|
||||
transform.localScale = startScale;
|
||||
direction = Vector2.left;
|
||||
targetDirection = Vector2.left;
|
||||
@@ -211,7 +209,7 @@
|
||||
// Debug.Log($"{gameObject} UpdateAnimator with direction {direction}, dead {dead}, frozen {frozen}");
|
||||
if (!gameObject.activeInHierarchy)
|
||||
return;
|
||||
|
||||
|
||||
animator.SetBool(AnimatorKeyDead, dead);
|
||||
if (dead)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user