private void Start() { shakeDurationCurrent = shakeDuration; mycam = GetComponent <Camera>(); pingpongZoom = new PingPongLerp(); pingpongZoom.Configure(Zoom, false); }
//////////////////////////////////////////////////////////////////// //// BUILDER CONFIGURATIONS //////////////////////////////////////////////////////////////////// public UI_ItemBase Initialize(int _index, Action <int> _OnSelect) { index = _index; rect = GetComponent <RectTransform>(); pingpongScale = new PingPongLerp(); currentscale = rect.localScale; rect.localScale = new Vector3(currentscale.x, currentscale.y, 1); amplitudDeEscala = currentscale * cantidadDeEscala; pingpongScale.Configure(AnimLerpScale, false, true); OnUI_Selected = _OnSelect; return(this); }
private void Awake() { pingPong = new PingPongLerp(); if (own) { toscale = this.transform; } startscale = toscale.transform.localScale; finalscale = new Vector3( startscale.x + cant_to_scale.x, startscale.y + cant_to_scale.y, startscale.z + cant_to_scale.z); pingPong.Configure(ToAnimate, true); }