- 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.
推薦閱讀
- Learning Cocos2d-x Game Development
- 網(wǎng)絡服務器配置與管理(第3版)
- 電腦軟硬件維修大全(實例精華版)
- Creating Dynamic UI with Android Fragments
- 硬件產(chǎn)品經(jīng)理成長手記(全彩)
- 單片機原理及應用系統(tǒng)設計
- AMD FPGA設計優(yōu)化寶典:面向Vivado/SystemVerilog
- 分布式系統(tǒng)與一致性
- Source SDK Game Development Essentials
- 超大流量分布式系統(tǒng)架構解決方案:人人都是架構師2.0
- 單片機開發(fā)與典型工程項目實例詳解
- RISC-V處理器與片上系統(tǒng)設計:基于FPGA與云平臺的實驗教程
- 筆記本電腦的結構、原理與維修
- 主板維修實踐技術
- 快·易·通:2天學會電腦組裝·系統(tǒng)安裝·日常維護與故障排除