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

Source: Internet
Author: User
Tags silverlight

C # development Wpf/silverlight animation and games series (Game Course): (32) Thunder, mix, ice, poison, fire, wind-magical charm of magic

In this section, I'll show you how to add gorgeous additional properties to the magic in the game.

The first step is to define the rules:

1 Define Magical Additional attribute categories: In this tutorial example game, I define the magic attached property as 6 categories: thunder, Mix, ice, poison, fire, wind, why should you name it in such an irregular way? Because it is a tutorial, we need to learn how to achieve the corresponding effect, this 6 categories of properties is currently the most popular six magic attributes, if everyone has mastered, whether it is Chinese-style 5 lines or other styles, such as design, can do their best.

2 Define Magic additional property function and effect:

Thunder – Paralysis – elf paralysis (attached this property wizard will not move)

Mixed-Chaos – Sprite confusion (attached to this property wizard will run)

Ice – Frost – Elf deceleration (attached to this property sprite move speed, physical attack speed, casting speed all slow)

Poison – Poisoning – Elf intoxication (attached to this property wizard continues to reduce life value per second)

Fire – Burn – Genie Burns (attached to this property wizard all defensive class attribute values are lowered)

Wind – Weakness – Elf weakening (attached to this property Wizard all attack class attribute values are reduced)

Corresponding enumeration:

<ExtraItems>
 <Item Value="0" Src="Interface/Icon/Extra0.png" Name="麻痹" Description="效果:无法动弹" />
 <Item Value="1" Src="Interface/Icon/Extra1.png" Name="混乱" Description="效果:乱跑" />
 <Item Value="2" Src="Interface/Icon/Extra2.png" Name="冰冻" Description="效果:速度减缓" />
 <Item Value="3" Src="Interface/Icon/Extra3.png" Name="中毒" Description="效果:持续伤血" />
 <Item Value="4" Src="Interface/Icon/Extra4.png" Name="燃烧" Description="效果:所有防御属性值降低" />
 <Item Value="5" Src="Interface/Icon/Extra5.png" Name="虚弱" Description="效果:所有攻击属性值降低" />
</ExtraItems>

3 Define magical additional attributes visual performance:

Paralysis – White

Chaos – Yellow

Frozen – Sky Blue

Poisoning – Green

Burning – Red

Weakness – Grey

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.