# Class/Actor Commands


# Set Class

  • Method: player.setClass(ClassClass)
  • Arguments:
  • Return: instance of ClassClass
  • Usage:

Assign a class to the player

import { Fighter } from 'my-database/classes/fighter'

player.setClass(Fighter)

# Set Actor

  • Method: player.setActor(ActorClass)
  • Arguments:
  • Return: instance of ActorClass
  • Usage:

Allows to give a set of already defined properties to the player (default equipment, or a list of skills to learn according to the level)

import { Hero } from 'my-database/classes/hero'

player.setActor(Hero)