/* Notice: RouletteEntry will initialize its variables from Roulette. * Make sure that the execution order of script Roulette is prior to * RouletteEntry. */ protected virtual void Start() { _content = GetComponentInChildren <RouletteEntryContent>(); if (_content == null) { Debug.LogWarning($"{gameObject.name}: couldn't get content"); } _roulette = transform.GetComponentInParent <Roulette.Roulette>(); _rouletteBank = _roulette.rouletteBank; _maxCurvePos = _roulette.CanvasMaxPosL * _roulette.rouletteCurvature; _unitPos = _roulette.UnitPosL; _lowerBoundPos = _roulette.LowerBoundPosL; _upperBoundPos = _roulette.UpperBoundPosL; _changeSideLowerBoundPos = _lowerBoundPos + _unitPos * 0.3f; _changeSideUpperBoundPos = _upperBoundPos - _unitPos * 0.3f; _cosValueAdjust = _roulette.positionAdjust; _initialLocalScale = transform.localScale; InitialPosition(); InitContent(); CheckAnchor(); AddClickEvent(); }