Overview
Last updated
Last updated
GameShell UI - Time Resource is a powerful and flexible Unity asset designed to simplify the implementation of time-based mechanics in your games. Whether you're creating an energy system, cooldown timers, or resource production mechanics, this asset provides the tools you need to quickly and efficiently integrate these features into your project.
1. Time-Based Resource Management
Implement energy systems, cooldown timers, and resource production mechanics
Customizable maximum values, regeneration rates, and time intervals
Automatic calculation of resource changes during online and offline periods
Scriptable Object Architecture
Easily create and manage multiple time-based resources
Consistent with other GameShell assets for seamless integration
Flexible and Extensible
Inherit from base classes to create custom time-based mechanics
Event-driven architecture for easy integration with UI and game logic
Performance Optimized
Caching mechanism for efficient time calculations
Designed for frequent updates without significant performance impact
Unity Editor Integration
Custom inspector for easy debugging and testing
Set up and configure time resources directly in the Unity Editor
Server-Ready Design
Architecture supports synchronization with server time
Easy to integrate with backend services for cheat prevention
1. GSUITimeBase
Base class for all time-based resources
Handles time interval calculations and formatting
GSUITimeResource
Extends GSUITimeBase to manage numeric resources that change over time
Implements consumption and regeneration mechanics
Example Implementation Classes
EnergyBar: Demonstrates an energy system
CoolTimeButtonContainer: Shows how to implement cooldown timers
ProduceFood: Illustrates a resource production system