![]() ![]() fresh install of Corgi Engine v7.6 on 2019.4.39f1.You can look at the ProjectileWeapon and MeleeWeapon classes for examples of how you can create very different weapons from this very same script. In addition to providing a solid basis for animations, sounds, state management, it allows you to define in your child class what happens when the weapon is used, and build from there. Using it as a basis you’ll be able to create everything, from a shotgun to a rocket launcher, but also a katana or a grappling gun. The Weapon class is meant to be extended and will define a lot of things common to all or most weapons. You can of course divert from that, but that’s how all the examples work. The Weapon classesĪll weapons in the Corgi Engine derive from the Weapon class. What the CharacterHandleWeapon component will then do is check for changes on the weapon use button, and if it gets pressed/released, transfer that information to the weapon currently equipped. If you don’t specify one, the weapon will attach to the root level of your prefab. This is a transform on your character (or nested inside its prefab) for the weapon to attach to. From its inspector you’ll be able to optionally select a weapon for your character to start with, define if it can pickup new ones, and specify a Weapon Attachment. To be able to equip and use a weapon, a Character must have a CharacterHandleWeapon component. The engine also includes a few examples of weapons you can have a look at, and that you can use as a basis when creating your own. ![]() The Corgi Engine includes a generic weapon system, allowing your characters to equip a weapon (projectile based, melee, or whatever you can think of), switch to another one, and use it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |