Yeah here is my complete source code for this
// Includes, namespace and prototypes
#include "template.h"
#include "Player.h"
#include "Enemy.h"
using namespace AGK;
#define PLAYER 1
app App;
Player playerOne;
Enemy enemyOne;
// App prototype
void AppForceExit ( void );
// Begin app, called once at the start
void app::Begin( void )
{
//agk::SetVirtualResolution ( m_DeviceWidth, m_DeviceHeight );
agk::SetVirtualResolution(800, 600);
agk::SetPhysicsGravity(0, 75.f);
agk::SetPhysicsWallBottom(1);
agk::LoadImage(1, "ship_one.png");
agk::LoadMusic(2, "/Users/maxmarze/sandbox/AGK/IDE/templates/template_mac_xcode4/Maxs game.mp3");
//agk::SetMusicFileVolume(2, 75);
agk::PlayMusic(2, 1, 2, 2);
playerOne.CreatePlayer(PLAYER);
enemyOne.SpawnEnemies();
agk::LoadImage(2, "/Users/maxmarze/sandbox/AGK/IDE/templates/template_mac_xcode4/Enemy_one.png");
agk::CreateSprite(11, 2);
agk::SetSpriteScale(11, 2.f, 2.f);
agk::SetSpritePosition(11, 200.f, 200.f);
}
// Main loop, called every frame
void app::Loop ( void )
{
agk::Print("Prototype 0.0001");
agk::Print("Changed to AGK");
// Tried didn't work
/*if(agk::GetMusicPlaying() == 0)
{
agk::PlayMusic(2);
} */
playerOne.MovePlayer();
enemyOne.CheckCollision();
agk::Sync();
}
// Called when the app ends
void app::End ( void )
{
}
I'm developing on xcode on a mac and I think the correct version number is 10776 or something along that number for AGK.