JohnSundell / JohnSundell/ImagineEngine

Extract collision detection logic from Actor

Open
#90 23 comments 0 reactions 0 assignees View on GitHub
discussion improvement
Dominant language
Swift
Stars
1.8k
Forks
104
PR merge metrics
No merged PRs in 30d

Description

To be able to add new types of `SceneObjects` that support collision detection without duplicating code, the collision detection logic in `Actor` needs to be extracted.

We probably need a new protocol something like this:

```swift
internal protocol Collidable {
var isCollisionDetectionEnabled: Bool { get set }
var rectForCollisionDetection: Rect { get }
}
```

Collision events also need to be extracted from ActorEventCollection.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.