//public Rigidbody2D BulletPrefab => bulletPrefab; //public float BulletSpeed => bulletSpeed; void Awake() { //if (Instance == null) Instance = this; // else if (Instance != this) Destroy(this); // if(weaponSwitchButton == null) weaponSwitchButton = ChangeWeaponButtonSingleton.Instance; photonview = GetComponent <PhotonView>(); }
private void InitializeSingleton() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(this); } }