ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:19.15KB ,
资源ID:12061550      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/12061550.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(武器系统Weapon system.docx)为本站会员(b****4)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

武器系统Weapon system.docx

1、武器系统Weapon system武器系统(Weapon system)1. Definition of weapon data sets and how to equip players1. Copy the weapon model resources to the data/shapes directory2. Create a new weapons. Cs script file under the game/server directory and execute the script in the onServerCreated function of game.cs3. The

2、 datablock keyword is used to define the ShapeBaseImageData dataset object in the weapons script, which is called crossbowImage4. In the crossbowImage dataset definition, add the file of the shapeFile attribute to the weapon model5. Go back to the game.cs script to find the createPlayer function, an

3、d then call the device weapon function to equip the player with a weapon after creating the player codeWeapon equipment function: player object. MountImage (0)Run the test to see if the weapon appears in the players handRepeat the above steps to equip the player with m16 and bomb weaponsIi. How does

4、 the weapon appear in the game scene, after the player picks up the equipment to the hand6. Annotate the player with the weapons function, enter the game scene editor, and leave any StaticShape in the scene7. The datablock keyword is used to define the ItemData set object in the weapons script, whic

5、h is called crossbow, and the weapon model is defined as the item data set8. Find the StaticShape object in the task definition script flat. Mis file, replace the object with the Item object, delete the shapeFile attribute of the object, and add the datablock attribute to the data set of the weapon

6、ItemRunning test weapons can be found in game scenarios9. Add the attribute static = 1 in the Item object; Let the weapons in the game scene not move and increase the rotate = 1 attribute to rotate the weapon in the game sceneRun the test to see if the above attributes are in effect10. Add collision

7、 detection member function onCollision (% this, % obj, % col) for the weapon object data set object, and call the players weapon function in the function to let the weapon appear in the players handThe onCollision function parameter indicates that % this is the object of the weapon item % obj as the

8、 object of the weapon item % col is the object that objects to the object is the playerThe test player will be able to pick up the weapon3. The status change of the weapon is realized by adding members of the weapon data set object11. The eyeOffset attribute is added to the weapon data set object, s

9、o that the position of the weapon in the first person state will not be movedEyeOffset = 0.1 0.4-0.6;Run the test to see if the weapons position relative to the eye changes in the first person12. The definition attribute of the weapon state is added to the weapon data set object so that the weapon c

10、an be switched between several states/ / preactivation statusStateName 0 = Preactivate;StateTransitionOnLoaded 0 = Activate./ / the state of the transition condition / / transformationStateTransitionOnNoAmmo 0 = NoAmmo;/ / activationStateName 1 = Activate.StateTransitionOnTimeout 1 = Ready;StateTime

11、outValue 1 = 0.6;StateSequence 1 = Activate./ / standbyStateName 2 = Ready;StateTransitionOnNoAmmo 2 = NoAmmo;StateTransitionOnTriggerDown 2 = Fire./ / fireStateName 3 = Fire.StateTransitionOnTimeout 3 = Reload;StateTimeoutValue 3 = 0.1;StateFire 3 = true;StateRecoil 3 = LightRecoil;StateAllowImageC

12、hange 3 = false;StateSequence 3 = Fire.StateScript 3 = onFire;/ / ammunitionStateName 4 = Reload;StateTransitionOnNoAmmo 4 = NoAmmo;StateTransitionOnTimeout 4 = Ready;StateTimeoutValue 4 = 0.5;StateAllowImageChange 4 = false;StateSequence 4 = Reload;StateEjectShell 4 = true;/ / no ammunitionStateNam

13、e 5 = NoAmmo;StateTransitionOnAmmo 5 = Reload;StateSequence 5 = NoAmmo;StateTransitionOnTriggerDown 5 = DryFire;/ / dry fireStateName 6 = DryFire;StateTimeoutValue 6 = 1.0;StateTransitionOnTimeout 6 = NoAmmo;Run the test to see if the weapon has a status change effect13. Join the member function of

14、the weapon data set object (% this, % obj, % slot), call the function setImageAmmo, which sets the weapon cartridge in the function, and equip it with ammunition while picking up the weaponThe onMount function parameter indicates that % this is the weapon data set object % obj as the object of the w

15、eapons object % slot for the weapons bullet objectWhether the weapon is set to use the ammunition function: player object. SetImageAmmo (bullets object, whether there are bullets (true or false);Run the test to see if the weapon has ammunitionIv. Bullets that add weapons to achieve weapons firing fu

16、nction14. The bullet ProjectileData set object that defines the weapon is CrossbowProjectile, and the projectileShapeName property of this object is associated with the bullet model file15. Add shot for weapons dataset onFire (% this, obj, % % slot) member functions, create a bullet object Projectil

17、e in function, for the bullet object add datablock properties for CrossbowProjectile, add initialVelocity attribute value for the 0 0 1, add initialPosition attribute value is % obj. The getMuzzlePoint slot (%), add sourceObject value is % objThe ononFire function parameter indicates that % this is

18、the weapon data set object % obj is the object that is equipped with weapon and the player % slot is the bullet object for that weaponProperty description:The initial direction and vector of the initialVelocity / / bulletInitialPosition / / initial position of the bulletSourceObject / / an object th

19、at fires a bullet (action: the bullet will not collide with its object)Run the test to see if the weapon is fired after firing16. From Torque installer SDK/example/starter. The FPS/client/UI directory is copied to the crossHair. PNG sight picture to her game project/client/UI directory, and open the

20、 directory playGui. GUI file found in the file to create GuiCrossHairHud type game object code is copied to the project/client/UI/playGui GUI fileRun the test to see if there is a sight in the game17. Use the following member functions to complete the calculation of the direction of the bullet:Membe

21、r function description:Player object. GetMuzzlePoint (% slot) / / get the location of the muzzlePlayer objects.GetMuzzleVector (% slot) / / the direction of the muzzlePlayer object. GetVelocity (); / / a vector that moves the direction and speed of the playerVector calculation function:V3 is equal t

22、o VectorAdd (v1, v2) / / you can add vectors v1 and v2 to get the v3 vectorV3 is equal to VectorScale (v1, 10) / / Im going to zoom in 10 times the vector v1 to get the v3 vectorFormula 1: the initial direction of the bullet = the vector of the direction of the gunRun the test to see if the directio

23、n of the bullet in the game is aligned with the direction of the gunFormula 2: the initial direction of the bullet = 300 times the vector of the direction of the gunRun the test to see if the bullet is getting faster in the gameFormula 3: the initial direction of the bullet is equal to 300 times the

24、 vector of the direction of the gun, plus the vector of the movement of the characterRun the test to see if the direction of the bullet in the movement is in line with the sight18. Adjust the properties of ProjectileData for the bullet data set and achieve the effect of the grenade still outLifetime

25、 = 5000; / / determine how long it will take to be deleted from the game worldFadeDelay = 5000; / / how long after the generation has become transparent (ie hidden)BounceElasticity = 0; / / bounce height after collisionBounceFriction = 0; / / the lost momentum of the bounceIsBallistic = true; / / co

26、nfirm that the gravitational pull of gravity is not valid for the gravity of the earth.GravityMod = 0.001; / / gravity6. Use the attached particles to realize the particle effect of weapon bullets19. The data set (particle ledata) object that creates the particle before defining the weapon script is

27、 CrossbowBoltParticle20. The textureName attribute is specified in the CrossbowBoltParticle data set as the path of smoke. PNG21. Create the particle emitter data set (ParticleEmitterData) object CrossbowBoltEmitter22. Specify the particle attribute as CrossbowBoltParticle in the CrossbowBoltEmitter

28、 dataset23. Specify the particleEmitter attribute in the bullet data set object CrossbowProjectile as CrossbowBoltEmitterRun the test to see the bullet effect24. Add the following attributes to the CrossbowBoltParticle object to see the effectDragCoefficient = 0.0;GravityCoefficient = 0.35; / / grav

29、ity is negative to make it upward.InheritedVelFactor = 0.00; / / inertia obtained from other objects.LifetimeMS = 580; / / the display time of the particle is long.LifetimeVarianceMS = 150;UseInvAlpha = false;SpinRandomMin = 15.0;SpinRandomMax = 15.0;Colors 0 = 0.8 0.6 0.0 0.1; / / set the color of

30、a sequence particleColors 1 = 0.8 0.65 0.0 0.1;Colors 2 = 0.0 0.0 0.0 0.0;Sizes 0 = 1.0; / / set the zoom size of a sequence particle.Sizes 1 = 2.0;Sizes 2 = 4.0;Times 0 = 0.1; / / set the time period of the particle sequence.Times 1 = 0.4;Times 2 = 1.0;25. Add the following properties to the Crossb

31、owBoltEmitter object to see the effectEjectionPeriodMS = 15; / / how many milliseconds to emit a particle.PeriodVarianceMS = 5;EjectionVelocity = 0.35; / / the velocity of the particle moving.VelocityVariance = 0.20;ThetaMin = 0.0; Minimum emission Angle of / / particle emitter (x axis)ThetaMax = 60.0; Maximum emission Angle of / / particle emitter (x axis)Run the test to see the modified bullet particle effect7: realize the effect of bullet explosion particle26.Repeat the 19-22 steps in part 6 to create:CrossbowExplosionParticle particle data sets (ParticleData

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1