void Awake() { // Scale settings from non-retarded lvls to, well.. Yeah... m_speed *= 100; m_dashSpeed *= 100; m_laneSwitchSpeed *= 100; m_screamForce *= 100; m_gameOverseer = FindObjectOfType <GameOverseer>(); m_dashDistance = GameSettings.m_distanceBetweenSquares * m_dashDistance; m_leftLanePos = new Vector2(-GameSettings.m_distanceBetweenSquares, 0); m_rightLanePos = new Vector2(GameSettings.m_distanceBetweenSquares, 0); m_middleLanePos = Vector2.zero; m_screamBox = FindObjectOfType <ScreamBox>(); m_rigidbodies = GetComponentsInChildren <Rigidbody>(); m_colliders = GetComponentsInChildren <Collider>(); Lanes = new Dictionary <int, Vector2>(); Lanes.Add(0, m_leftLanePos); Lanes.Add(1, m_middleLanePos); Lanes.Add(2, m_rightLanePos); m_animator = GetComponent <Animator>(); m_rigidbody = GetComponent <Rigidbody>(); m_collider = GetComponent <Collider>(); DisableRagdoll(); }
private void Awake() { instance = this; if (!player) { player = GameObject.FindObjectOfType <PlayerStats>(); } }
private void Awake() { instance = this; if (allTimeMangedObjectDictionary == null) { InitializeTimeList(); } AddObjectToDontDestroyOnLoad(this.gameObject); }
void Start() { m_Overseer = GetComponent <GameOverseer>(); if (!m_Overseer) { Debug.Log("Score keeper cannot find game-overseer!"); enabled = false; return; } m_CurrentPos = transform.position; }
void Awake() { m_gameOverseer = FindObjectOfType <GameOverseer>(); m_rigidbody = GetComponent <Rigidbody>(); m_collider = GetComponent <Collider>(); m_colliders = GetComponentsInChildren <Collider>(); m_rigidbodies = GetComponentsInChildren <Rigidbody>(); DisableRagdoll(); }
//*****METHODS***** private void Awake() { //Do I exist? if (instance == null) { instance = this; } else { Destroy(this.gameObject); } DontDestroyOnLoad(this); UIElements = new List <GameObject>(); }
private void Awake() { instance = this; }
private void Awake() { instance = this; GameOverseer.FRAME_COUNT = 0; Application.targetFrameRate = TARGET_FRAME_RATE; }