Skip to content

Commit

Permalink
update @eriengine/plugin-actor plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
izure committed Jul 1, 2021
1 parent 5ee28ad commit a72738a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eriengine",
"version": "1.0.0-alpha.25",
"version": "1.0.0-alpha.26",
"private": true,
"scripts": {
"lint": "vue-cli-service lint",
Expand All @@ -11,7 +11,7 @@
},
"main": "background.js",
"dependencies": {
"@eriengine/plugin-actor": "^1.5.2",
"@eriengine/plugin-actor": "^1.5.4",
"@eriengine/plugin-dialogue": "^1.4.3",
"@eriengine/plugin-feeling": "^1.0.0",
"@eriengine/plugin-fog-of-war": "^1.3.1",
Expand Down
8 changes: 6 additions & 2 deletions src/Template/Game/ACTOR_SCRIPT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import BaseActor from '@/BaseActor'

{{ DATA_LISTS }}

type SkillInformation<K extends keyof typeof Skills> = {
[key in keyof ReturnType<typeof Skills[K]['default']>]: ReturnType<typeof Skills[K]['default']>[key]
}

/**
* 타입 추론을 위한 클래스 타입입니다.
* 해당하는 올바른 액터를 선택하여 주십시오.
Expand Down Expand Up @@ -66,7 +70,7 @@ export function onActorEnd(this: Actor): void {
* @param target 적중시킨 대상 액터입니다.
* @param information 적중시킨 스킬에 대한 정보입니다.
*/
export function onActorHit(this: Actor, target: BaseActor, information: object): void {
export function onActorHit(this: Actor, target: BaseActor, information: Types.Json): void {
{{ onActorHit }}
}

Expand All @@ -75,7 +79,7 @@ export function onActorHit(this: Actor, target: BaseActor, information: object):
* @param from 적중당한 스킬을 사용한 대상 액터입니다.
* @param information 적중당한 스킬에 대한 정보입니다.
*/
export function onActorGetHit(this: Actor, from: BaseActor, information: object): void {
export function onActorGetHit(this: Actor, from: BaseActor, information: Types.Json): void {
{{ onActorGetHit }}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Template/Game/BASE_SCENE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ export default class BaseScene extends Phaser.Scene {
animsKey = key
}
const floor = this.isometric.setFloortile(x, y, key, undefined, animsKey)
this.optimization.add(flooor)

this.optimization.add(floor)
}
for (const { key, x, y, thresholdRadius, volume, delay, loop } of this.__map.audios) {
const audio = this.spatial.addSpatialAudio(key, { x, y }, { volume })
Expand Down
2 changes: 1 addition & 1 deletion src/Template/Game/SKILL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const key: string = __filename
* @param target 이 스킬에 적중한 대상입니다.
* @param dot 이 스킬에 도트 효과가 필요하다면 사용하십시오. 이는 독 데미지같은 기능을 구현하는데 유용합니다.
*/
export default function(this: BaseActor, target: BaseActor, dot: typeof this.dot): object {
export default function(this: BaseActor, target: BaseActor, dot: typeof this.dot) {
// 아래에 스킬을 사용했을 때 작동할 내용을 프로그래밍하세요.


Expand Down
2 changes: 1 addition & 1 deletion src/Template/Project/PACKAGE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"phaser": "^3.55.0",
"process": "^0.11.10",
"localforage": "^1.9.0",
"@eriengine/plugin-actor": "^1.5.2",
"@eriengine/plugin-actor": "^1.5.4",
"@eriengine/plugin-dialogue": "^1.4.3",
"@eriengine/plugin-feeling": "^1.0.0",
"@eriengine/plugin-fog-of-war": "^1.3.1",
Expand Down
4 changes: 2 additions & 2 deletions src/Template/Project/TYPES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
declare namespace Types {
type Primitive = string|number|boolean|null
type Primitive = string|number|boolean|null|Json|Array<Primitive>
interface Json {
[key: string]: Primitive|Primitive[]|Json
[key: string]: Primitive
}
type Transferable = Primitive|Json
type TransferableEncoding = 'utf8'|'utf-8'|'hex'|'base64'
Expand Down

0 comments on commit a72738a

Please sign in to comment.