2.1.2 • Published 12 months ago

@evitcastudio/kit v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Kit

Kit is a lightweight, extensible 2D framework for game development in the Vylocity Game Engine. Designed to be simple and modular, Kit lets you build powerful projects through a plugin-driven architecture.

Install

npm i @evitcastudio/kit -g

global flag is so the path is set properly for the CLI tool

Resources

This script will locate all Vylocity engine-related files within the specified directory and anonymize them before placing them in the designated resources folder.

# From the CLI you will build all your resources to the out dir
kit build -i ./<in-dir> -o ./<out-dir>

During the execution of this command, a resource.json file will be automatically generated within your source directory. It is recommended to exclude this file from your version control system, as it is considered a build artifact.

!IMPORTANT This API should be ran BEFORE VYLO.load() is called.

!WARNING Depending on your environment the following import syntax for json may not work.

import resourceJSON from 'resource.json';
await Kit.setResources(resourceJSON);

Using Kit with plugins

import { Plugin } from 'custom-plugin';

const plugin = Kit.registerPlugin(Plugin);

Listening for plugin events

const listener = (pEvent: EmitterEvent) => {
    const { data, timestamp } = pEvent;
    // Here you can use the data that the event sent down.
}

// Here you listen for an event from the plugin: `Plugin`, under the event name of `eventName`
Kit.on('Plugin', 'eventName', listener);

// You can also stop listening for an event
Kit.off('Plugin', 'eventName', listener);

For more information check out the wiki

2.1.2

12 months ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.4.0

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago