Game Development Reference
In-Depth Information
CGRect targetRect = CGRectMake(self.target.x -
boxWidth, self.target.y - boxWidth, boxWidth*2,
boxWidth*2);
if (CGRectContainsPoint(targetRect,
self.position)) {
[self evade:self.target deltaTime:deltaTime];
}
}
3. After this, the update function should look something similar to the following
screenshot:
Search WWH ::




Custom Search