- Unreal Development Kit Game Programming with UnrealScript:Beginner's Guide
- Rachel Cordone
- 79字
- 2021-08-27 11:59:11
Inheritance
Another important principle of object-oriented programming is inheritance. Let's say our game had four different kinds of weapons: Pistols, machine guns, sniper rifles, and laser cannons. A lot of the functionality of those guns would be the same. They would each have ammo, damage, accuracy, and so on. Instead of having to duplicate all that code, they could all inherit the basic functionality of a weapon and change the properties they needed to to get their specific functionality.
推薦閱讀
- Android NDK Game Development Cookbook
- 硬件產(chǎn)品經(jīng)理成長(zhǎng)手記(全彩)
- The Applied AI and Natural Language Processing Workshop
- 單片機(jī)原理及應(yīng)用系統(tǒng)設(shè)計(jì)
- scikit-learn:Machine Learning Simplified
- Hands-On Machine Learning with C#
- Machine Learning Solutions
- 電腦高級(jí)維修及故障排除實(shí)戰(zhàn)
- Intel Edison智能硬件開發(fā)指南:基于Yocto Project
- VMware Workstation:No Experience Necessary
- WebGL Hotshot
- Hands-On Deep Learning for Images with TensorFlow
- Intel FPGA權(quán)威設(shè)計(jì)指南:基于Quartus Prime Pro 19集成開發(fā)環(huán)境
- 創(chuàng)客電子:Arduino和Raspberry Pi智能制作項(xiàng)目精選
- 分布式存儲(chǔ)系統(tǒng):核心技術(shù)、系統(tǒng)實(shí)現(xiàn)與Go項(xiàng)目實(shí)戰(zhàn)