update setup background main game
@ -24,32 +24,23 @@ Try to run the project, you'll the result as below. It doesn't look like much bu
|
|||||||

|

|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Setup SpriteFrame Provider
|
|
||||||
---
|
|
||||||
|
|
||||||
**SpriteFrameProvider** allows global access to "sprite frames" from code.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Setup Animation Provider
|
|
||||||
---
|
|
||||||
|
|
||||||
**Animation Provider** contains all **animations** of the game.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Setup Reel Slot
|
## Setup Reel Slot
|
||||||
---
|
---
|
||||||
|
|
||||||
1. Prepare the asset for symbols.
|
1. Prepare the asset for symbols and reel frame.
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
2. Add symbols to **SpriteFrameProvider** which allows those symbols to be accessed globally from the code.
|
2. Add symbols to **SpriteFrameProvider** which allows those symbols to be accessed globally from the code.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
3. Config reel slot using `reel-scroller-helper`.
|
3. Add reel frame.
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
4. Config reel slot using `reel-scroller-helper`.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -63,7 +54,7 @@ Try to run the project, you'll the result as below. It doesn't look like much bu
|
|||||||
|**Cell Dim Color**| set the dark color for the non-win cells when showing winning animation for each line.||
|
|**Cell Dim Color**| set the dark color for the non-win cells when showing winning animation for each line.||
|
||||||
|**Top Count and Bot Count**| for spinning logic to work, a certain number of cell will be added to the top and bottom of the reel.||
|
|**Top Count and Bot Count**| for spinning logic to work, a certain number of cell will be added to the top and bottom of the reel.||
|
||||||
|
|
||||||
4. Generate panel using `reel-scroller-helper`.
|
5. Generate panel using `reel-scroller-helper`.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -81,23 +72,13 @@ The setup is very straightforward by using the `Generate Panel` command in each
|
|||||||
|
|
||||||
- Landing Panel:
|
- Landing Panel:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
To define Landing Panel, create the following script:
|
|
||||||
|
|
||||||
:::warning
|
|
||||||
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
|
|
||||||
SlottySetting.prototype._registerInjection = function () {
|
|
||||||
DIContainer.Register('landingGenerator', require('landing-generator'));
|
|
||||||
};
|
|
||||||
```
|
|
||||||
:::
|
|
||||||
|
|
||||||
- Present Win Cell Panel:
|
- Present Win Cell Panel:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- Present Win Border Panel:
|
- Present Win Cell Panel:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -107,18 +88,7 @@ To define Landing Panel, create the following script:
|
|||||||
|
|
||||||
If the tension use a custom size frame, we can change the option **sizeMode** to **Custom** and set the static frame and size.
|
If the tension use a custom size frame, we can change the option **sizeMode** to **Custom** and set the static frame and size.
|
||||||
|
|
||||||

|

|
||||||
**check toggle General Panel**
|
|
||||||

|
|
||||||
To define Tension Panel, create the following script:
|
|
||||||
:::warning
|
|
||||||
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
|
|
||||||
SlottySetting.prototype._registerInjection = function () {
|
|
||||||
DIContainer.Register('tensionGenerator', require('tension-generator'));
|
|
||||||
};
|
|
||||||
```
|
|
||||||
:::
|
|
||||||
|
|
||||||
|
|
||||||
## Setup UI Panel
|
## Setup UI Panel
|
||||||
|
|
||||||
@ -207,7 +177,7 @@ The `FormatText` property controls text formatting behavior for label components
|
|||||||
#### Step 3: Setup Ui In Main Scenes
|
#### Step 3: Setup Ui In Main Scenes
|
||||||
|
|
||||||
Create new node and configuration in your main scene:
|
Create new node and configuration in your main scene:
|
||||||

|

|
||||||
|
|
||||||
##### Platform Node Spawner Settings
|
##### Platform Node Spawner Settings
|
||||||
|
|
||||||
@ -341,52 +311,45 @@ Background overview:
|
|||||||
|
|
||||||
**Background portrait** only use for Mobile portrait.
|
**Background portrait** only use for Mobile portrait.
|
||||||
|
|
||||||
### 1. Prepare the assets
|
### Prepare the assets
|
||||||
| | Assets | Description |
|
| | Assets | Description |
|
||||||
|:-:|--------------|---------|
|
|:-:|--------------|---------|
|
||||||
|**Static**<br/>||Static background is necessary for the game|
|
|**Static**<br/>||Static background is necessary for the game|
|
||||||
|**Animation**<br/>||Animation background may or may not be present, depending on the game design|
|
|**Animation**<br/>||Animation background may or may not be present, depending on the game design|
|
||||||
|
|
||||||
### 2. Background Landscape
|
### Background Landscape
|
||||||
|
|
||||||
- **background-container:** must have **orientation-ui-controller** to display on Landscape with the options below.
|
We use sprite frame background for landscape from prepared assets.
|
||||||
- **background-main-game:** we use sprite frame from prepared assets.
|
|
||||||
|
|
||||||
Both must add component **Widget** with the options below to resize with parent node.
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 3. Background Portrait
|
### Background Portrait
|
||||||
|
|
||||||
- **moible-background-container:**
|
|
||||||
- Add **mobile-portrait-background-ui-controller** to display only on Mobile.
|
|
||||||
- Add **background-mobile-portrait-fullscreen-scaler** to resize with screen resolution.
|
|
||||||
- Add **orientation-ui-controller** to display on Portrait with the options below.
|
|
||||||
|
|
||||||
- **mobile-background-main-game:** we use sprite frame from prepared assets. Must add component **Widget** with the options below to resize with parent node.
|
We use sprite frame background for mobile from prepared assets.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 4. Background Animation
|
### Background Animation
|
||||||
|
|
||||||
If the game have design animation for background, we will do this step.
|
If the game have design animation for background, we will do this step.
|
||||||
|
|
||||||
1. Add **animation-provider**: This component contains all **animation** of the game.
|
1. Using hepler to generate animation from prepared assets
|
||||||
|
|
||||||
2. Using hepler to generate animation.
|
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
3. We have the result as below, and continue setup for **spine-animation**.
|
2. We have the result as below, and continue setup for **spine-animation**.
|
||||||
- **Is Loop**: is ✅ because this animation will play through the game.
|
- **Is Loop**: is ✅ because this animation will play through the game.
|
||||||
- **Static Sprite Frame**: It will be displayed when the animation has not finished loading.
|
- **Static Sprite Frame**: It will be displayed when the animation has not finished loading.
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
4. Add animation background with component below:
|
3. Add animation background with component below:
|
||||||
|
|
||||||
**Animation background landscape**
|
**Animation background landscape**
|
||||||
|
|
||||||
|
- Create **Empty Node** with name **anim-background-main-game**.
|
||||||
- Add **animation-play-on-anable** with animation name in **Animation Provider**.
|
- Add **animation-play-on-anable** with animation name in **Animation Provider**.
|
||||||
- Add **background-scaler** resize with screen resolution.
|
- Add **background-scaler** resize with screen resolution.
|
||||||
|
|
||||||
@ -394,14 +357,17 @@ If the game have design animation for background, we will do this step.
|
|||||||
|
|
||||||
**Animation background portrait**
|
**Animation background portrait**
|
||||||
|
|
||||||
- **mobile-background-anim-portrait:**
|
- Create **Empty Node** with name **mobile-background-anim-portrait**.
|
||||||
- Add **mobile-portrait-background-ui-controller** to display only on **Mobile**.
|
- Add **mobile-portrait-background-ui-controller** to display only on **Mobile**.
|
||||||
- Add **orientation-ui-controller** to display on Portrait with the options below.
|
- Add **orientation-ui-controller** to display on Portrait with the options below.
|
||||||
- **anim-background-main-game:**
|
|
||||||
- **animation-play-on-anable** with animation name in **Animation Provider**.
|
|
||||||
- **portrait-anim-background-scaler** resize with screen resolution.
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
- Create **Empty Node** with name **anim-background-main-game**.
|
||||||
|
- Add **animation-play-on-anable** with animation name in **Animation Provider**.
|
||||||
|
- Add **portrait-anim-background-scaler** resize with screen resolution.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Setup Popup Panel
|
## Setup Popup Panel
|
||||||
|
|
||||||
|
BIN
docs/02-setup-main-game/img/05-main-scene/add-reel-frame-2.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/add-reel-frame.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 11 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/bg-setup-anim-1.png
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/bg-setup-anim-2.png
Normal file
After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 95 KiB |
BIN
docs/02-setup-main-game/img/05-main-scene/reel-frame.png
Normal file
After Width: | Height: | Size: 115 KiB |