// Use this for initialization void Start() { spiralWorldManager = GetComponentInParent <SpiralWorldManager>(); WorldPartyActions.Forward += OnPartyForward; WorldPartyActions.Backward += OnPartyBackward; GetChildren(); StartCoroutine(party.BeHungry(5)); }
void Update() { if (active == null) { transform.Translate(SpiralWorldManager.TranslationToTarget(transform.position.x - offset, party.party.NumberLinePosition, movementSpeed * Time.deltaTime )); } }
// Use this for initialization void Start() { party = GetComponentInChildren <PartyComponent>(); world = GetComponent <SpiralWorldManager>(); }
// Update is called once per frame void Update() { Vector3 targetOffset = party.party.retreating ? position1 : position0; transform.Translate(SpiralWorldManager.TranslationToTarget(transform.position.x - targetOffset.x, party.party.NumberLinePosition, movementSpeed * Time.deltaTime)); }
void Awake() { instance = this; }