private void Awake() { planetMovable = GetComponent <PlanetMovable>(); planetMovable.init(); planetMovable.setTurble(true); rigid = GetComponent <Rigidbody>(); animator = GetComponentInChildren <Animator>(); }
// Use this for initialization void Awake() { surfaceFollowHelper = GetComponent <SurfaceFollowHelper>(); planetMovable = GetComponent <PlanetMovable>(); rigid = GetComponent <Rigidbody>(); animator = GetComponentInChildren <Animator>(); onAirHash = Animator.StringToHash("Base Layer.onAir"); }
private void OnTriggerEnter(Collider other) { PlanetMovable pm = other.GetComponent <PlanetMovable>(); if (pm == null) { return; } pm.resetGroundType(groundType); }
public void doIt(GameObject gameObject) { Transform target = gameObject.transform; for (int i = 0; i < count; i++) { Vector3 newPos = transform.position - distance * (i + 1) * transform.forward; PlanetMovable pm = GameObject.Instantiate <PlanetMovable>(source, newPos, transform.rotation); pm.gameObject.name = "movable" + i; FactoryPlugin fg = factoryPloginSocket as FactoryPlugin; if (fg != null) { fg.doIt(pm.gameObject); } FollowerController fc = pm.gameObject.GetComponent <FollowerController>(); fc.followTarget = target; target = pm.transform; } }
private void Awake() { planetMovable = GetComponent <PlanetMovable>(); planetMovable.init(); }
private void Awake() { planetMovable = GetComponent <PlanetMovable>(); previousUp = transform.up; }