コード例 #1
0
ファイル: TNTGameMain.cs プロジェクト: unknown32767/YAPuyo
    private IEnumerator StartGameCoroutine()
    {
        intractable = false;

        currentDropdown = null;

        Time.timeScale = 10;

        if (cellBlocks.Count > 0)
        {
            cellBlocks.ForEach(cell => Destroy(cell.gameObject));
        }

        cellBlocks.Clear();

        var index = Random.Range(0, offsets.Count);

        blockController.CreateBlock(cellPool.Take(4), offsets[index]);

        waitingTimePerStep.Clear();
        waitingTimePerMove.Clear();

        matchMoveCount = 0;
        matchCount     = 0;
        maxMatchCount  = 0;
        maxCombo       = 0;

        intractable = true;

        yield return(null);
    }
コード例 #2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            var t  = new Satrabel.OpenBlocks.Block.Block();
            var tc = new BlockController();

            if (ItemId > 0)
            {
                t = tc.GetBlock(ItemId, PortalId);
                t.LastModifiedByUserId = UserId;
                t.LastModifiedOnDate   = DateTime.Now;
                //t.AssignedUserId = Convert.ToInt32(ddlAssignedUser.SelectedValue);
            }
            else
            {
                t = new Satrabel.OpenBlocks.Block.Block()
                {
                    //AssignedUserId = Convert.ToInt32(ddlAssignedUser.SelectedValue),
                    CreatedByUserId = UserId,
                    CreatedOnDate   = DateTime.Now,
                };
            }
            t.Name        = txtName.Text.Trim();
            t.CultureCode = ddlCultureCode.SelectedIndex > 0 ? ddlCultureCode.SelectedValue : "";
            t.BlockType   = int.Parse(rblType.SelectedValue);
            if (t.BlockType == 1)
            {
                t.Content = txtContentTxt.Text.Trim();
            }
            else if (t.BlockType == 2)
            {
                t.Content = ((TextEditor)txtContentHtml).Text;
            }
            t.LastModifiedOnDate   = DateTime.Now;
            t.LastModifiedByUserId = UserId;
            t.PortalId             = PortalId;

            if (t.BlockId > 0)
            {
                tc.UpdateBlock(t);
            }
            else
            {
                tc.CreateBlock(t);
            }
            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL());
        }