Skip to content

Add.messages#15

Open
sebferrer wants to merge 26 commits into
masterfrom
add.messages
Open

Add.messages#15
sebferrer wants to merge 26 commits into
masterfrom
add.messages

Conversation

@sebferrer
Copy link
Copy Markdown
Owner

No description provided.

Comment thread 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!"));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

animals

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je te hais.

Comment thread src/messages/dialog_graph.ts Outdated
message: "Um, yes.",
animation: <IDialogAnimation>{ type: DialogAnimation.None },
animation_factor: 0,
animation: { type: DialogAnimation.None },
Copy link
Copy Markdown
Owner Author

@sebferrer sebferrer Feb 10, 2019

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 ?

Comment on lines +6 to +13
/*
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)
]
}*/
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/*
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)
]
}*/

Comment on lines +15 to +21
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
Copy link
Copy Markdown
Collaborator

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

Suggested change
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)
];

Copy link
Copy Markdown
Owner Author

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.

Comment thread src/actionable_entity.ts
import { IActionable } from "./iactionable";
import { IMAGE_BANK } from "./main";

export abstract class ActionableEntity extends Entity implements IDrawable, IActionable {
Copy link
Copy Markdown
Collaborator

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

Comment thread src/actionable_entity.ts
this.action_hitbox_ratio = action_hitbox_ratio == null ? 0 : action_hitbox_ratio;
this.actionable = false;
this.occuring = false;
if (position != null) {
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fort probable effectivement

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Owner Author

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

Comment thread src/actionable_entity.ts

public set_position(position: Point) {
this.position = new Point(position.x, position.y);
this.action_hitbox = new ActionableEntityHitbox(this.id + "-hitbox", null,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.action_hitbox = new ActionableEntityHitbox(this.id + "-hitbox", null,
this.action_hitbox = new ActionableEntityHitbox(`${this.id}-hitbox`, null,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants