public double ShellWeight() { if (counter == 0) { Start(); currentShell.Reload(); counter++; } return(this.currentShell.Weight); }
private void SetAmmoData() { fireShellData.Shell = shell.rigidbody; fireShellData.SpawnPoint = GameObject.Find(user + "ShellSpawnPoint"); fireShellData.isAlive = true; fireShellData.smoke = gunSmoke; hatchControlData = hatchControl.AddComponent("DataHatchControl") as DataHatchControl; hatchControlData.Power = 30; hatchControlData.RocketCaliber = rocketCaliber; shellData = shell.AddComponent("DataShells") as DataShells; shellData.CurrentShell = shellCaliber; shellData.Reload(); rocketData = rocket.AddComponent("DataRockets") as DataRockets; rocketData.CurrentRocket = hatchControlData.RocketCaliber; rocketData.Reload(); }
private void SetAmmoData() { fireShellData.Shell = shell.rigidbody; fireShellData.SpawnPoint = GameObject.Find (user+"ShellSpawnPoint"); fireShellData.isAlive = true; fireShellData.smoke = gunSmoke; hatchControlData = hatchControl.AddComponent("DataHatchControl") as DataHatchControl; hatchControlData.Power = 30; hatchControlData.RocketCaliber = rocketCaliber; shellData = shell.AddComponent("DataShells") as DataShells; shellData.CurrentShell = shellCaliber; shellData.Reload(); rocketData = rocket.AddComponent("DataRockets") as DataRockets; rocketData.CurrentRocket = hatchControlData.RocketCaliber; rocketData.Reload(); }