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 ; }