uc-Weapon System Knife

Source: Internet
Author: User

This is the class diagram of the UC weapon system, and I will not say every weapon, only the analysis of knives and chargun implementations, because the others are similar.

Ucweapon is the root of the weapon system, it does not do specific things, it only two kinds of behavior, one is baseaction, the other is altaction, to understand the two actions, you can consider the gun. Gun is a weapon that can be both melee and can be far from war, shooting is baseaction, with the butt hit people is altaction, these two actions cannot appear at the same time, so there are

Baseactioninternal and altactioninternal to control, so ucweapon in tick (Update) do one thing, constantly check whether the player can make baseaction and altaction,

Ucweapon's Baseaction

First check the ability to execute weapons baseaction, if you can get the skeleton system of weapons play montage animation, and then perform privatebaseaction, set the length of baseaction, here is focused on why to play montage, At this time because of different weapons action, their animation is different, knife attack time to go forward, gun attack time to have a muzzle on the animation bar, but these only specific subclasses know, Ucweapon will not know

Once you understand ucweapon, you can analyze a simple weapon knife,

When the player left key knife attack, the parent class Ucweapon played the knife animation, the interesting thing happened, UCWEAONKINFE itself is not aware of the player attack this kind of thing, but it is interesting that the knife in the tick event of each frame to check the attack animation of the knife to play,

If there is a play to explain the attack, then this knife can really hurt people? Not necessarily, stab people and knives do not have a half-dime relationship,

To the model of the knife, it can be seen from the hilt to the blagetop hair in a line, if there is something to think it is attack, if the collision to something, and this thing can be converted to bot strange, notify the bot strange, you were attacked, about the AI will be said later If the bot monster fails, it will give it a force, and some damage, if it supports physical effects.

The knife analysis is over.

uc-Weapon System Knife

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.