public void InitData(MySortingLayerInfo _sortingLayerInfo, float _ratioScale)
 {
     mySortingGroup.sortingLayerName = _sortingLayerInfo.layerName.ToString();
     mySortingGroup.sortingOrder     = _sortingLayerInfo.layerOrderId;
     ratioScale           = _ratioScale;
     transform.localScale = Vector3.one * ratioScale;
 }
Beispiel #2
0
    public void SetData(IChipInfo _chipInfo, MySortingLayerInfo _sortingLayerInfo, float _ratioScale)
    {
        mySortingGroup.sortingLayerName = _sortingLayerInfo.layerName.ToString();
        mySortingGroup.sortingOrder     = _sortingLayerInfo.layerOrderId;
        ratioScale           = _ratioScale;
        transform.localScale = Vector3.one * ratioScale;

        chipType        = _chipInfo.chipType;
        mySprite.sprite = _chipInfo.mySprite;
    }
Beispiel #3
0
 public void SetSortingLayerInfoAgain(MySortingLayerInfo _sortingLayerInfo)
 {
     myCanvas.sortingLayerName = _sortingLayerInfo.layerName.ToString();
     myCanvas.sortingOrder     = _sortingLayerInfo.layerOrderId;
 }
Beispiel #4
0
    public static IEnumerator DoActionShowEffectGoldFly(GameObject _prefab, MySimplePoolManager _poolManager, MySortingLayerInfo _sortingLayerInfo
                                                        , Vector2 _startPoint, Vector2 _endPoint, int _numGold, float _ratioScale, float _timeMovePerGold, System.Action _onPerGoldObjFinished = null)
    {
        Vector2 _newStartPoint = Vector2.zero;

        for (int i = 0; i < _numGold; i++)
        {
            _newStartPoint.x = Random.Range(_startPoint.x - 0.2f, _startPoint.x + 0.2f);
            _newStartPoint.y = Random.Range(_startPoint.y - 0.2f, _startPoint.y + 0.2f);

            GoldObjectController _gold = LeanPool.Spawn(_prefab, _newStartPoint, Quaternion.identity).GetComponent <GoldObjectController>();
            _poolManager.AddObject(_gold);
            _gold.InitData(_sortingLayerInfo, _ratioScale);
            _gold.MoveAndSelfDestruction(_endPoint, _timeMovePerGold, LeanTweenType.easeInBack, _onPerGoldObjFinished);
            if (_numGold > 1)
            {
                yield return(Yielders.Get(0.06f));
            }
        }
    }