-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add.messages #15
base: master
Are you sure you want to change the base?
Add.messages #15
Conversation
src/main.ts
Outdated
"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!")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
animals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je te hais.
efeff71
to
874c5c5
Compare
874c5c5
to
c304440
Compare
7ea4657
to
79a8692
Compare
src/messages/dialog_graph.ts
Outdated
next_node: <IQuestionNode>{ | ||
message: "Are you saying Ni to that old woman?", | ||
answers: [ | ||
{ | ||
message: "Um, yes.", | ||
animation: <IDialogAnimation>{ type: DialogAnimation.None }, | ||
animation_factor: 0, | ||
animation: { type: DialogAnimation.None }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* | |
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) | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fort probable effectivement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D'un autre côté je me demande si une entité sans position a vraiment du sens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.action_hitbox = new ActionableEntityHitbox(this.id + "-hitbox", null, | |
this.action_hitbox = new ActionableEntityHitbox(`${this.id}-hitbox`, null, |
No description provided.