コード例 #1
0
    private GameObject CreateFance(WallInfo wallInfo)
    {
        if (wallInfo.IsNull())
        {
            return(null);
        }
        GameObject item = list.NewItem();

        item.name = wallInfo.posY + "_" + wallInfo.posX + "_" + wallInfo.posN;

        FightFanceItem itemCtr = item.AddComponent <FightFanceItem>();

        UpdateFance(itemCtr, wallInfo);

        PosMgr.SetFightWallPos(item.transform, wallInfo.posX, wallInfo.posY, wallInfo.posN);
        itemCtr.zrotate = GetZRotate(wallInfo.posN);
        return(item);
    }
コード例 #2
0
 private void InitLayers()
 {
     ballFgLayer.ShowList();
     barrierLayer.ShowList();
     for (int i = (int)PosMgr.Y_HALF_COUNT; i >= -PosMgr.Y_HALF_COUNT; i--)
     {
         for (int j = -(int)PosMgr.X_HALF_COUNT; j <= PosMgr.X_HALF_COUNT; j++)
         {
             if (j <= BattleModel.Instance.crtBattle.end_x && j >= BattleModel.Instance.crtBattle.start_x &&
                 i < BattleModel.Instance.crtBattle.start_y && i >= BattleModel.Instance.crtBattle.end_y)
             {
                 GameObject item = barrierLayer.CreateBaseItem(j, i);
                 item.name = (j - BattleModel.Instance.crtBattle.start_x) + "_" + (-i + BattleModel.Instance.crtBattle.start_y);
                 PosMgr.SetFightWallPos(item.transform, j - BattleModel.Instance.crtBattle.start_x, -i + BattleModel.Instance.crtBattle.start_y, 1);
             }
             else
             {
                 ballFgLayer.CreateBaseItem(j - BattleModel.Instance.crtBattle.start_x, -i + BattleModel.Instance.crtBattle.start_y);
             }
         }
     }
     InitGift();
 }