MoTaForPSVita/Assets/Scripts/Controller/Environment/MagicController.cs
2024-04-30 17:39:50 +08:00

27 lines
703 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MagicController : EnvironmentController
{
private new void OnEnable()
{
base.OnDisable();
GameManager.Instance.PlayerManager.Enable = false;
// ÒôƵ²¥·Å
GameManager.Instance.SoundManager.PlaySound(ESoundType.Effect, "Magic");
}
private new void OnDisable()
{
base.OnDisable();
GameManager.Instance.PlayerManager.Enable = true;
}
public void ShowMagic(EDirectionType direction)
{
GetComponent<Animator>().SetFloat("direction", (int)direction);
GetComponent<Animator>().SetTrigger("show");
}
}