66
70
if (ycol) {velocity.y = 0;}
69
77
//Scene::GetCamera()->position = position;
72
80
Creature::Creature() : Entity(),
77
85
sprite = new SpriteAnimation("creature.png", FILTER_NONE, 64, 64);
78
86
sprite->Add("idle", 0, 0, 0.35f);
87
sprite->Add("move", 1, 2, 4.0f);
85
95
skitter1 = Audio::NewDeck(Assets::RequestAudio("skitter1.ogg"));
86
96
skitter1->SetLoops(0); //loop indefinitely
90
100
//set aiTime to random so creatures tick at different times
91
101
aiTime= (float(rand()) / float(RAND_MAX)) * 1.0f;