// Use this for initialization void Start() { gamePadState = ControllerManager.Instance.GamePadStates[kart.numeroJoueur - 1]; lastGamePadState = ControllerManager.Instance.LastGamePadStates[kart.numeroJoueur - 1]; m_input = new KartInput(gamePadState, lastGamePadState); coeffInitSpeed = speedCoeff; foreach (Transform child in transform) { if (child.name == "kartSmoke") { smoke.Add(child.gameObject); continue; } if (child.name != "steering") { continue; } wheels["steering"] = child; foreach (Transform w in child.transform) { wheels[w.name] = w; } } kart_script = GetComponent <KartScript> (); }
void Start() { rb = GetComponent <Rigidbody>(); ki = GetComponent <KartInput>(); groundCheck = GetComponentInChildren <GroundCheck>(); // set center of mass rb.centerOfMass = centerOfMass.localPosition; }
// Use this for initialization void Start() { gamePadState = ControllerManager.Instance.GamePadStates[PlayerIndex]; lastGamePadState = ControllerManager.Instance.LastGamePadStates[PlayerIndex]; m_input = new KartInput(gamePadState, lastGamePadState); KartState = new KartState(); m_animator = GetComponent <Animator>(); KartRigidbody.transform = transform; KartRigidbody.position = transform.position; KartTransformer.KartRigidbody = KartRigidbody; KartRigidbody.KartTransformer = KartTransformer; KartRigidbody.Initialize(); WeaponPrefab = new List <GameObject>(); TraceL = GetComponentsInChildren <SlidingTrace>()[0]; TraceR = GetComponentsInChildren <SlidingTrace>()[1]; }
void Start() { inventory = gameObject.GetComponent<InventoryScript>(); input = gameObject.GetComponent<KartInput>(); }
void Start() { currentWeapon = WEAPON.noWeapon; // Set to not have weapon at the beginning weaponAmount = Enum.GetNames(typeof(WEAPON)).Length; // Initialize the amount of weapons input = gameObject.GetComponent <KartInput>(); }
void Start() { currentWeapon = WEAPON.noWeapon; // Set to not have weapon at the beginning weaponAmount = Enum.GetNames(typeof(WEAPON)).Length; // Initialize the amount of weapons input = gameObject.GetComponent<KartInput>(); }