//private Animator animator; public void Start() { //animator = GetComponent<Animator>(); moveController = GetComponent<EnemyMoveController>(); animationController = GetComponent<AnimationController>(); health = GetComponent<Health>(); player = FindObjectOfType<Player>(); //rigidbody2D.mass = 10; distance = new Vector2(0, 0); speed = new Vector2(0, 0); isAgro = false; attackDelay = 3; rnd = new System.Random(Guid.NewGuid().GetHashCode()); t = 3 + rnd.Next(0, 3000) / 1000f; facing = new Vector2(0, 0); point = new Vector2(100, 100); distanceFromPoint = new Vector2(100, 100); up = new Vector2(0, 0.4f); left = new Vector2(-0.4f, 0); right = new Vector2(0.4f, 0); down = new Vector2(0, -0.4f); canAttack = true; }
//private Animator animator; //Create the angel gameObject public void Start() { //animator = GetComponent<Animator>(); moveController = GetComponent<EnemyMoveController>(); health = GetComponent<Health>(); player = FindObjectOfType<Player>(); sprRend = GetComponent<SpriteRenderer>(); boxColl = GetComponent<BoxCollider2D>(); distance = new Vector2(0, 0); isAgro = false; isFaking = stageThree = stageFour = false; rnd = new System.Random(Guid.NewGuid().GetHashCode()); t = 3 + rnd.Next(0, 3000) / 1000f; fake_CD = 0; invis_CD = 0; running = 0; radius = 1; i = 0; attack_CD = 1; }
//private Animator animator; public void Start() { //animator = GetComponent<Animator>(); moveController = GetComponent<EnemyMoveController>(); transform.gameObject.tag = "Attackable"; health = GetComponent<Health>(); rnd = new System.Random(Guid.NewGuid().GetHashCode()); t = 3 + rnd.Next(0, 3000) / 1000f; }
//private Animator animator; public void Start() { //animator = GetComponent<Animator>(); player = FindObjectOfType<Player>(); moveController = GetComponent<EnemyMoveController>(); transform.gameObject.tag = "Attackable"; health = GetComponent<Health>(); rnd = new System.Random(Guid.NewGuid().GetHashCode()); t = 3 + rnd.Next(0, 3000) / 1000f; distance = new Vector2(0, 0); stop = 1; }
public void Start() { //animator = GetComponent<Animator>(); moveController = GetComponent<EnemyMoveController>(); animationController = GetComponent<AnimationController>(); health = GetComponent<Health>(); player = FindObjectOfType<Player>(); //rigidbody2D.mass = 10; distance = new Vector2(0, 0); isAgro = false; rnd = new System.Random(Guid.NewGuid().GetHashCode()); t = 3 + rnd.Next(0, 3000) / 1000f; }
//private Animator animator; public void Start() { //animator = GetComponent<Animator>(); moveController = GetComponent<EnemyMoveController>(); health = GetComponent<Health>(); player = FindObjectOfType<Player>(); rigidbody = GetComponent<Rigidbody2D>(); distance = new Vector2(0, 0); speed = new Vector2(0, 0); isAgro = false; rnd = new System.Random(Guid.NewGuid().GetHashCode()); t = 3 + rnd.Next(0, 3000) / 1000f; //temp is the number for exponential speed when running away temp = 1.0000001; fireBlock_CD = 0; facing = new Vector2(0, 0); fireDist = fireBlockObject.GetComponent<Collider2D>().bounds.size.magnitude; }
//private Animator animator; public void Start() { //animator = GetComponent<Animator>(); moveController = GetComponent<EnemyMoveController>(); health = GetComponent<Health>(); player = FindObjectOfType<Player>(); //rigidbody2D.mass = 10; distance = new Vector2(0, 0); speed = new Vector2(0, 0); isAgro = false; rnd = new System.Random(Guid.NewGuid().GetHashCode()); t = 3 + rnd.Next(0, 3000) / 1000f; //temp is the number for exponential speed when running away temp = 1.0000001; facing = new Vector2(0, 0); ax = Instantiate(axeObject, transform.position, transform.rotation) as Axe; ax.setAxeMan(this); }