C # development Wpf/silverlight animation and games series Tutorials (Game Course): (26)

Source: Internet
Author: User
Tags silverlight

C # development Wpf/silverlight animation and games series Tutorials (Game Course): (26) General role Avatar Panel

The current development progress of the game has basically realized the common interaction between the Elf objects, then we need to move towards the goal of the combat system. The prerequisite for the realization of it is to improve the basic attributes of the wizard control, such as adding life value, mana value, vitality value, experience value and other basic attributes and through the form interface for the perfect embodiment of this section, I will explain the specific implementation of the above content.

Now that you're adding attributes to the wizard, the first thing you'll think of is adding a property value indexer to the wizard control:

/// <summary>

/// 生命值,[0]-当前值,[1]-当前最大值

/// </summary>

public double[] VLife { get ; set ; }

/// <summary>

/// 魔法值,[0]-当前值,[1]-当前最大值

/// </summary>

public double[] VMagic { get ; set ; }

/// <summary>

/// 活力值,[0]-当前值,[1]-当前最大值

/// </summary>

public double[] VEnergy { get ; set ; }

/// <summary>

/// 等级

/// </summary>

public double VLevel { get ; set ; }

/// <summary>

/// 经验值

/// </summary>

public double VExperience { get ; set ; }

/// <summary>

/// 头像代号

/// </summary>

public int FaceSign { get ; set ; }

/// <summary>

/// PK模式

/// </summary>

public PKMode PKmode { get ; set ; }

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.