Release Build 1100. Camera now starts near the player for a smoother looking pan effect instead of somewhere far off-screen. Custom monster attribute handling now completed and compact.
This commit is contained in:
parent
a1a35fabd0
commit
3ee066bb88
@ -996,6 +996,13 @@ void Crawler::LoadLevel(MapName map){
|
||||
|
||||
player->upperLevel=false; //Assume player starts on lower level.
|
||||
player->SetPos(MAP_DATA[map].MapData.playerSpawnLocation);
|
||||
|
||||
vf2d cameraStartPos=player->GetPos()+vf2d(-24*6,0);
|
||||
camera.SetMode(Camera2D::Mode::Simple);
|
||||
camera.SetTarget(cameraStartPos);
|
||||
camera.Update(game->GetElapsedTime());
|
||||
camera.SetMode(Camera2D::Mode::LazyFollow);
|
||||
camera.SetTarget(player->GetPos());
|
||||
|
||||
pathfinder.Initialize();
|
||||
}
|
||||
|
||||
@ -272,6 +272,7 @@
|
||||
<ClInclude Include="Emitter.h" />
|
||||
<ClInclude Include="Map.h" />
|
||||
<ClInclude Include="Monster.h" />
|
||||
<ClInclude Include="MonsterAttribute.h" />
|
||||
<ClInclude Include="MonsterStrategyHelpers.h" />
|
||||
<ClInclude Include="olcPGEX_TransformedView.h" />
|
||||
<ClInclude Include="olcPixelGameEngine.h" />
|
||||
@ -306,6 +307,7 @@
|
||||
<ClCompile Include="LightningBoltEmitter.cpp" />
|
||||
<ClCompile Include="Map.cpp" />
|
||||
<ClCompile Include="Meteor.cpp" />
|
||||
<ClCompile Include="MonsterAttribute.cpp" />
|
||||
<ClCompile Include="RunTowards.cpp" />
|
||||
<ClCompile Include="Pathfinding.cpp" />
|
||||
<ClCompile Include="pixelGameEngine.cpp" />
|
||||
|
||||
@ -135,6 +135,9 @@
|
||||
<ClInclude Include="MonsterStrategyHelpers.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MonsterAttribute.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Player.cpp">
|
||||
@ -236,6 +239,9 @@
|
||||
<ClCompile Include="SlimeKing.cpp">
|
||||
<Filter>Source Files\Monster Strategies</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MonsterAttribute.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="cpp.hint" />
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "MonsterAttribute.h"
|
||||
#define SETUP(attribute,type) _ATTRIBUTE attribute{ATTRIBUTE_TYPE::type};
|
||||
|
||||
_ATTRIBUTE Attribute::IFRAME_TIME_UPON_HIT{ATTRIBUTE_TYPE::FLOAT};
|
||||
_ATTRIBUTE Attribute::SHOOT_RING_TIMER{ATTRIBUTE_TYPE::FLOAT};
|
||||
SETUP(Attribute::IFRAME_TIME_UPON_HIT,FLOAT);
|
||||
SETUP(Attribute::SHOOT_RING_TIMER,FLOAT);
|
||||
@ -16,6 +16,7 @@ struct _ATTRIBUTE{
|
||||
};
|
||||
|
||||
struct Attribute{
|
||||
static _ATTRIBUTE IFRAME_TIME_UPON_HIT;
|
||||
static _ATTRIBUTE SHOOT_RING_TIMER;
|
||||
#define SETUP(attribute) static _ATTRIBUTE attribute;
|
||||
SETUP(IFRAME_TIME_UPON_HIT);
|
||||
SETUP(SHOOT_RING_TIMER);
|
||||
};
|
||||
@ -12,7 +12,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,int strategyNumbe
|
||||
case 0:{
|
||||
m.size=ConfigInt("Phase1.Size")/100;
|
||||
m.diesNormally=false;
|
||||
m.Set(Attribute::IFRAME_TIME_UPON_HIT,0);
|
||||
m.Set(Attribute::IFRAME_TIME_UPON_HIT,0.f);
|
||||
m.iframe_timer=ConfigFloat("Phase5.IframeTimePerHit");
|
||||
m.phase=1;
|
||||
}break;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 1094
|
||||
#define VERSION_BUILD 1101
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
||||
2784
Crawler/pge.data
2784
Crawler/pge.data
File diff suppressed because it is too large
Load Diff
1296
Crawler/pge.html
1296
Crawler/pge.html
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
Crawler/pge.wasm
BIN
Crawler/pge.wasm
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user