Skip to content
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

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Add.messages #15

wants to merge 26 commits into from

Conversation

sebferrer
Copy link
Owner

No description provided.

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
Collaborator

Choose a reason for hiding this comment

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

animals

Copy link
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.

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 },
Copy link
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
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)
]
}
Copy link
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
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.

import { IActionable } from "./iactionable";
import { IMAGE_BANK } from "./main";

export abstract class ActionableEntity extends Entity implements IDrawable, IActionable {
Copy link
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

this.action_hitbox_ratio = action_hitbox_ratio == null ? 0 : action_hitbox_ratio;
this.actionable = false;
this.occuring = false;
if (position != null) {
Copy link
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
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
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
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


public set_position(position: Point) {
this.position = new Point(position.x, position.y);
this.action_hitbox = new ActionableEntityHitbox(this.id + "-hitbox", null,
Copy link
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