private void Awake() { if (agent == null) { agent = FindObjectsOfType <MotorcycleAgent>()[0]; } physics = agent.GetComponent <ArcadePhysics>(); }
private void Awake() { laraAnim = transform.parent.GetComponentsInChildren <PoseBlend>(); particles = GetComponentInChildren <ParticleSystem>(); physics = GetComponentInParent <ArcadePhysics>(); if (setMaterials) { int i = System.Array.IndexOf(FindObjectsOfType <FX>(), this); var tmp = shirt.sharedMaterials; tmp[6] = shirtMaterials[i]; shirt.sharedMaterials = tmp; foreach (var r in paint) { r.material = paintMaterials[i]; } } }
public override void Initialize() { resetter = new Resetter(transform); physics = GetComponent <ArcadePhysics>(); physics.Initialize(); }