Tips for Silverlight game development: special effect production for transfer points

Source: Internet
Author: User

Previously, we used Projection to complete an upgraded special effect. Silverlight storyboard animation is quite easy. This time we will detail the frame production of the storyboard animation, as we all know, in the game, the transfer point is usually fixed in a certain place and played cyclically. It usually indicates that there will be a special event and so on, we will use the previous upgrade special effects for a slight transformation to get the following:

This series is only about tips for game development. It is simpler than purely technical articles. I personally feel that this series is more inclined to work in Blend art, it is a good start to bring some new ideas to Silverlight developers.

Now we add a transfer point control to the project. This control is still the same as the upgrade special effect and is centered,

Then draw a basic image to be rotated, that is, our circle. Here, we use the upgraded special effect circle. Of course, you can still use the image to replace this vector image, if you are interested in drawing your own, refer to <Silverlight game development tips: Role upgrade special effects>

Our purpose is to make this rotate. The characters in the middle are placed as reference objects and are in the correct angle. Therefore, Projection must be rotated to the correct angle:

Note that the Grid control at the first layer is a 3D angle of transformation, while the Gird at the next layer is used for overall rotation. Therefore, a two-layer container is required.

Now open the storyboard and create an animation named "ANI_Show ".

You need to adjust the rotation angle. Of course, you need to select the correct Gird container.

Now we can call a set of animations.

Add a key frame, and then set an animation of 0-degrees to the angle of the key frame at the new position.

At this moment, the storyboard animation is still one-way. We want to make a loop animation. Next we will select the animation name and Forever in the playback mode. Now the effect will be in a loop of 0 to degrees.

Well, Forever does not automatically play the video repeatedly during previewing, but does not play it during actual running. put this aside first,

There seems to be less transmission points in this case. Let's add an embellishment:

This circle is the same as the inside, but it is a simple copy, but the animation is an upper and lower loop, and the rotation direction is the opposite. Let's make it together:

Add a key frame at the beginning,

Then, add another key frame at the half-rotating position above, move the small circle, and we will return to the initial state at the last frame,

Select the first key frame at the starting point, right click, and select Copy. This operation records the key frame information. You can paste objects to make them have corresponding animations, here, we only operate the animation, from the 0 position to the new position, and return to the initial state.

To achieve this, you only need to paste the first key frame, as described in, move the timeline to the end, the rotation ends with the previous big circle (at this time, I adjusted the key frame of the big circle to 5th seconds, that is, it will play the animation from 0 to 360 in 5 seconds)

After the timeline is determined, select Paste.

Now, let's test the playback process and you will find that the circle is moving up and down.

But if the image cannot be moved, the image must be rotated.

Because the circle does not need to be rotated, we only need to select its child element.

Here we set the rotation animation to-360 degrees, which looks more natural,

Now, let's take a closer look at this effect.

In the gaming world, there are many transfer points in the form, so you can use some attributes to define these animation information, to control the performance in different scenarios, about the transfer point special effects, the introduction has been completed. Is Projection finished in this way? When we send our imagination, more interesting results will be produced, in the next article, I will introduce the effect of creating a circular shock wave using Projection. Please wait for the following :)

The source code of this project is as follows: Click to download it directly.

Recommended Silverlight game development blog: dark blue right hand

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.