class Parent {
jump() {
if (!this.isDead()) {
this.lastActivityTime = Date.now();
}
}
isDead() {
// returns a boolean
}
}class Child extends Parent {
jump() {
if (!super.isDead()) {
super.jump();
this.speedY = 30;
}
}
}Join the Discord to ask follow-up questions and connect with the community
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time ๐.
35,928 Members
Join