示例#1
0
    public TileMask CreateTileMask(TileMaskType maskType)
    {
        GameObject prefab      = GetTileMaskPrefab(maskType);
        GameObject tileMaskObj = Instantiate(prefab, Vector3.zero, Quaternion.identity);

        return(tileMaskObj.GetComponent <TileMask>());
    }
示例#2
0
文件: Board.cs 项目: lishi500/Link3
 public void ApplyTileMask(Tile tile, TileMaskType maskType)
 {
     TileMask tileMask = TileMaskUtil.Instance.CreateTileMask(maskType);
     tile.ApplyMask(tileMask);
     m_liveMasks.Add(tileMask);
     tileMask.notifyTileMaskDestroy += OnTileMaskDestory;
 }
示例#3
0
    private GameObject GetTileMaskPrefab(TileMaskType maskType)
    {
        switch (maskType)
        {
        case TileMaskType.Ice:
            return(CommonUtil.Instance.GetPrefabByName("IceMask"));

        default:
            return(CommonUtil.Instance.GetPrefabByName("IceMask"));
        }
    }