// Start is called before the first frame update private void Start() { normalMask = 17; invulnerableMask = 24; gm = GameManager.Get(); rig = GetComponent <Rigidbody>(); torque = GetComponent <TorqueLookRotation>(); outline = GetComponent <Outline>(); animator = GetComponentInChildren <Animator>(); radius.OnRadiusFindEnemy += StartEscape; Enemy.OnDeath += CheckEnemySpotted; OnFairyDeath += ForceStartEscape; GameManager.OnLevelEndWave += EndEscape; currentState = initialState; selectedWaypoint = initialWaypoint; SwitchRotationTarget(); currentColor = normalColor; outline.OutlineColor = currentColor; gm.currentFairies++; animator.speed = Random.Range(0.8f, 1.4f); if (OnFairySpawn != null) { OnFairySpawn(); } }
// Start is called before the first frame update private void Start() { npcDistance = 99; deathLayer = 24; rig = GetComponent <Rigidbody>(); torque = GetComponent <TorqueLookRotation>(); outline = GetComponent <Outline>(); enemyCollider = GetComponent <Collider>(); radius.OnRadiusFindAlly += StartPursuit; currentState = initialState; selectedWaypoint = initialWaypoint; SwitchRotationTarget(); finalSpeed = speed; originalDistanceToStop = distanceToStop; finalDistanceToStop = originalDistanceToStop; GameManager.Get().enemies.Add(gameObject); deathTimer = -1; deathTime = 1; animator.SetBool("IsWalking", true); animator.SetBool("IsEating", false); deathParticle.SetActive(false); }
// Start is called before the first frame update void Start() { isAlone = false; goalPos = FlockManager.goalPosition; rig = GetComponent <Rigidbody>(); torque = GetComponent <TorqueLookRotation>(); torque.enabled = true; }
// Start is called before the first frame update void Start() { rig = GetComponent <Rigidbody>(); gm = GameManager.Get(); torque = GetComponent <TorqueLookRotation>(); torque.target = target.transform; transform.position = startPosition; }