66
69
if (ycol) {velocity.y = 0;}
69
76
//Scene::GetCamera()->position = position;
72
79
Creature::Creature() : Entity(),
77
84
sprite = new SpriteAnimation("creature.png", FILTER_NONE, 64, 64);
78
85
sprite->Add("idle", 0, 0, 0.35f);
86
sprite->Add("move", 1, 2, 4.0f);
83
91
SetCollider(new RectangleCollider(32, 32));
85
96
velocity = Vector2::Random() * ACCELERATION;
87
98
//set aiTime to random so creatures tick at different times