示例#1
0
    private void SetOnFire(SpriteComponent sprite, AppearanceComponent appearance, FireVisualsComponent component, bool onFire, float fireStacks)
    {
        if (component.Sprite != null)
        {
            sprite.LayerSetRSI(FireVisualLayers.Fire, component.Sprite);
        }

        sprite.LayerSetVisible(FireVisualLayers.Fire, onFire);

        if (fireStacks > component.FireStackAlternateState && !string.IsNullOrEmpty(component.AlternateState))
        {
            sprite.LayerSetState(FireVisualLayers.Fire, component.AlternateState);
        }
        else
        {
            sprite.LayerSetState(FireVisualLayers.Fire, component.NormalState);
        }
    }