top of page

Forum Posts

baranovskystudio
Apr 17, 2023
In Arcade Idle Components
We tried to describe the work with components in detail, but if you have any questions, feel free to ask them in comments!) ADVICE: 1. View the preview scenes to understand how the components work. Use the resolution 1920x1080 to display the UI correctly. 2. Settings and documentation can be easily opened through this menu. 3. The amount of game resources can be easily changed for testing. Enable the Test Mode and set the required value for the required resource. What is Bootstrap? How to change renderer pipeline? COMPONENTS LIST ENVIRONMENT Player Movement - moves the player with a joystick. Player Animations - controls the player’s animations. Player Camera - follows player. Trigger - allows you to easily limit with tags who to work on. Placement - same as trigger only with delay and progress bar. Backpack - stacks any items into the number of columns you need. Special Backpack - stacks several kinds of elements, and set it in a position you want. Pointer Arrow - sets the position of the arrow relative to the player and rotates it to the target. Buyable Item - a simple component to help organise an unlimited purchase of something. Unlockable Item - a simple component that can help you to create object which can be unlocked one time. Upgradable Item - a simple component that helps to create upgrades panel items. Have maximum upgrades limit. UI UI Element - an abstract script created to simplify the use of UI panels and windows. Save System - a simple singleton class that can load and save PlayerData in PlayerPrefs. Resources System - a simple singleton class that helps you to perform resource operations. Panel Opener Settings Panel Shop Panel Upgrades Panel Follow Camera Resource Counter Progress Bar Progress Bar with Items Button Link Button Animations Button Buy
Main page content media
0
0
345
baranovskystudio
Apr 17, 2023
In Arcade Idle Components
Bootstrap - a script that simplifies the initialization of some components. Using it in conjunction with the abstract class Initializable, you can flexibly configure which sequence to initialize the systems and components. Scripts To Initialize On Awake - list of scripts that will be initialized when calling method awake. Scripts To Initialize On Start - same, only initializes when calling the start method. Get Objects For Awake\Get Objects For Start - finds all objects inherited from the Initializable class. EXAMPLE: First the systems will initialize, then the components. QUESTIONS: Where can I find Bootstrap prefab? - in Prefabs folder. 2. How to make script initializable? - inherit it from the Initializable class. public class SimpleClass : MonoBehaviour { //it's a default MonoBehaviour class } public class InitializableClass : Initializable { public override void Initialize() {} //it's a class which can be initialized }
Bootstrap content media
0
0
87
baranovskystudio
Apr 09, 2023
In Arcade Idle Components
To setup Universal Renderer Pipeline: 1. Import Universal RP from Package Manager. 2. Import Universal Pipeline package. To revert to Built-in Renderer Pipeline: Import Built-in Pipeline package. 2. Delete URP folder.
How to change renderer pipeline? content media
0
0
14
baranovskystudio
Mar 26, 2023
In Arcade Idle Components
Special Backpack - this component was created for example game, but we think it can be useful for you. With this component you can stack up to several kinds of elements, and set it in a position you want. When game starts backpack spawns elements to spawn points, which you need create manually. By doing that you can create backpacks like this: Resources - a list of resource element's settings. Type - resource element's type Prefab - element's prefab which will be spawned. Spawn Point - a list of transforms which will be used at spawning elements. Auto Spawn - turns on spawn at game start. Resource Type - enum which contains your backpack resource types. You can change it and name how you want. public enum ResourceType { Apple, Orange, } QUESTIONS: How to use it? At first rename the ResourceType types and create a custom prefab for every type. Add a special backpack component to your backpack game object and set Resources up. After it create a custom spawn point transforms and add to Spawn Points list. If you want to call SpawnItems() method manually set Auto Spawn false. 2. How to spawn items manually? [SerializeField] private SpecialBackpack _specialBackpack; private void Start() { _specialBackpack.SpawnItems(); } 3. How to change items count? [SerializeField] private SpecialBackpack _specialBackpack; private void Start() { //You can add items only of the type already in the backpack //If you want to add others, you must first empty the backpack _specialBackpack.AddItems(10, SpecialBackpack.ResourceType.Apple); _specialBackpack.RemoveItems(10); //If you need to know backpack is full or not, you can use it if (_specialBackpack.IsBackpackFull()) { } }
Special Backpack content media
0
0
14
baranovskystudio
Mar 26, 2023
In Arcade Idle Components
Upgradable Item - flexible component for things that can be upgraded. It saves item upgrade level. Button Buy - Button Buy component link. Use Price Text - if enabled, sets the text on the buy button. Button Text After Max Upgrade - text which will be shown after last upgrade. Use Progress Bar - allows to use progress bar. Progress Bar - component link. Id - it can be a random number, but all items must have a different id. Max Upgrade Level - number of times you can buy an upgrade. Note that the Progress Bar with Items must have the same maximum value. Price - item price. Payment Resource - resource to which the purchase will be paid. Increase Price After Upgrade - increase item price after every upgrade. Increase Type - increase method (multiply price by value or add value to price). Increase Value - value by which the price increases or multiplies. On Upgrade Item(int) - event which invokes when the item upgrades UpgradableItemData.cs - a script that contains data about an item state. [Serializable] public class UpgradableItemData { public int Id; public int UpgradeLevel; } QUESTIONS: How to use the component? Add the component to any object you want and set the settings: set id, max upgrade level and price and turn on use price text if you need. Add link to a button buy component and turn on and add link to a progress bar if you want. After that, the component is fully configured. Now you just need to realize for yourself what should happen when it upgrades. You can create a script, subscribe to events and continue to do what you want. 2. How to subscribe event? [SerializeField] private UpgradableItem _upgradableItem; private void Start() { _upgradableItem.OnUpgradeItem.AddListener(OnUpgradeItem); } private void OnUpgradeItem(int upgradeLevel) { Debug.Log($"Upgrade level is {upgradeLevel}"); }
Upgradable Item content media
0
0
15
baranovskystudio
Mar 26, 2023
In Arcade Idle Components
Unlockable Item - flexible component for things that should be unlocked. It saves item state (locked/unlocked). Use Placement - allows to use placement as an unlock trigger. Placement - component link. Hide Placement After Unlock - placement will be hided after unlock. Use Button Buy - allows to use Button Buy as an unlock trigger. Button Buy - component link. Button Text After Unlock - text which will be shown after unlock. Use Price Text - allows to use price text (it can be necessary if you use placement and need to show the price) Text - text mesh pro link. Price Text After Unlock - text which will be shown after unlock. Id - it can be a random number, but all items must have a different id. Is Unlocked By Default - item first launch state which will be saved. Price - item price. Payment Resource - resource to which the purchase will be paid. On Unlock Item() - this event invokes on unlock. UnlockableItemData.cs - a script that contains data about an item state. [Serializable] public class UnlockableItemData { public int Id; public bool IsUnlocked; } QUESTIONS: How to use the component? Add the component to any object you want and set the settings: set id, default state and price. After it choose the way you want to use as a trigger to unlock: you can use placement or button buy if you use any ui panel. Also if you use placement, you can turn on Use Price Text, use Placement with Text prefab and drag and drop text there. After that, the component is fully configured. Now you just need to realize for yourself what should happen if the component is unlocked. You can create a script, subscribe to events and continue to do what you want. 2. How to subscribe event? [SerializeField] private UnlockableItem _unlockableItem; private void Start() { _unlockableItem.OnUnlockItem.AddListener(OnUnlock); } private void OnUnlock() { Debug.Log("Item unlocked!"); }
Unlockable Item content media
0
0
22
baranovskystudio
Mar 26, 2023
In Arcade Idle Components
Upgrades Panel - script inherited from UIElement and created to turn on and off the panel. Canvas Group - link to canvas group required for UI Element. Close - on click this button panel will be turned off.
Upgrades Panel content media
0
0
8
baranovskystudio
Mar 24, 2023
In Arcade Idle Components
Shop Panel - script inherited from UIElement and created to turn on and off the panel. Canvas Group - link to canvas group required for UI Element. Close - on click this button panel will be turned off.
Shop Panel content media
0
0
11
baranovskystudio
Mar 24, 2023
In Arcade Idle Components
Button Buy - with this component, you can set a price, hide the icon, and subscribe to the button onClick event. Button - link to the button. QUESTIONS: How to set price? - Invoke SetText(string price); [SerializeField] private ButtonBuy _buttonBuy; private void Start() { _buttonBuy.SetText("100"); } 2. How to hide icon? [SerializeField] private ButtonBuy _buttonBuy; private void Start() { _buttonBuy.HideIcon(); } 3. How to subcribe onClick event? [SerializeField] private ButtonBuy _buttonBuy; private void Start() { _buttonBuy.Button.onClick.AddListener(OnButtonClick); } private void OnButtonClick() { Debug.Log("Button clicked"); }
Button Buy content media
0
0
14
baranovskystudio
Mar 24, 2023
In Arcade Idle Components
Buyable Item - a simple component allowing you to organize the purchase of something. Button Buy - button with Button Buy component that has resource icon and text with price. Price - item price. Payment Resource - resource to which the purchase will be paid. On Bought() - an event that is called if the purchase is successful. QUESTIONS: How to subscribe OnBought() event? [SerializeField] private BuyableItem _buyableItem; private void Start() { _buyableItem.OnBought.AddListener(OnBought); } private void OnBought() { Debug.Log("Bought"); }
Buyable Item content media
0
0
17
baranovskystudio
Mar 24, 2023
In Arcade Idle Components
Resources System - a system with which you can perform any operation with unlimited resources. Add, take, pay for purchases and upgrades. Resources - list of all game resources. Type - resource type. Counter - resource counter link. Test Mode - enables a test mode where you set a certain number of resources at startup. Test Resources Counts - test resources values. QUESTIONS: How to get resource count? - Use GetResourceCount(ResourceType type); private void Start() { var resourceCount = ResourcesSystem.Instance.GetResourceCount(ResourcesSystem.ResourceType.Banknotes); Debug.Log($"Resource count: {resourceCount}"); } 2. How to change resource count? - Use AddResourceCount(ResourceType type, int value); private void Start() { private void Start() { ResourcesSystem.Instance.AddResourceCount(ResourcesSystem.ResourceType.Banknotes, 100); //increase value ResourcesSystem.Instance.AddResourceCount(ResourcesSystem.ResourceType.Banknotes, -80); //decrease value } } 3. How to use TryToBuy(ResourceType type, int price, Action onComplete)? private void Start() { ResourcesSystem.Instance.TryToBuy(ResourcesSystem.ResourceType.Banknotes,100, OnComplete); } private void OnComplete() { Debug.Log("Bought!"); }
Resources System content media
0
0
23
baranovskystudio
Mar 12, 2023
In Arcade Idle Components
UI Element - is an abstract script created to simplify the use of UI panels and windows. It is easy to show and hide UI elements. Canvas Group - the link to a convenient component from Unity that allows you to quickly hide and make non-interactive UI an object and all its children. Is Showed - state of the item. On Element State Changed - action invokes when element state changes. QUESTIONS: How to use? - Create a new C# script for your panel or UI element and inherit it from UIElement. Be sure to announce the OnShow() and OnHide() methods. In this class you can implement the logic of your panel. public class Name : UIElement { protected override void OnShow() { //Do something } protected override void OnHide() { //Do something } } 2. How to change panel state? - If you need to turn on the panel by pressing the button, you can use Panel Opener or do it manually. [SerializeField] private UIElement _panel; private void Start() { _panel.ShowElement(); //or _panel.HideElement(); }
0
0
22
baranovskystudio
Mar 12, 2023
In Arcade Idle Components
Settings Panel - a full configuration component that can turn on and off sound and vibration, as well as save these values in the Save System. Canvas Group - link to canvas group required for UI Element. NOTICE: You can use the Settings button to show and hide the panel, in this case you do not need the Close button and the field can be left None.
Settings Panel content media
0
0
9
baranovskystudio
Mar 12, 2023
In Arcade Idle Components
Resource Counter - is a simple counter created to show the count of any items. Text - text that will show the number of items. Image - image that shows the icon of the item. Icon - item icon. Value - current items count. QUESTIONS: 1. How to set value? - Get the resource counter link and use SetValue(); [SerializeField] private ResourceCounter _counter; private void Start() { //SetValue(value); _counter.SetValue(100); }
Resource Counter content media
0
0
14
baranovskystudio
Mar 12, 2023
In Arcade Idle Components
Progress Bar with Items - a component that differs from Progress Bar in that it uses separate images on which the sprite changes depending on the state. Canvas Group - link to canvas group required for UI Element. Items - links to images of sprites that will be replaced. Unlocked Item Icon - a sprite that will be shown if the value is greater than or equal to the image ordinal number. Locked Item Icon - a sprite that will be shown if the value is less to the image ordinal number. Value - current progress bar value. QUESTIONS: 1. How to change value? - Get a progress bar link in any way you like and use SetProgress(); [SerializeField] private ProgressBarWithItems _progressBar; private void Start() { //SetProgress(value); _progressBar.SetProgress(5); } 2. How to reset value? - Use ResetValues(); [SerializeField] private ProgressBarWithItems _progressBar; private void Start() { _progressBar.ResetValues(); }
Progress Bar with Items content media
0
0
11
baranovskystudio
Mar 12, 2023
In Arcade Idle Components
Progress Bar - component with flexible settings, with it you can make progress bar by using different image modes Simple, Sliced, Filled. Canvas Group - link to canvas group required for UI Element. Set Image Manually - allow you to select progress line image manually. Image - progress line image. Use Text - enables showing progress. Text - text where progress shows. Is Health Bar - shows the value and maximum value in the text Text Format - option allows you to add your text to the value. The variables in parentheses are those that are then replaced with real values, and between them you can write any text. For example: {0} seconds; {0}/{1}. Max Value - maximum progress bar value. Value - current value. QUESTIONS: 1. How to change value? - Get a progress bar link in any way you like and use SetProgress(); [SerializeField] private ProgressBar _progressBar; private void Start() { //SetProgress(value, maxValue); _progressBar.SetProgress(10, 20); } 2. How to reset value? - Use ResetValues(); private void Start() { var progressBar = GetComponent<ProgressBar>(); progressBar.ResetValues(); }
Progress Bar content media
0
0
26
baranovskystudio
Mar 12, 2023
In Arcade Idle Components
Panel Opener - this component is used on the button to show and hide UI Element, and can play the button animations. Panel - UI Element link. Use Button Animations - allow you to use animations. Show Panel Trigger Name - animator trigger name which will set on show. Hide Panel Trigger Name - animator trigger name which will set on hide. We use such an animator so that after playing the animation back to the animation Idle. Otherwise, it will not be playing again. When the trigger is set, the animation is played and returned to Idle.
Panel Opener content media
0
0
21
baranovskystudio
Mar 12, 2023
In Arcade Idle Components
Button Link - this script should be used on the button, when you click on it will open the link you need. Url - link to be opened.
Button Link content media
0
0
9
baranovskystudio
Mar 12, 2023
In Arcade Idle Components
Button Animations - this script, when you press a button, sets a trigger in the animator and plays the animation. Works the same as PanelOpener. Trigger Name - animator trigger name which will set on click.
Button Animations content media
0
0
15
baranovskystudio
Mar 12, 2023
In Arcade Idle Components
Save System - is a simple singleton class that can load and save PlayerData in PlayerPrefs. You can add your variables to this class and change their values during the game. QUESTIONS: 1. How do I get PlayerData? - Use SaveSystem.Instance.Data private void Start() { var data = SaveSystem.Instance.Data; //For example... data.Sounds = false; data.Vibration = true; } 2. How to save data? - Use SaveSystem.Instance.SaveData(); private void Start() { //You need to save data after changes SaveSystem.Instance.SaveData(); }
Save System content media
0
0
20

baranovskystudio

Admin
More actions
bottom of page