您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
33 行
751 B
33 行
751 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UOP1.StateMachine;
|
|
|
|
/// <summary>
|
|
/// Controls playback of particles connected to movement. Methods invoked by the StateMachine StateActions
|
|
/// </summary>
|
|
public class DustParticlesController : MonoBehaviour
|
|
{
|
|
[SerializeField] ParticleSystem _walkingParticles = default;
|
|
[SerializeField] ParticleSystem _landParticles = default;
|
|
[SerializeField] ParticleSystem _jumpParticles = default;
|
|
|
|
public void EnableWalkParticles()
|
|
{
|
|
_walkingParticles.Play();
|
|
}
|
|
|
|
public void DisableWalkParticles()
|
|
{
|
|
_walkingParticles.Stop();
|
|
}
|
|
|
|
public void PlayJumpParticles()
|
|
{
|
|
_jumpParticles.Play();
|
|
}
|
|
public void PlayLandParticles()
|
|
{
|
|
_landParticles.Play();
|
|
}
|
|
}
|