private void Start() { playerController = GetComponent <CharacterController>(); playerController.enabled = false; tDetection = GetComponent <TriggerDetection>(); keys = GetComponent <playerKeyHolder>(); playerRb = GetComponent <Rigidbody>(); controller = GetComponent <CharacterController>(); isMoving = false; isSafe = false; isDead = false; isStarting = true; Physics.gravity *= 2; StartCoroutine(WaitForMusic()); if (ES3.KeyExists("posicao") && ES3.KeyExists("energia")) { lastCheckpointPos = ES3.Load <Vector3>("posicao"); lastCheckpointRot = ES3.Load <Quaternion>("rotacao"); Manager.current.turnOff = ES3.Load <bool>("energia"); transform.position = lastCheckpointPos; transform.rotation = lastCheckpointRot; } else { lastCheckpointPos = transform.position; lastCheckpointRot = transform.rotation; } playerController.enabled = true; }
void Start() { viewMesh = new Mesh(); viewMesh.name = "View Mesh"; viewMeshFilter.mesh = viewMesh; triggerDetection = GetComponent <TriggerDetection>(); StartCoroutine("FindTargetsWithDelay", .2f); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new TriggerDetection { m_attractedComponentDataFromEntity = GetComponentDataFromEntity <AttractedBody>() }; return(job.Schedule(m_stepPhysicsWorld.Simulation, ref m_buildPhysicsWorld.PhysicsWorld, inputDeps)); }
void Start() { trailLengthHandler = GetComponentInParent <TrailLengthHandler>(); triggerDetection = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <TriggerDetection> (); }
void Start() { trailLengthHandler = GetComponentInParent<TrailLengthHandler>(); triggerDetection = GameObject.FindGameObjectWithTag (Tags.player).GetComponent<TriggerDetection> (); }