示例#1
0
    public void PlayOrientedParticle(bool active, OrientateParticle particle, CharController.Orientation orientation)
    {
        if (active)
        {
            switch (orientation)
            {
            case CharController.Orientation.Left:
                _orientedParticles[(int)particle].left.Play();
                _orientedParticles[(int)particle].right.Stop();
                break;

            case CharController.Orientation.Right:
                _orientedParticles[(int)particle].right.Play();
                _orientedParticles[(int)particle].left.Stop();
                break;
            }
        }
        else
        {
            _orientedParticles[(int)particle].left.Stop();
            _orientedParticles[(int)particle].right.Stop();
        }
    }
示例#2
0
 public void PlayOrientedParticle(bool active, OrientateParticle particle)
 {
     PlayOrientedParticle(active, particle, _charController.OrientationX);
 }