So I made a c# Script:
using UnityEngine;
using System.Collections;
public class WeaponStats : MonoBehaviour {
void Start() {
public bool automatic; //False = onbuttondown + cooldown; true = onbutton + cooldown
public float fireRate; //I guess this is self-explanatory
public int bulletAmount; //the amount of bullets being ejected from one shot.
public float accuracy; //Bullet flies where the crosshair is +- the accuracy in degrees
public float accuracyAimed; //Same but when aimed
public float cooldown; //When u switch weapons,this should be set to something so you cant switchabuse
public int damage; //Damage the wep deals
public bool silenced; //Whether the wep is silenced or not. u need to implement this in the ai somehow.
public float moveSpeed; //The speed the player moves with the wep equipped.
automatic = false;
fireRate = 1;
bulletAmount = 1;
accuracy = 5;
accuracyAimed = 1;
cooldown = 1;
damage = 10;
silenced = false;
moveSpeed = 3;
}
}
But the console gives me the Error:
Assets/Scripts/WeaponStats.cs(XX,14): error CS1525: Unexpected symbol `public'
For the lines 10-18, and i just can't figure out whats wrong with it.
Can someone help?
![43825-unbenannt.png|1000x319](upload://15EODImHZBMP0lvhPAvQzSmqAYa.png)