---
sidebar_position: 1
---

# Powerplay

## Overview
The **Power Play** feature enhances gameplay with **BUY-BONUS FEATURE** and **FAST-PLAY FEATURE** by providing a dynamic interface for player controls, integrated into the main scene for both desktop and mobile platforms.

![Desktop Bottom Bar](./img/powerplay/preview1.png)
![Desktop Bottom Bar](./img/powerplay/preview2.png)
![Desktop Bottom Bar](./img/powerplay/preview3.png)

---

## Prepare Prefabs

### Step 1: Configure `power-play-panel.prefab`

1. **Copy Prefab**:
   - Source: `assets/core-assets/hyper-core/packages/power-panel/prefabs/template-power-play-panel.prefab`
   ![From Template](./img/powerplay/from-powerplay-panel.png)
2. **Paste and Rename**:
   - Destination: `assets/game-assets/prefabs/power-play-panel.prefab`
   :::warning
    Rename the prefab to **`power-play-panel`** to ensure proper referencing
   :::
    ![Renamed Prefab](./img/powerplay/powerplay-panel-to.png)

---

### Step 2: Configure `mobile-power-play-panel.prefab`
1. **Copy Prefab**:
   - Source: `assets/core-assets/hyper-core/packages/ui/mobile-ui/prefabs/templates/template-mobile-power-play-panel.prefab`

   ![From Template](./img/powerplay/mobile-from.png)

2. **Paste and Rename**:
   - Destination: `assets/game-assets/prefabs/mobile/mobile-power-play-panel.prefab`
   :::warning
   Rename the prefab to **`mobile-power-play-panel`** to ensure proper referencing
   :::

   ![Renamed Prefab](./img/powerplay/mobile-to.png)

---

### Step 3: Configure Label Prefabs
1. **Copy Prefabs**:
   - Source: `assets/core-assets/slotty-core/packages/power-panel/editor/`
   - Copy all 5 label prefabs.

   ![From Folder](./img/powerplay/label-template-from.png)

2. **Paste**:
   - Destination: `assets/game-assets/editor/`

   ![To Folder](./img/powerplay/label-template-to.png)

---

## Edit Prefab
Customize the `power-play-panel` and `mobile-power-play-panel` prefabs according to the game design specifications.

![Prefab Design](./img/powerplay/label-template-to.png)

| Component         | Description                                       |
|------------------|---------------------------------------------------|
| **Label Outline** | Add an outline to make the text stand out.        |
| **Label Shadow**  | Add a shadow for better contrast and readability. |

---

## Setup Main Scene

Drag the `power-play-panel` prefab into your main scene:

![Main Scene Setup](./img/powerplay/ref-prefab.png)

---

## Setup Mobile UI

Open the **`mobile-ui`** prefab and drag in the `mobile-power-play-panel`:

![Mobile UI Setup](./img/powerplay/ref-mobile.png)

---

## Apply Textures

### Prepare these assets

![Assets Desktop](./img/powerplay/asset-desktop.png)
![Assets Mobile](./img/powerplay/asset-mobile.png)


### Configure Helpers

- Run the **Helper Tool** to configure `PowerplayDesktop`  
  ![Desktop Helper](./img/powerplay/desktop-helper.png)

- Run the **Helper Tool** to configure `PowerplayMobile`  
  ![Mobile Helper](./img/powerplay/mobile-helper.png)

---

## Manual Powerplay

![Manual Powerplay](./img/powerplay/manual-powerplay-review.png)

### Two Ways to Activate:

#### 1. Local
Append this param to the local URL:  
`http://localhost:7456/?minNormalBet=10`

#### 2. Game Live
- Step 1: Set a breakpoint like the image below:  
  ![Breakpoint](./img/powerplay/test-manual-powerplay.png)

- Step 2: Reload the page and run this code at the breakpoint:  
  ```js
  params.GameSettings.config.minNormalBet = 10;

### Setup manual-powerplay

**In the main scene**: create a node and add the corresponding script.

![Setup Manual Powerplay](./img/powerplay/manual-powerplay-setup.png)


**Tip**:
- Verify that all asset paths are correct and accessible in your project directory.
- Test the Power Play feature on both desktop and mobile to ensure responsiveness and functionality.
- Ensure the `minNormalBet` parameter aligns with the game’s betting requirements.

:::warning
If your game already has **`shortcut-buy-feature`** set up, this node may already be configured.
:::
