コード例 #1
0
    public override IEnumerator Use(CharacterBase sender, MainSystem sys)
    {
        var obj = Resources.Load("Prefabs/Effect/pipo-fog001");
        var fog = (GameObject)GameObject.Instantiate(obj);

        fog.transform.position = sender.Position;

        yield return(CAction.Fade(fog, 0, 1, 1.5f));

        var mask = (GameObject)GameObject.Instantiate(Resources.Load("Prefabs/Mask/white"));

        mask.transform.position = sender.Position;

        yield return(CAction.Fade(mask, 0, 1, 0.8f));

        // マップ切り替え
        yield return(sys.Sun(sender.Loc));

        yield return(new WaitForSeconds(1.0f));

        GameObject.Destroy(fog);
        yield return(CAction.Fade(mask, 1, 0, 0.6f));

        GameObject.Destroy(mask);
        yield return(new WaitForSeconds(0.2f));
    }
コード例 #2
0
        void m_menuGrouperActions_Click(object sender, EventArgs e)
        {
            if (Selection.Count > 0)
            {
                CResultAErreur result = CResultAErreur.True;
                using (CWaitCursor waiter = new CWaitCursor())
                {
                    List <CAction> lst = new List <CAction>();
                    foreach (object obj in Selection)
                    {
                        CAction action = obj as CAction;
                        if (action != null && action.GetType() != typeof(CActionDebut) && action.GetType() != typeof(CActionPointEntree))
                        {
                            lst.Add(action);
                        }
                    }

                    result = CActionProcessFils.CreateForSelection(lst.ToArray());
                    if (result)
                    {
                        Selection.Clear();
                        if (result.Data is CAction)
                        {
                            Selection.Add(result.Data as CAction);
                        }

                        Refresh();
                    }
                }
                if (!result)
                {
                    CFormAfficheErreur.Show(result.Erreur);
                }
            }
        }
コード例 #3
0
        public List <ReportModels> GetReport(ReportParamModels param)
        {
            List <ReportModels> ret = new List <ReportModels>();
            ReportModels        item;

            List <STAction> data = new List <STAction>();

            try
            {
                CAction clAction = new CAction(LocalData.UserId(), LocalData.CSDbUsers(), LocalData.LogPath());
                data = clAction.GetReport(param.BeginDate, param.EndDate);

                foreach (STAction row in data)
                {
                    item            = new ReportModels();
                    item.ActionName = row.actionname;
                    item.Comment    = row.value;
                    item.DT         = row.dt;
                    item.User       = row.username;
                    ret.Add(item);
                }
            }
            catch (Exception ex) { }
            return(ret);
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            B_ARoleAuth.CheckEx(ZLEnum.Auth.content, "ContentMange");
            if (!IsPostBack)
            {
                BindDrop();
                if (string.IsNullOrEmpty(CAction) || CAction.Equals("Add"))
                {
                    ddlC_ClassId.Visible = false;
                    txtClassId.Visible   = true;
                    txtClassId.Enabled   = false;
                    txtClassId.Text      = "无所属分类";
                    if (Cid > 0)
                    {
                        txtClassId.Text = examBll.GetSelect(Cid).C_ClassName;
                    }
                }
                else if (CAction.Equals("Modify"))
                {
                    this.ddlC_ClassId.Visible = true;
                    this.txtClassId.Visible   = false;
                    M_Exam_Class examMod = examBll.GetSelect(Cid);
                    if (examMod != null && examMod.C_id > 0)
                    {
                        txtClassName.Text         = examMod.C_ClassName;
                        ddlC_ClassId.Text         = examMod.C_Classid.ToString();
                        txtC_OrderBy.Text         = examMod.C_OrderBy.ToString();
                        C_ClassType.SelectedValue = examMod.C_ClassType.ToString();
                    }
                }

                Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li> <li><a href='Papers_System_Manage.aspx'>教育模块</a></li> <li><a href='QuestionManage.aspx'>考试管理</a></li><li><a href='Question_Class_Manage.aspx'>分类管理</a></li><li>编辑分类</li>");
            }
        }
コード例 #5
0
 void OnActionGUI(CAction action)
 {
     if (GUILayout.Button(action.Name))
     {
         action.Execute();
     }
 }
コード例 #6
0
 public Card(Suit suit, Rank rank, Func func)
 {
     this.CardSuit   = suit;
     this.CardRank   = rank;
     this.CardFunc   = func;
     this.CardAction = CAction.TakeEffect;
 }
コード例 #7
0
        public void TestAdd()
        {
            Action del1 = Del1;
            Action del2 = Del2;
            Action del3 = Del3;

            CActionList actionList = new CActionList();
            CAction     a1         = new CAction("a1", del1);
            CAction     a2         = new CAction("a2", del2);
            CAction     a3         = new CAction("a3", del3);

            actionList.Add(a3);
            actionList.Add(a1);
            actionList.Add(a2);

            CAction[] actions = { a1, a2, a3 };
            int       index   = 0;

            foreach (var action in actionList)
            {
                Assert.AreSame(actions[index++], action);
            }

            Assert.AreSame(a1, actionList.Find(a1.Id));
            Assert.AreSame(a2, actionList.Find(a2.Id));
            Assert.AreSame(a3, actionList.Find(a3.Id));
        }
コード例 #8
0
        private bool LoadActionData(XmlNode oActionNode)
        {
            string sErrorMsg = "Não existem efeitos cadastrados.";

            if (oActionNode == null)
            {
                MessageBox.Show(sErrorMsg, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }

            try
            {
                int iActionId = 1;

                foreach (XmlNode oNode in oActionNode)
                {
                    if (oNode.Name == "action")
                    {
                        CAction oAction = new CAction(iActionId, oNode);
                        m_htActions.Add(iActionId, oAction);
                        iActionId++;
                    }
                }
            }
            catch
            {
                MessageBox.Show("Erro ao carregar efeitos.", "Erro",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }

            return(true);
        }
コード例 #9
0
    protected override IEnumerator Run(MainSystem sys)
    {
        sys.Msg_ThrowItem(_item);
        var fitem = FieldItemFactory.CreateFromItem(_item, _player.Loc);

        fitem.OnDiscovered(_player.IsBlind());
        fitem.BringToFront();

        Vector3 src      = _player.Loc.ToPosition();
        Vector3 dst      = _targetLoc.ToPosition();
        float   speed    = _player.Dir.IsDiagonal() ? Config.ItemThrowDiagonalSpeed : Config.ItemThrowSpeed;
        float   duration = Vector3.Distance(src, dst) / speed;

        yield return(CAction.Lerp(duration, src, dst, pos => {
            fitem.Position = pos;
        }));

        fitem.ResetZOrder();

        if (_target == null)   // 床に落とす
        {
            sys.FallItemToFloor(_fallLoc, fitem);
        }
        else   // ターゲットにヒット
               // TODO:ヒット判定
        {
            fitem.Destroy();
            yield return(fitem.Item.Hit(_player, _target, sys));
        }
    }
コード例 #10
0
    public static IEnumerator Fade(this MaskableGraphic graphic, float fm, float to, float duration)
    {
        var color = graphic.color;

        yield return(CAction.Lerp(duration, fm, to, alpha => {
            color.a = alpha;
            graphic.color = color;
        }));
    }
コード例 #11
0
        internal CAwaitable Sync(bool persistable = true)
        {
            var awaitable = new CAwaitable();

            var action = new CAction(awaitable.SignalCompletion, persistable);

            _callbacks.Add(action);

            return(awaitable);
        }
コード例 #12
0
ファイル: SkillFly.cs プロジェクト: m-ishikawa/Rlike
    private IEnumerator Run(Player player, Loc to, MainSystem sys)
    {
        yield return(CAction.MovePlayer(player, to));

        // とびついた先が水ならワープ
        if (sys.IsWater(player.Loc))
        {
            yield return(new SkillWarp().Use(player, sys));
        }
    }
コード例 #13
0
    public override IEnumerator Use(CharacterBase sender, MainSystem sys)
    {
        yield return(EffectAnim.Aura(sender.Position));

        sys.HideMinimap();

        // 黒マスクで画面全体を暗くする
        var mask = (GameObject)GameObject.Instantiate(Resources.Load("Prefabs/Mask/black"), sender.Position, Quaternion.identity);

        mask.transform.localScale = new Vector3(10f, 15f, 1);

        float cameraZoomDelta = 0.65f;

        yield return(Anim.Par(sys,
                              () => sys.CameraZoomOut(cameraZoomDelta),
                              () => MaskFade(mask, 0, 0.5f)));

        yield return(Anim.Par(sys,
                              () => CAction.Quake(GameObject.Find(LayerName.Map), 1.4f),
                              () => EffectAnim.Skill(sender.Position)));

        yield return(new WaitForSeconds(0.3f));

        yield return(Anim.Par(sys,
                              () => sys.CameraZoomIn(cameraZoomDelta),
                              () => MaskFade(mask, 0.5f, 0)));

        GameObject.Destroy(mask);

        sys.ShowMinimap();

        var enemies     = sys.GetEnemies();
        var damageAnims = new List <DamageWait>();

        for (int i = 0; i < enemies.Length; i++)
        {
            damageAnims.Add(new DamageWait(enemies[i], 99, sys));
        }

        while (true)
        {
            bool finished = true;
            foreach (var d in damageAnims)
            {
                finished = finished && d.AnimationFinished;
            }

            if (finished)
            {
                break;
            }
            yield return(null);
        }
    }
コード例 #14
0
 /// <summary>
 /// 增加Action
 /// </summary>
 /// <param name="id"></param>
 /// <param name="action"></param>
 public void AddAction(CAction action)
 {
     int id = action.ID;
     if(this.m_mapAction.ContainsKey(id))
     {
         Debug.LogWarning("Action id is already exist. " + id);
         this.m_mapAction[id] = action;
         return;
     }
     this.m_mapAction.Add(id, action);
 }
コード例 #15
0
 public void OnActionUnregistered(CRegistry registry, CAction action)
 {
     try
     {
         m_args1[0] = jval(action.Id);
         CallStaticVoidMethod(m_methodUnregisterAction, m_args1);
     }
     catch (Exception e)
     {
         Debug.LogError("Exception while calling 'LunarConsole.OnActionUnregistered': " + e.Message);
     }
 }
コード例 #16
0
 public void StartAction(CAction action)
 {
     if (currentAction == action)
     {
         return;
     }
     if (currentAction != null)
     {
         currentAction.Cancel();
     }
     currentAction = action;
 }
コード例 #17
0
        /* [HttpPost]
         * public ActionResult LogOn(LogOnModel model, string returnUrl)
         * {
         *   string msg = null;
         *
         *   if (ModelState.IsValid)
         *   {
         *   //    if (!MembershipService.ValidateUser(model.UserName, model.Password, out msg))
         *   //    {
         *   //        ModelState.AddModelError("", msg);
         *   //        return View(model);
         *   //    }
         *
         *       if (!MembershipService.ValidatePass(model.Login, model.Password, out msg))
         *       {
         *           Thread.Sleep(2000);
         *           ModelState.AddModelError("", msg);
         *           return View(model);
         *       }
         *
         *       UserModels UM = UserModelsRepository.Instance.GetUserByLogin(model.Login);
         *       if (UM.Condition == "Blocked") msg = "The user has been blocked";
         *       if (UM.Condition == "Deleted") msg = "The user has been removed";
         *       if (UM.Condition == "Active")
         *       {
         *           CUser clUser = new CUser(null, LocalData.CSDbUsers(), LocalData.LogPath());
         *           STUser stUser;
         *           clUser.GetRecordByUserLogin(model.Login, out stUser, out msg);
         *
         *           FormsService.SignIn(model.Login, model.RememberMe);
         *
         *           if (stUser.passvaliddate <= DateTime.Now) return RedirectToAction("ChangePassword");
         *
         *           CAction clAction = new CAction(stUser.userid, LocalData.CSDbUsers(), LocalData.LogPath());
         *           clAction.AddAction(ActionType.LogON, null, out msg);
         *           if (Url.IsLocalUrl(returnUrl))
         *           {
         *
         *               return Redirect(returnUrl);
         *           }
         *           else
         *           {
         *
         *               return RedirectToAction("Index", "Home");
         *           }
         *       }
         *       else
         *           ModelState.AddModelError("", msg);
         *
         *   }
         *
         *   // If we got this far, something failed, redisplay form
         *   return View(model);
         * }*/

        // **************************************
        // URL: /Account/LogOff
        // **************************************

        public ActionResult LogOff()
        {
            string  msg;
            CAction clAction = new CAction(LocalData.UserId(), LocalData.CSDbUsers(), LocalData.LogPath());

            clAction.AddAction(ActionType.LogOFF, null, out msg);

            FormsService.SignOut();
            Session.Abandon();

            return(RedirectToAction("Index", "Home"));
        }
コード例 #18
0
    /// <summary>
    /// 增加Action
    /// </summary>
    /// <param name="id"></param>
    /// <param name="action"></param>
    public void AddAction(CAction action)
    {
        int id = action.ID;

        if (this.m_mapAction.ContainsKey(id))
        {
            Debug.LogWarning("Action id is already exist. " + id);
            this.m_mapAction[id] = action;
            return;
        }
        this.m_mapAction.Add(id, action);
    }
コード例 #19
0
 public void OnActionRegistered(CRegistry registry, CAction action)
 {
     try
     {
         m_args2[0] = jval(action.Id);
         m_args2[1] = jval(action.Name);
         CallStaticVoidMethod(m_methodRegisterAction, m_args2);
         AndroidJNI.DeleteLocalRef(m_args2[1].l);
     }
     catch (Exception e)
     {
         Debug.LogError("Exception while calling 'LunarConsole.OnActionRegistered': " + e.Message);
     }
 }
コード例 #20
0
    protected override IEnumerator Run(MainSystem sys)
    {
        // ターゲットの方を向く
        Actor.ChangeDir(Actor.Loc.Toward(_targetLoc));

        // 魔法弾を飛ばす
        var obj = Res.Create("Prefabs/Effect/magic-ball");

        yield return(CAction.Move(obj, Actor.Loc, _targetLoc));

        GameObject.Destroy(obj);
        // いかずち
        yield return(new SkillThunder().Hit(Actor, _target, sys));
    }
コード例 #21
0
ファイル: Enemy.cs プロジェクト: m-ishikawa/Rlike
    public override IEnumerator DamageAnim(int delta) {
        int fm = Hp;
        int to = Utils.Clamp(Hp - delta, 0, MaxHp);

        float greenScale = to * HP_GAUGE_MAX_SCALE / MaxHp;
        _barGreen.transform.localScale = new Vector3(greenScale, 1, 1);
        yield return new WaitForSeconds(0.43f);

        float duration = 0.3f;
        yield return CAction.Run(duration, elapsed => {
           float p = UTween.Ease(EaseType.OutQuad, fm, to, elapsed / duration);
            float scale = p * HP_GAUGE_MAX_SCALE / MaxHp;
            _barYellow.transform.localScale = new Vector3(scale, 1, 1);
        });
    }
コード例 #22
0
 //action roll back
 public ActionError RollBack(ActionInput input)
 {
     for (int i = 0; i < this.m_vecActions.Length; i++)
     {
         CAction action = ActionManager.sInstance.GetAction(this.m_vecActions[i]);
         if (action != null)
         {
             ActionError error = action.RollBack(input);
             if (error != null && error.code != ACTION_ERROR_CODE.NONE)
             {
                 return(error);
             }
         }
     }
     return(ActionError.NoError);
 }
コード例 #23
0
 private void send_query_btn_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(query_tb.Text))
     {
         MessageBox.Show("Query was empty.");
         return;
     }
     if (query_tb.Text.Contains("select") ||
         query_tb.Text.Contains("SELECT"))
     {
         try
         {
             SqlDataAdapter ad = new SqlDataAdapter(query_tb.Text, Program.db.cnn);
             DataSet        ds = new DataSet();
             ad.Fill(ds);
             result_dg.DataSource = ds.Tables[0];
             result_dg.Update();
             CAction.AutoSizeColumns(result_dg);
         }
         catch (SqlException s)
         {
             result_dg.Columns.Add("Query", "Query result");
             result_dg.Rows.Add(s.Message);
             CAction.AutoSizeColumns(result_dg);
         }
     }
     else
     {
         try
         {
             SqlCommand cmd = new SqlCommand(query_tb.Text);
             cmd.Connection = Program.db.cnn;
             int buffer = cmd.ExecuteNonQuery();
             result_dg.Columns.Add("Query", "Query result");
             result_dg.Rows.Add("Inherit rows: " + buffer);
             CAction.AutoSizeColumns(result_dg);
         }
         catch (SqlException s)
         {
             result_dg.Columns.Add("Query", "Query result");
             result_dg.Rows.Add(s.Message);
             CAction.AutoSizeColumns(result_dg);
         }
     }
 }
コード例 #24
0
        public void TestLookupAction()
        {
            CAction a = RegisterAction("a1", Del1);
            CAction b = RegisterAction("b1", Del1);
            CAction c = RegisterAction("c1", Del1);
            CAction d = RegisterAction("d1", Del1);

            CAction[] actions = { a, b, c, d };
            for (int i = 0; i < actions.Length - 1; ++i)
            {
                for (int j = i + 1; j < actions.Length; ++j)
                {
                    Assert.AreNotEqual(actions[i].Id, actions[j].Id);
                }
            }

            Assert.AreSame(a, FindAction(a.Id));
            Assert.AreSame(b, FindAction(b.Id));
            Assert.AreSame(c, FindAction(c.Id));
            Assert.AreSame(d, FindAction(d.Id));

            UnregisterAction(a.Id);
            Assert.IsNull(FindAction(a.Id));
            Assert.AreSame(b, FindAction(b.Id));
            Assert.AreSame(c, FindAction(c.Id));
            Assert.AreSame(d, FindAction(d.Id));

            UnregisterAction(b.Id);
            Assert.IsNull(FindAction(a.Id));
            Assert.IsNull(FindAction(b.Id));
            Assert.AreSame(c, FindAction(c.Id));
            Assert.AreSame(d, FindAction(d.Id));

            UnregisterAction(c.Id);
            Assert.IsNull(FindAction(a.Id));
            Assert.IsNull(FindAction(b.Id));
            Assert.IsNull(FindAction(c.Id));
            Assert.AreSame(d, FindAction(d.Id));

            UnregisterAction(d.Id);
            Assert.IsNull(FindAction(a.Id));
            Assert.IsNull(FindAction(b.Id));
            Assert.IsNull(FindAction(c.Id));
            Assert.IsNull(FindAction(d.Id));
        }
コード例 #25
0
 //保存
 protected void EBtnSubmit_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(CAction) || CAction.Equals("Add"))
     {
         M_Exam_Class mqc = examBll.GetSelectByCName(this.txtClassName.Text.Trim());
         if (mqc != null && mqc.C_id > 0)
         {
             function.WriteErrMsg("已存在该分类,请重新添加!");
         }
         mqc.C_ClassName = this.txtClassName.Text.Trim();
         mqc.C_Classid   = Cid;
         mqc.C_OrderBy   = txtC_OrderBy.Text == "" ? 0 : DataConverter.CLng(txtC_OrderBy.Text.Trim());
         mqc.C_ClassType = DataConverter.CLng(this.C_ClassType.SelectedValue);
         int resu = examBll.GetInsert(mqc);
         if (resu > 0)
         {
             function.WriteSuccessMsg("添加成功!", "/Admin/Exam/Question_Class_Manage.aspx");
         }
         else
         {
             function.WriteErrMsg("添加失败!");
         }
     }
     else if (CAction.Equals("Modify"))
     {
         M_Exam_Class mqc   = examBll.GetSelectByCName(this.txtClassName.Text.Trim());
         M_Exam_Class model = examBll.GetSelect(Cid);
         if ((mqc != null && mqc.C_id > 0) && !model.C_ClassName.Equals(mqc.C_ClassName))
         {
             function.WriteErrMsg("已存在该分类,请重新修改!");
         }
         model.C_ClassName = txtClassName.Text.Trim();
         model.C_Classid   = DataConverter.CLng(ddlC_ClassId.SelectedValue);
         model.C_OrderBy   = txtC_OrderBy.Text == "" ? 0 : DataConverter.CLng(txtC_OrderBy.Text.Trim());
         bool resu = examBll.GetUpdate(model);  //更新
         if (resu)
         {
             function.WriteSuccessMsg("更新成功!", "/Admin/Exam/Question_Class_Manage.aspx");
         }
         else
         {
             function.WriteErrMsg("更新失败!");
         }
     }
 }
コード例 #26
0
ファイル: UserModels.cs プロジェクト: Pavlo7/AEVIProject
        public void DeleteUser(string id)
        {
            string msg;

            try
            {
                CUser clUser = new CUser(LocalData.UserId(), LocalData.CSDbUsers(), LocalData.LogPath());

                int retvalue = clUser.Delete(id, out msg);

                if (retvalue == 0)
                {
                    CAction clAction = new CAction(LocalData.UserId(), LocalData.CSDbUsers(), LocalData.LogPath());
                    clAction.AddAction(ActionType.DeleteUser, string.Format("Delete user {0}", id), out msg);
                }
            }
            catch (Exception ex) { msg = ex.Message; }
        }
コード例 #27
0
        public void TestRemove()
        {
            Action del1 = Del1;
            Action del2 = Del2;
            Action del3 = Del3;

            CActionList actionList = new CActionList();
            CAction     a1         = new CAction("a1", del1);
            CAction     a2         = new CAction("a2", del2);
            CAction     a3         = new CAction("a3", del3);

            actionList.Add(a3);
            actionList.Add(a1);
            actionList.Add(a2);

            Assert.AreSame(a1, actionList.Find(a1.Id));
            Assert.AreSame(a2, actionList.Find(a2.Id));
            Assert.AreSame(a3, actionList.Find(a3.Id));

            actionList.Remove(a1.Id);

            Assert.IsNull(actionList.Find(a1.Id));
            Assert.AreSame(a2, actionList.Find(a2.Id));
            Assert.AreSame(a3, actionList.Find(a3.Id));

            actionList.Remove(a2.Id);

            Assert.IsNull(actionList.Find(a1.Id));
            Assert.IsNull(actionList.Find(a2.Id));
            Assert.AreSame(a3, actionList.Find(a3.Id));

            actionList.Remove(a3.Id);

            Assert.IsNull(actionList.Find(a1.Id));
            Assert.IsNull(actionList.Find(a2.Id));
            Assert.IsNull(actionList.Find(a3.Id));

            actionList.Remove(a1.Id);
            actionList.Remove(a2.Id);
            actionList.Remove(a3.Id);
            Assert.IsNull(actionList.Find(a1.Id));
            Assert.IsNull(actionList.Find(a2.Id));
            Assert.IsNull(actionList.Find(a3.Id));
        }
コード例 #28
0
ファイル: UserModels.cs プロジェクト: Pavlo7/AEVIProject
        public int UpdateUser(UserModels model, out string msg)
        {
            int ret = 0;

            msg = null;
            STUser      data         = new STUser();
            CCondition  clCondition  = new CCondition();
            CPermission clPermission = new CPermission();

            try
            {
                CUser clUser = new CUser(LocalData.UserId(), LocalData.CSDbUsers(), LocalData.LogPath());

                data.comments     = model.Comments;
                data.condition    = clCondition.GetId(model.Condition);
                data.email        = model.Email;
                data.login        = model.Login;
                data.modifieddate = DateTime.Now;
                data.passwordsalt = CreateSalt();
                //      data.password = CreatePasswordHash(model.Password, data.passwordsalt);
                data.permission = clPermission.GetId(model.Permission);
                data.username   = model.UserName;

                string[] arr = new[] { "'", "\"", "--" };
                if (CheckerField.CheckField(arr, data.comments, data.email, data.login, data.username))
                {
                    msg = "One or more fields contain invalid characters.";
                    return(2);
                }

                ret = clUser.Update(model.UserId, data, out msg);

                if (ret == 0)
                {
                    CAction clAction = new CAction(LocalData.UserId(), LocalData.CSDbUsers(), LocalData.LogPath());
                    clAction.AddAction(ActionType.EditUser, string.Format("Edit user {0}, {1}", data.username,
                                                                          data.login), out msg);
                }
            }
            catch (Exception ex) { msg = ex.Message; ret = -1; }

            return(ret);
        }
コード例 #29
0
    void CheckAction()
    {
        switch (m_PlayerState)
        {
        case PLAYERSTATE.STAND:
        {
        }
        break;

        case PLAYERSTATE.MOVE:
        {
            if (!m_playerAction.GetType().Equals(typeof(AMove)))
            {
                m_playerAction = new AMove();
                m_playerAction.SetTarget(this.gameObject);
            }
            ((AMove)m_playerAction).SetRot(m_RotAngle);
            ((AMove)m_playerAction).SetMoveSpeed(m_MoveSpeed);
        }
        break;

        case PLAYERSTATE.ROLL:
        {
        }
        break;

        case PLAYERSTATE.ATTACK:
        {
        }
        break;

        case PLAYERSTATE.HIT:
        {
        }
        break;

        case PLAYERSTATE.DEAD:
        {
        }
        break;
        }
    }
コード例 #30
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            string         sql     = "SELECT name, create_date FROM sys.objects WHERE type in(N'U')";
            SqlDataAdapter adapter = new SqlDataAdapter(sql, Program.db.cnn);

            tables_ds = new DataSet();

            adapter.Fill(tables_ds);

            tables_dg.DataSource = tables_ds.Tables[0];
            tables_dg.Update();
            foreach (DataGridViewRow r in tables_dg.Rows)
            {
                if (r.Cells[0].Value.ToString() == "accounts")
                {
                    tables_dg.Rows.Remove(r);
                }
            }
            CAction.AutoSizeColumns(tables_dg);
        }
コード例 #31
0
ファイル: SkillBlow.cs プロジェクト: m-ishikawa/Rlike
    public override IEnumerator Hit(CharacterBase sender, CharacterBase target, MainSystem sys)
    {
        Assert.IsTrue(target is Enemy);

        // target をsender.Dir 方向にふきとばす
        CharacterBase hitTarget;
        Loc           to = sys.FindHitTarget(target.Loc, sender.Dir, out hitTarget);

        // hitTarget != null なら他の敵と衝突した。TODO:5 ダメージ与える
        yield return(CAction.MoveEnemy((Enemy)target, to));

        // ふきとんだ後の着地点
        Loc loc = to.Backward(sender.Dir);

        target.UpdateLoc(loc);
        // 着地点が水ならワープ
        if (sys.IsWater(loc))
        {
            yield return(new SkillWarp().Use(target, sys));
        }
    }