void Start() { pgm = GameObject.FindGameObjectWithTag("PGM").GetComponent <PlatformGM>(); sgm = GameObject.FindGameObjectWithTag("SGM").GetComponent <ShieldGM>(); player = GetComponent <PlayerContr>(); }
void Awake() { if (instance = null) { instance = this; DontDestroyOnLoad(instance); } }