1.8 KiB
1.8 KiB
sidebar_position
sidebar_position |
---|
16 |
Idle Animation
Overview
Prepare the assets
Assets | Description |
---|---|
![]() |
Used to Setup the static sprite frame. |
![]() |
Used to Setup the idle animation. |
Setup Idle Animation
Configure Settings
Create the following script:
var BaseSlottySetting = p4fslot.require('slotty-setting');
var DIContainer = p4fcore.require('di-container');
BaseSlottySetting.prototype._registerInjection = function () {
DIContainer.Register('cellItemRender', require('idle-cell-item-render'));
DIContainer.Register('idleAnimationHandler', require('idle-animation-handler'));
};
Setup Animations
-
Using hepler to generate animation using the prepared assets
-
Configure Spine Animation
- Set Is Loop ✅.
- Setup the Static Sprite Frame using the prepared assets.
Configure Scene
- Search for the
idle-animation-panel
prefab. - Drag the "prefab" into "scene".
- Click "Generate Panel".
:::warning When using prefab directly from core-assets, you should convert to Regular Node.