Ejemplo n.º 1
0
    void OnTriggerEnter(Collider _col)
    {
        Debug.Log("");
        BackgroundCell cell = _col.GetComponent <BackgroundCell>();

        if (!cell)
        {
            return;
        }
        _col.GetComponent <BackgroundCell>().PowerfulLighting(afterMat);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 移动数字格子
    /// </summary>
    public void MoveNumberCell()
    {
        int moveIndex = GlobalConfig.MoveNumberIndex;
        //当前的_gameObject为GuideObj
        int currentIndex = _gameObject.GetComponent <GuideCell>().GuideEntity.Index;

        //移动起点背景格子对象
        GameObject     originalBgObj  = GlobalConfig.BackgroundObjectCollection[moveIndex];
        BackgroundCell originalBgCell = originalBgObj.GetComponent <BackgroundCell>();
        //移动终点背景格子对象
        GameObject targetBgObj = GlobalConfig.BackgroundObjectCollection[currentIndex];
        //BackgroundCell targetBgCell = targetBgObj.GetComponent<BackgroundCell>();

        GameObject insTargetNumberObj = NumberConstructor.CreateNumber
                                            (originalBgCell.BackgroundCellEntity.NumberObject,
                                            originalBgObj,
                                            currentIndex,
                                            originalBgCell.BackgroundCellEntity.NumberObject.GetComponent <NumberCell>().NumberEntity.CurrentNumberValue);

        insTargetNumberObj.GetComponent <NumberCell>().OnMoving(targetBgObj.transform);
        originalBgCell.DisposeNumber();

        CommonToolkit.HideAllGuide();
    }