Game Development Reference
In-Depth Information
95.
triggerPulled = false;
96.
}
97.
98.
public void Reload(){
99.
//Make sure there is no reloading in progress
100.
if(reloadProgress == 0){
101.
//Make sure there is enough magazines
102.
//and the current magazine isn't full
103.
if(magazineCount > 0 &&
104.
magazineSize < magazineCa-
pacity){
105.
//Initialize reloading progress
106.
reloadProgress
=
Time.deltaTime;
107.
SendMes-
sage("OnReloadStart",
108.
SendMes-
sageOptions.DontRequireReceiver);
109.
}
Search WWH ::




Custom Search