private void Awake() { rb = GetComponent <Rigidbody2D>(); sr = GetComponent <SpriteRenderer>(); matWhite = Resources.Load("WhiteFlash", typeof(Material)) as Material; matDefualt = sr.material; WS.EnemyHasSpawned(); }