3
3
using System . Linq ;
4
4
using NUnit . Framework ;
5
5
using osu . Framework . Allocation ;
6
+ using osu . Framework . Bindables ;
6
7
using osu . Framework . Extensions ;
8
+ using osu . Framework . Extensions . ObjectExtensions ;
7
9
using osu . Framework . Graphics ;
8
10
using osu . Framework . Graphics . Containers ;
9
11
using osu . Framework . Graphics . Pooling ;
10
12
using osu . Framework . Testing ;
11
- using osu . Game . Configuration ;
12
13
using osu . Game . Rulesets . Judgements ;
13
14
using osu . Game . Rulesets . Objects ;
14
15
using osu . Game . Rulesets . Scoring ;
16
+ using osu . Game . Rulesets . Tau . Configuration ;
15
17
using osu . Game . Rulesets . Tau . Objects . Drawables ;
16
18
using osu . Game . Skinning ;
17
19
18
20
namespace osu . Game . Rulesets . Tau . Tests
19
21
{
20
22
public class TestSceneDrawableJudgement : TauSkinnableTestScene
21
23
{
22
- [ Resolved ]
23
- private OsuConfigManager config { get ; set ; }
24
+ private readonly BindableBool hitLighting = new BindableBool ( ) ;
24
25
25
26
private readonly List < DrawablePool < TestDrawableTauJudgement > > pools ;
26
27
@@ -34,10 +35,17 @@ public TestSceneDrawableJudgement()
34
35
}
35
36
}
36
37
38
+ [ BackgroundDependencyLoader ]
39
+ private void load ( )
40
+ {
41
+ var config = ( TauRulesetConfigManager ) RulesetConfigs . GetConfigFor ( Ruleset . Value . CreateInstance ( ) ) . AsNonNull ( ) ;
42
+ config . BindWith ( TauRulesetSettings . HitLighting , hitLighting ) ;
43
+ }
44
+
37
45
[ Test ]
38
46
public void TestHitLightingDisabled ( )
39
47
{
40
- AddStep ( "hit Lighting disabled" , ( ) => config . SetValue ( OsuSetting . HitLighting , false ) ) ;
48
+ AddStep ( "hit Lighting disabled" , ( ) => hitLighting . Value = false ) ;
41
49
42
50
showResult ( HitResult . Great ) ;
43
51
@@ -49,7 +57,7 @@ public void TestHitLightingDisabled()
49
57
[ Test ]
50
58
public void TestHitLightingEnabled ( )
51
59
{
52
- AddStep ( "hit Lighting enabled" , ( ) => config . SetValue ( OsuSetting . HitLighting , true ) ) ;
60
+ AddStep ( "hit Lighting enabled" , ( ) => hitLighting . Value = true ) ;
53
61
54
62
showResult ( HitResult . Great ) ;
55
63
0 commit comments