Skip to content

Commit

Permalink
removing raining emote properties as they are not longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Treee committed Aug 4, 2020
1 parent 8173db5 commit 4e16416
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export abstract class RenderableObject {
}
}


// default behavior is to move linearly basedo n the velocity
calculateNextMoveFrame(dt: number): Vector2 {
return new Vector2(this.position.x + this.velocity.x, this.position.y + this.velocity.y);
Expand Down
2 changes: 1 addition & 1 deletion src/overlay-widgets/emote-widget/emotes/firework-emote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class FireworkEmote extends RenderableObject {

calculateNextMoveFrame(dt: number): Vector2 {
this.accelerate(dt);
return new Vector2(this.position.x + this.velocity.x, this.position.y + this.velocity.y);
return super.calculateNextMoveFrame(dt);
}

modifyOpacity(dt: number): void {
Expand Down
2 changes: 1 addition & 1 deletion src/overlay-widgets/emote-widget/emotes/parabolic-emote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ParabolicEmote extends RenderableObject {

calculateNextMoveFrame(dt: number): Vector2 {
this.accelerate(dt);
return new Vector2(this.position.x + this.velocity.x, this.position.y + this.velocity.y);
return super.calculateNextMoveFrame(dt);
}

doUpdate(dt: number): void {
Expand Down
12 changes: 0 additions & 12 deletions src/overlay-widgets/emote-widget/emotes/raining-emote.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import { RenderableObject, Vector2 } from './emote-interfaces';

export class RainingEmote extends RenderableObject {
opacity: number = 1;
angularVelocityDegrees: number = 0;
degreesRotation: number = 0;
imageSrc: string[] = [];
htmlElement: JQuery<HTMLElement>;
position: Vector2 = new Vector2();
velocity: Vector2 = new Vector2();
lifespan: number = 0;

constructor(size: Vector2, imageSrcs: string[]) {
super();
Expand All @@ -24,10 +16,6 @@ export class RainingEmote extends RenderableObject {
this.translate(position.x, position.y);
}

calculateNextMoveFrame(dt: number): Vector2 {
return new Vector2(this.position.x + this.velocity.x, this.position.y + this.velocity.y);
}

doUpdate(dt: number): void {
this.lifespan -= dt;
if (!this.isHidden()) {
Expand Down

0 comments on commit 4e16416

Please sign in to comment.