// Tell the bullet object we created to begin it's work making particles and sounds and such for client enjoyment. public void Shoot(bool isOwner, byte shotID, NetworkedRaycastBulletScript bullet ){ m_ShootPoint.SendMessage ( "Play", SendMessageOptions.DontRequireReceiver ); // Tell the muzzle particle system to play. Debug.Log(GetObjectDebugInfo() + "|NetworkedItemScript::Shoot:LOCAL_OBSERVATION: Your weapon was discharged with ShotID: " + shotID.ToString() ); bullet.Shoot (m_weaponController, isOwner, shotID); }
void UpdateHistory (byte shotID, NetworkedRaycastBulletScript bulletScript) { Debug.Log(GetObjectDebugInfo() + "|WeaponController::UpdateHistory:OBSERVATION: History was updated in " + gameObject.name + "!"); ShotInfo shot; shot.shotID = shotID; shot.startPosition = bulletScript.transform.position; shot.startDirection = bulletScript.transform.forward; m_shotInfoHistory.Add(shot); if(m_shotInfoHistory.Count > m_maxShotHistory){ m_shotInfoHistory.RemoveAt(0); } }