// Start is called before the first frame update void Start() { genEnemy = GetComponent <GeneralEnemy>(); animator = GetComponent <Animator>(); rb = GetComponent <Rigidbody2D>(); matDefault = bodySR.material; playerTransform = GameObject.FindGameObjectWithTag("Player").transform; }
void Start() { genEnemy = GetComponent <GeneralEnemy>(); rb = GetComponent <Rigidbody2D>(); animator = GetComponent <Animator>(); player = GameObject.FindGameObjectWithTag("Player").transform; timeBtwShots = startTimeBtwnShots; bodySR = GetComponentInChildren <SpriteRenderer>(); //matWhite = Resources.Load("WhiteFlash", typeof(Material)) as Material; //castuje na material bo deafultowo jest obiekt matDefault = bodySR.material; }
private void Start() { genEnemy = GetComponent <GeneralEnemy>(); playerController = GameObject.FindObjectOfType <SAYController>(); rb = GetComponent <Rigidbody2D>(); sr = GetComponentInChildren <SpriteRenderer>(); animator = GetComponentInChildren <Animator>(); activeSpeed = Speed; //currentState = SlimeStates.Jump; Player = GameObject.FindGameObjectWithTag("Player").transform; counter = TimeToMove; matDefault = sr.material; }