excaliburjs / Excalibur

🎮 Your friendly TypeScript 2D game engine for the web 🗡️

Home Page:https://excaliburjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add getGlobalOldPos() helper to Actors

mattjennings opened this issue · comments

Context

Serves same purpose as this.oldPos, but for the global position.

Proposal

Add this.getGlobalOldPos() method to Actor.

Additional thought: any appetite for turning getGlobalPos() into a getter?

class Actor {
  get globalPos(): ex.Vector {
    // do global pos logic
   }

  get globalOldPos(): ex.Vector {
     // .. etc
  }
}

@mattjennings 100% totally agree.

I'm down to explore the getter 👍

This issue hasn't had any recent activity lately and is being marked as stale automatically.