Role attacks and the loading and management of special effects

Source: Internet
Author: User

for the attack of a character, first we have the base class in the role The Entity class defines the attack animation function for the role, subclasses such as the Warrior class only need to call the parent class method, and then play the effect .

for the loading and management of special effects, the first effect is a life cycle, the general art will do well, we can directly get the life cycle of special effects and so on, can be regarded as a special effect information class. then we need to create a Effect class for the logical management of the effects ( A class that does not inherit from the monobehaviour ), such as the initialization of special effects

Operation . then you need a management class for the special effects, which should be a Singleton class that inherits from Monobehaviour.

a singleton class that inherits from Monobehaviour is written as follows:

Effectmanager Management class is responsible for external exposure interface, the creation of special effects and destruction operations ... In addition, the general management class we need to create a dictionary or List to manage the creation of special effects resources, manage the life cycle of special effects resources, or reuse resources to achieve efficient resource utilization and smooth running of the game.

To be continued .....

Role attacks and the loading and management of special effects

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.