Skip to content

Commit 69f58cd

Browse files
committed
add hsv values for block #35
1 parent 66bed70 commit 69f58cd

File tree

2 files changed

+72
-23
lines changed

2 files changed

+72
-23
lines changed

GeometryDashAPI/Levels/GameObjects/Default/Block.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,40 @@ public Layer ZLayer
4545
[GameProperty("32", 1f)] public float Scale { get; set; } = 1f;
4646
[GameProperty("34", false)] public bool GroupParent { get; set; }
4747

48+
[GameProperty("43", null)]
49+
private Hsv? hsv;
50+
51+
[GameProperty("44", null)]
52+
private Hsv? additionalHsv;
53+
54+
[GameProperty("41", false)]
55+
public bool HasHsv { get; protected set; }
56+
57+
[GameProperty("42", false)]
58+
public bool HasAdditionalHsv { get; protected set; }
59+
60+
/// <inheritdoc />
61+
public Hsv? Hsv
62+
{
63+
get => hsv;
64+
set
65+
{
66+
hsv = value;
67+
HasHsv = value != null;
68+
}
69+
}
70+
71+
/// <inheritdoc />
72+
public Hsv? AdditionalHsv
73+
{
74+
get => additionalHsv;
75+
set
76+
{
77+
additionalHsv = value;
78+
HasAdditionalHsv = value != null;
79+
}
80+
}
81+
4882
public Block()
4983
{
5084
}
Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
11
using GeometryDashAPI.Levels.Enums;
22

3-
namespace GeometryDashAPI.Levels.GameObjects
3+
namespace GeometryDashAPI.Levels.GameObjects;
4+
5+
public interface IBlock : IGameObject
46
{
5-
public interface IBlock : IGameObject
6-
{
7-
int Id { get; set; }
8-
float PositionX { get; set; }
9-
float PositionY { get; set; }
10-
bool HorizontalReflection { get; set; }
11-
bool VerticalReflection { get; set; }
12-
int Rotation { get; set; }
13-
bool Glow { get; set; }
14-
int LinkControl { get; set; }
15-
short EditorL { get; set; }
16-
short EditorL2 { get; set; }
17-
bool HighDetail { get; set; }
18-
int[] Groups { get; set; }
19-
bool DontFade { get; set; }
20-
bool DontEnter { get; set; }
21-
int ZOrder { get; set; }
22-
Layer ZLayer { get; set; }
23-
float Scale { get; set; }
24-
bool GroupParent { get; set; }
25-
bool IsTrigger { get; set; }
26-
}
7+
int Id { get; set; }
8+
float PositionX { get; set; }
9+
float PositionY { get; set; }
10+
bool HorizontalReflection { get; set; }
11+
bool VerticalReflection { get; set; }
12+
int Rotation { get; set; }
13+
bool Glow { get; set; }
14+
int LinkControl { get; set; }
15+
short EditorL { get; set; }
16+
short EditorL2 { get; set; }
17+
bool HighDetail { get; set; }
18+
int[] Groups { get; set; }
19+
bool DontFade { get; set; }
20+
bool DontEnter { get; set; }
21+
int ZOrder { get; set; }
22+
Layer ZLayer { get; set; }
23+
float Scale { get; set; }
24+
bool GroupParent { get; set; }
25+
bool IsTrigger { get; set; }
26+
27+
bool HasHsv { get; }
28+
bool HasAdditionalHsv { get; }
29+
30+
/// <summary>
31+
/// If block has 1 color: <b>base</b> or <b>detail</b><br/>
32+
/// The <see cref="Hsv"/> value takes either <b>base</b> or <b>detail</b><br/><br/>
33+
/// If block has 2 colors, <see cref="Hsv"/> is <b>base</b>
34+
/// </summary>
35+
Hsv? Hsv { get; set; }
36+
37+
/// <summary>
38+
/// If block has 2 colors: <b>base</b> and <b>detail</b><br/>
39+
/// <see cref="AdditionalHsv"/> is detail, otherwise null
40+
/// </summary>
41+
Hsv? AdditionalHsv { get; set; }
2742
}

0 commit comments

Comments
 (0)