Class: AnimationManager

AnimationManager


new AnimationManager()

This class will let you handle all of the sex scenes

Source:

Methods


<private> _initAnimations()

The game's animations. Use this as a template for your own animations

Source:

<private> _initGallery()

The game's gallery functions. Use this as a template for your own gallery conditions

Source:

addToGallery(callback)

Add a function that returns an array of AnimationManager.galleryObject

Parameters:
Name Type Description
callback function

Function must return an array

Source:

createAnimation(config)

Parameters:
Name Type Description
config AnimationManager.animationConfig
Source:
Examples
// 27 frame animation. QueenThroatdefault00000 to QueenThroatdefault00026
GAME.animation.createAnimation({
    ID: "QueenThroatdefault",
    frameRate: 24,
    frames: () => {
         GAME.animation.createFrames('QueenThroatdefault', 0, 26, 5);
    }
});
// Only one image in animation
GAME.animation.createAnimation({
    ID: "townFuckQuest3",
    frameRate: 1,
    frames: [{key: "townFuckQuest3"}]
}
// Only two images in animation
GAME.animation.createAnimation({
    ID: "forestBeastQuest1",
    frameRate: 1,
    frames: [{key: 'forestBeastQuest1'}, {key: 'forestBeastQuest2'}]
}

createFrames(animationID, start, stop [, pad])

Creates the frames array for the animation

Parameters:
Name Type Argument Default Description
animationID string
start number

The starting frame of the animation, usually 0

stop number

The stopping frame of the animation. For example QueenThroatdefault ends on frame 26

pad number <optional>
5

Padding is how many 0s there are in the picture files. For example QueenThroatdefault00001 has 5 padding.

Source:
Returns:
Type
Array

getAnimation(animationID)

Returns an animation object that Phaser can use

Parameters:
Name Type Description
animationID string
Source:
Returns:
Type
object

getGallery()

Returns an array of available gallery animations

Source:
Returns:
Type
Array

playAnimation(animationID)

Launches the animation scene and plays the animation. Returns a promise so don't forget to resolve it

Parameters:
Name Type Description
animationID string
Source:
Returns:
Type
Promise.<any>

Type Definitions


advertisementConfig

Properties:
Name Type Argument Default Description
id string

ID of advertisement

type "praise" | "degrade"

There are two types of advertisements. Either "praise" or "degrade"

morals number <optional>
0

Morals needed for this advertisement to be available. Greater than or equal to if this is a praise advertisement. Less than or equal to if this is a degrade advertisement. 0 if this should be available at any moral level

name string

The name of the advertisement

description string

A short description

condition function <optional>

Function that returns true or false

requirements string <optional>
""

A list of requirements that will be displayed on the side of the advertisement menu

dialogueKey string

The dialogue that will be played if the player chooses this advertisement

rewards object

The rewards doing this advertisement

Properties
Name Type Description
moral number

If this is a praise advertisement it will increase the girl's moral, decrease if this is a degrade advertisement

reputation number

How much reputation is increased for this area

onComplete function <optional>

Function called after the advertisement is done

Source:

animationConfig

Properties:
Name Type Description
ID string
frameRate number
frames function | array

Pass the createFrames function or a completed Phaser frames array into this parameter

Source:

galleryObject

Properties:
Name Type Description
thumbnail string

The texture key of the thumbnail that is going to be used in the gallery, usually the first frame of the animation

type 'Animation' | 'Image'

The type of animation. Either a still "Image" or an "Animation"

animationID string

The animation ID for playing the animation

Source: