MoTaForPSVita/Assets/Scripts/Controller/Environment/MagicController.cs

27 lines
704 B
C#
Raw Normal View History

using System;
2024-04-30 17:39:50 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MagicController : EnvironmentController
{
private new void OnEnable()
{
base.OnDisable();
GameManager.Instance.PlayerManager.Enable = false;
// 音频播放
2024-04-30 17:39:50 +08:00
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");
}
}