Cleaning a bit
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Data;
|
||||
using VRC.SDKBase;
|
||||
using VRC.Udon;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Data;
|
||||
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
[RequireComponent(typeof(Animator))]
|
||||
[RequireComponent(typeof(Renderer))]
|
||||
[RequireComponent(typeof(Collider))]
|
||||
public class BonusFruit : UdonSharpBehaviour
|
||||
{
|
||||
[SerializeField, UdonSynced, FieldChangeCallback(nameof(FruitType))] PacManFruitType fruitType;
|
||||
PacManFruitType fruitType;
|
||||
|
||||
Animator animator;
|
||||
new Renderer renderer;
|
||||
@@ -67,7 +68,6 @@
|
||||
this.fruitType = fruitType;
|
||||
value = (int)fruitScoreValue[PacManConstants.FruitTypeToValue(fruitType)];
|
||||
animator.SetFloat("FruitType", PacManConstants.FruitTypeToValue(fruitType));
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
public void SetFrozen(bool frozen)
|
||||
@@ -80,7 +80,6 @@
|
||||
renderer.enabled = active;
|
||||
collider.enabled = active;
|
||||
this.active = active;
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
public PacManFruitType FruitType
|
||||
@@ -101,18 +100,17 @@
|
||||
get => active;
|
||||
}
|
||||
|
||||
private DataDictionary fruitScoreValue = new DataDictionary()
|
||||
{
|
||||
{(int)PacManFruitType.None , 0},
|
||||
{(int)PacManFruitType.Cherries , 100},
|
||||
{(int)PacManFruitType.Strawberry, 300},
|
||||
{(int)PacManFruitType.Peach , 500},
|
||||
{(int)PacManFruitType.Apple , 700},
|
||||
{(int)PacManFruitType.Grapes , 1000},
|
||||
{(int)PacManFruitType.Galaxian , 2000},
|
||||
{(int)PacManFruitType.Bell , 3000},
|
||||
{(int)PacManFruitType.Key , 5000}
|
||||
};
|
||||
|
||||
private readonly DataDictionary fruitScoreValue = new DataDictionary()
|
||||
{
|
||||
{(int)PacManFruitType.None , 0},
|
||||
{(int)PacManFruitType.Cherries , 100},
|
||||
{(int)PacManFruitType.Strawberry, 300},
|
||||
{(int)PacManFruitType.Peach , 500},
|
||||
{(int)PacManFruitType.Apple , 700},
|
||||
{(int)PacManFruitType.Grapes , 1000},
|
||||
{(int)PacManFruitType.Galaxian , 2000},
|
||||
{(int)PacManFruitType.Bell , 3000},
|
||||
{(int)PacManFruitType.Key , 5000}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user