// Start is called before the first frame update void Start() { enemyRef = GetComponentInParent <EnemyRocketTurret>(); miRb = GetComponent <Rigidbody>(); transform.parent = null; camera = GameObject.FindGameObjectWithTag("MainCamera"); if (signo < 0) { miRb.AddForce(-1 * transform.up * /* new Vector3(0,2,1)**/ speed * 100); Vector3 spawnPoint = transform.position; //layerMask = 1 << LayerMask.NameToLayer("Suelo"); //layer del suelo RaycastHit hit; if (Physics.Raycast(spawnPoint, -transform.up, out hit, Mathf.Infinity, layerMask)) { distSueloInicial = spawnPoint.y - hit.point.y; circuloExterior.transform.position = new Vector3(hit.point.x, hit.point.y + 0.1f, hit.point.z); } } else { miRb.AddForce((signo * transform.up) * /* new Vector3(0,2,1)**/ speed * 100); } t = 0; }
// Start is called before the first frame update void Start() { refEnemigo = GetComponent <EnemyRocketTurret>(); refStateManager = GetComponent <StateMachine>(); playerTransform = FindObjectOfType <Mov>().transform; miAnim = GetComponent <Animator>(); Animaciones(); }
//// Start is called before the first frame update void Start() { initialRotation = modeloTorreta.transform.rotation; refStateManager = GetComponent <StateMachine>(); refEnemigo = GetComponent <EnemyRocketTurret>(); playerRef = FindObjectOfType <Mov>(); miAnim = GetComponent <Animator>(); Animaciones(); }