-
Notifications
You must be signed in to change notification settings - Fork 226
/
SnakeEffect.h
50 lines (35 loc) · 1.24 KB
/
SnakeEffect.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//--------------------------------------------------------------------------------------
// SnakeEffect.h
//
// Advanced Technology Group (ATG)
// Copyright (C) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
#pragma once
ref class SnakeEffect sealed
{
public:
SnakeEffect(
Windows::UI::Color color,
int32_t length,
Windows::Devices::Lights::LampArray^ lampArray);
void Stop();
bool ContainsLampArray(
Windows::Devices::Lights::LampArray^ lampArray);
private:
~SnakeEffect();
void Start();
void Update(
Windows::Devices::Lights::Effects::LampArrayCustomEffect^ sender,
Windows::Devices::Lights::Effects::LampArrayUpdateRequestedEventArgs^ args);
Platform::Array<int>^ GetPositionsBehindHead(
int head);
Platform::Array<Windows::UI::Color>^ GetScaledSnakeColors();
private:
int m_snakeHead;
Windows::UI::Color m_snakeColor;
int m_snakeLength;
Windows::Devices::Lights::LampArray^ m_lampArray;
// Playlist will stop playing on destruction.
Windows::Devices::Lights::Effects::LampArrayEffectPlaylist^ m_playList;
Platform::Array<int>^ m_allLampIndexes;
};