// Use this for initialization void Start() { healthVal = 100; healthChunks = 10; baseDmg = 1; baseHeal = 10; maxHealth = healthVal; pCtrl = FindObjectOfType <SideScrollController>(); inputCtrl = FindObjectOfType <FWSInput>(); }
// Use this for initialization void Start() { gm = FindObjectOfType <GM>(); recoil = FindObjectOfType <WeponRecoil>(); line = gameObject.GetComponent <LineRenderer>(); pInput = FindObjectOfType <FWSInput>(); joint = gameObject.GetComponent <ConfigurableJoint>(); pCtrl = FindObjectOfType <SideScrollController>(); staticHook = Instantiate(HookStaticModel, barrel.transform); ropeLengthLimit = joint.linearLimit; Retract(); }
//initializes objects and sets up animator void Start() { gm = FindObjectOfType <GM>(); pHealth = FindObjectOfType <HealthDepletion>(); playerRb = GetComponent <Rigidbody>(); playerCollider = GetComponent <CapsuleCollider>(); jointRbs = characterGameObj.GetComponentsInChildren <Rigidbody>(); jointCols = characterGameObj.GetComponentsInChildren <Collider>(); inputCtrl = FindObjectOfType <FWSInput>(); initPlayerPos = transform.position; isDead = false; DisableRagdoll(); }
// Use this for initialization void Start() { line = GetComponent <LineRenderer>(); grapple = FindObjectOfType <GrappleController>(); inputCtrl = FindObjectOfType <FWSInput>(); }
// Use this for initialization void Start() { phase = Phases.EXPLORE; frozen = false; //init GO's currLevel = SceneManager.GetActiveScene(); //for restart array interactables = GameObject.FindGameObjectsWithTag("Interactable"); hazards = GameObject.FindGameObjectsWithTag("Hazard"); normCollectibles = GameObject.FindGameObjectsWithTag("normieCollectible"); healCollectibles = GameObject.FindGameObjectsWithTag("healCollectible"); golCollectables = GameObject.FindGameObjectsWithTag("scoreCollectible"); GenerateObjectArrays(interactables, i_positions, i_rotations); GenerateObjectArrays(hazards, h_positions, h_rotations); GenerateObjectArrays(normCollectibles, nc_positions, nc_rotations); GenerateObjectArrays(healCollectibles, hc_positions, hc_rotations); GenerateObjectArrays(golCollectables, gc_positions, gc_rotations); resetLevel = false; gameOver = false; touchHazard = false; relic.SetActive(true); hd = FindObjectOfType <HealthDepletion>(); inputCtrl = FindObjectOfType <FWSInput>(); pCtrl = FindObjectOfType <SideScrollController>(); healthVal = hd.healthVal; startTime = 6000; mode = SoundManager.mode; //mode = Modes.ENDLESS; if (mode == Modes.CLASSIC || mode == Modes.ENDLESS || mode == Modes.SOULLESS) { gCtrl.shots = 0; } else if (mode == GM.Modes.LIMSWINGS) { gCtrl.shots = 15; } if (mode == Modes.ENDLESS) { clock.rectTransform.sizeDelta *= 3; clock.gameObject.transform.position = new Vector3(clock.transform.position.x, clock.transform.position.y + 3, clock.transform.position.z); } if (mode == Modes.SOULLESS) { timer = 0; } levelName = currLevel.name; if (levelName.Equals("Tutorial-pass2")) { level = Levels.TUTORIAL; } else if (levelName.Equals("Level_1-pass3")) { level = Levels.LEVEL1; } else if (levelName.Equals("Level_2-new")) { level = Levels.LEVEL2; } else if (levelName.Equals("Level_3_pass2")) { level = Levels.LEVEL3; } }