public override void OnInspectorGUI() { if (script == null) { script = (Burstgun)target; } base.OnInspectorGUI(); float dmg = script.damage; float rpm = script.fireRate; float dps = (dmg * rpm) / 60f; float ttk = 100f / dps; EditorGUILayout.Space(); GUILayout.Label("Stats:"); GUILayout.Label( $"DMG = {dmg:0.00}\n" + $"RPM = {rpm:0.00}\n" + $"DPS = {dps:0.00}\n" + $"TTK = {ttk:0.00}" ); dmg = script.lvld_damage; rpm = script.lvld_fireRate; dps = (dmg * rpm) / 60f; ttk = 100f / dps; GUILayout.Label("Leveled stats:"); GUILayout.Label( $"DMG = {dmg:0.00}\n" + $"RPM = {rpm:0.00}\n" + $"DPS = {dps:0.00}\n" + $"TTK = {ttk:0.00}" ); }
public override void AssignWeapon(Weapon weap) { weapon = (Burstgun)weap; }