-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathenemy_note.cpp
More file actions
31 lines (27 loc) · 880 Bytes
/
Copy pathenemy_note.cpp
File metadata and controls
31 lines (27 loc) · 880 Bytes
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
#include "game.h"
#include "enemy_note.h"
namespace
{
// 通常Gargoyleの初期リム色。個別変更はSetRimLightColor()を使う。
const XMFLOAT3 NORMAL_GARGOYLE_RIM_COLOR = { 0.25f, 0.55f, 1.0f };
constexpr float NORMAL_GARGOYLE_RIM_INTENSITY = 0.5f;
}
void EnemyNote::Init(int lane, int face, float spawnZ, float speed, const char* modelPath)
{
NoteBase::Init(lane, face, spawnZ, speed, modelPath ? modelPath : "asset/model/Gargoyle.fbx");
m_Scale = { 0.03f,0.03f,0.03f };
m_ShaderType = S_RIM_LIGHT;
m_RimLightColor = NORMAL_GARGOYLE_RIM_COLOR;
m_RimLightIntensity = NORMAL_GARGOYLE_RIM_INTENSITY;
}
void EnemyNote::Draw()
{
// Parameter.rgbへ色、Parameter.aへ強度を送り、このGargoyleだけのリム色にする。
SetParameter({
m_RimLightColor.x,
m_RimLightColor.y,
m_RimLightColor.z,
m_RimLightIntensity
});
NoteBase::Draw();
}