Add.messages#15
Conversation
| "Twilight is shining through the barrier. It seems your journey is finally over. You're filled with DETERMINATION.", | ||
| "Welcome to The Blunder of JayS", | ||
| "This is the first test message", | ||
| "We're awesomes!")); |
efeff71 to
874c5c5
Compare
874c5c5 to
c304440
Compare
7ea4657 to
79a8692
Compare
| message: "Um, yes.", | ||
| animation: <IDialogAnimation>{ type: DialogAnimation.None }, | ||
| animation_factor: 0, | ||
| animation: { type: DialogAnimation.None }, |
There was a problem hiding this comment.
Pourquoi virer le <DialogAnimation alors que tu le laisses sur les autres ?
…e, and are now responsive
| /* | ||
| export function get_actionable_entities(canvas_w?: number, canvas_h?: number): ActionableEntity[] { | ||
| return [ | ||
| new Sign("angry_dialog", new Sprite(0, 0, 29, 31), new Point(canvas_w / 2 - 15, canvas_h / 2 - 100), 29, 31, true, 0, 1, null, 0.5, angry_dialog), | ||
| new Sign("sample_dialog", new Sprite(0, 0, 29, 31), new Point(canvas_w / 2 - 15, canvas_h / 2 - 100), 29, 31, true, 0, 1, null, 0.5, sample_dialog), | ||
| new Sign("glitchy_dialog", new Sprite(0, 0, 29, 31), new Point(canvas_w / 2 - 15, canvas_h / 2 - 100), 29, 31, true, 0, 1, null, 0.5, glitchy_dialog) | ||
| ] | ||
| }*/ |
There was a problem hiding this comment.
| /* | |
| export function get_actionable_entities(canvas_w?: number, canvas_h?: number): ActionableEntity[] { | |
| return [ | |
| new Sign("angry_dialog", new Sprite(0, 0, 29, 31), new Point(canvas_w / 2 - 15, canvas_h / 2 - 100), 29, 31, true, 0, 1, null, 0.5, angry_dialog), | |
| new Sign("sample_dialog", new Sprite(0, 0, 29, 31), new Point(canvas_w / 2 - 15, canvas_h / 2 - 100), 29, 31, true, 0, 1, null, 0.5, sample_dialog), | |
| new Sign("glitchy_dialog", new Sprite(0, 0, 29, 31), new Point(canvas_w / 2 - 15, canvas_h / 2 - 100), 29, 31, true, 0, 1, null, 0.5, glitchy_dialog) | |
| ] | |
| }*/ |
| export function get_actionable_entities(canvas_w?: number, canvas_h?: number): ActionableEntity[] { | ||
| return [ | ||
| new Sign("angry_dialog", new Sprite(0, 0, 29, 31), null, 29, 31, true, 0, 1, null, 0.5, angry_dialog), | ||
| new Sign("sample_dialog", new Sprite(0, 0, 29, 31), null, 29, 31, true, 0, 1, null, 0.5, sample_dialog), | ||
| new Sign("glitchy_dialog", new Sprite(0, 0, 29, 31), null, 29, 31, true, 0, 1, null, 0.5, glitchy_dialog) | ||
| ] | ||
| } No newline at end of file |
There was a problem hiding this comment.
Les paramètres ne sont pas utilisés : pas la peine d'avoir une fonction pour ça
| export function get_actionable_entities(canvas_w?: number, canvas_h?: number): ActionableEntity[] { | |
| return [ | |
| new Sign("angry_dialog", new Sprite(0, 0, 29, 31), null, 29, 31, true, 0, 1, null, 0.5, angry_dialog), | |
| new Sign("sample_dialog", new Sprite(0, 0, 29, 31), null, 29, 31, true, 0, 1, null, 0.5, sample_dialog), | |
| new Sign("glitchy_dialog", new Sprite(0, 0, 29, 31), null, 29, 31, true, 0, 1, null, 0.5, glitchy_dialog) | |
| ] | |
| } | |
| export const actionable_entities = [ | |
| new Sign("angry_dialog", new Sprite(0, 0, 29, 31), null, 29, 31, true, 0, 1, null, 0.5, angry_dialog), | |
| new Sign("sample_dialog", new Sprite(0, 0, 29, 31), null, 29, 31, true, 0, 1, null, 0.5, sample_dialog), | |
| new Sign("glitchy_dialog", new Sprite(0, 0, 29, 31), null, 29, 31, true, 0, 1, null, 0.5, glitchy_dialog) | |
| ]; |
There was a problem hiding this comment.
Je les utilisais à un moment, d'où la fonction, je réfléchis encore à savoir si on va en avoir besoin ou pas. Pour centrer certains elements sur la carte par exemple.
| import { IActionable } from "./iactionable"; | ||
| import { IMAGE_BANK } from "./main"; | ||
|
|
||
| export abstract class ActionableEntity extends Entity implements IDrawable, IActionable { |
There was a problem hiding this comment.
Un détail mais en TS j'aime bien préfixer les classes abstraites par un A, je trouve qu'on s'y retrouve mieux, même logique que les noms d'interfaces
AActionableEntity
| this.action_hitbox_ratio = action_hitbox_ratio == null ? 0 : action_hitbox_ratio; | ||
| this.actionable = false; | ||
| this.occuring = false; | ||
| if (position != null) { |
There was a problem hiding this comment.
Le fait que la position et donc la hitbox soient optionnelles me laisse penser qu'il devrait y avoir un niveau d'abstraction supplémentaire
abstract class AActionableEntity --> entités actionnable
abstract class AHitBoxActionableEntity extends AActionableEntity --> entités actionnable avec hitbox
There was a problem hiding this comment.
Fort probable effectivement
There was a problem hiding this comment.
D'un autre côté je me demande si une entité sans position a vraiment du sens
There was a problem hiding this comment.
C'est pour la set de manière différée, il y a un algo qui place certaines collections d'entités de manière aléatoire mais qui a besoin d'attendre que la room soit totalement générée pour prendre compte des espaces indisponibles
|
|
||
| public set_position(position: Point) { | ||
| this.position = new Point(position.x, position.y); | ||
| this.action_hitbox = new ActionableEntityHitbox(this.id + "-hitbox", null, |
There was a problem hiding this comment.
| this.action_hitbox = new ActionableEntityHitbox(this.id + "-hitbox", null, | |
| this.action_hitbox = new ActionableEntityHitbox(`${this.id}-hitbox`, null, |
No description provided.