Ejemplo n.º 1
0
 private void Start()
 {
     Skill    = GameObject.Find("FPSController");
     HpPlus   = SkillManagement.GetHpPlus();
     playerHP = playerHP + (playerHP * HpPlus);
     FirstHP  = playerHP;
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     if (SkillManagement.GetBulletScaleUp())
     {
         this.transform.localScale = new Vector3(5, 5, 5);
     }
 }
Ejemplo n.º 3
0
        private void LoadData()
        {
            PersonnelBindingSource.DataSource    = PersonnelManagement.GetA(PersonnelNo);
            EducationObjBindingSource.DataSource = StaticClass.ListEducation(PersonnelNo);
            EligibilityBindingSource.DataSource  = EligibilityManagement.GetAll(PersonnelNo);
            ExperiencyBindingSource.DataSource   = ExperienceManagement.GetAll(PersonnelNo);
            VoluntaryBindingSource.DataSource    = VoluntaryManagement.GetAll(PersonnelNo);
            TrainingBindingSource.DataSource     = TrainingManagement.GetAll(PersonnelNo);
            SpousBindingSource.DataSource        = SpouseManagement.GetA(PersonnelNo);
            SkillBindingSource.DataSource        = SkillManagement.GetAll(PersonnelNo);
            OrganizationBindingSource.DataSource = OrganizationManagement.GetAll(PersonnelNo);
            DistinctionBindingSource.DataSource  = DistinctionManagement.GetAll(PersonnelNo);
            QuestionBindingSource.DataSource     = QuestionManagement.GetAll(PersonnelNo);
            ReferenceBindingSource.DataSource    = ReferencesManagement.GetAll(PersonnelNo);
            DetailBindingSource.DataSource       = Details.GetAll(PersonnelNo);

            if (SpousBindingSource?.Current == null)
            {
                return;
            }
            ChildrenObjBindingSource.DataSource = StaticClass.ListChildren(((Spous)SpousBindingSource.Current).SpouseNo);

            reportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
            reportViewer1.ZoomMode    = ZoomMode.Percent;
            reportViewer1.ZoomPercent = 100;

            this.reportViewer1.RefreshReport();
        }
Ejemplo n.º 4
0
 void Start()
 {
     SkillManagement.SetAmmoMagnification(0);
     AmmoPlus    = SkillManagement.GetAmmoPlus();
     OneMagazine = OneMagazine + (OneMagazine * AmmoPlus);
     InitGun();
     MaxAmmo = MaxAmmo + (MaxAmmo * AmmoPlus);
 }
Ejemplo n.º 5
0
        public static void SetUtility(GameObject gameObject)
        {
            SkillLocator component = gameObject.GetComponent <SkillLocator>();
            GenericSkill skillslot = component.utility;

            SkillManagement.SetSkill(ref skillslot, typeof(CastSmokescreen));
            component.utility = skillslot;
            config();
        }
Ejemplo n.º 6
0
        public static void SetSecondary(GameObject gameObject)
        {
            SkillLocator component = gameObject.GetComponent <SkillLocator>();
            GenericSkill skillslot = component.secondary;

            SkillManagement.SetSkill(ref skillslot, typeof(PrepSecondary));
            component.secondary = skillslot;
            config();
        }
Ejemplo n.º 7
0
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
     for (int i = 0; ; i++)
     {
         try
         {
             GameObject c = transform.GetChild(i).gameObject;
             skill_List.Add(c);
         }
         catch
         {
             break;
         }
     }
 }
Ejemplo n.º 8
0
 private void skillDataGridView_RowLeave(object sender, DataGridViewCellEventArgs e)
 {
     if (skillBindingSource == null)
     {
         return;
     }
     if (skillDataGridView.Rows.Count <= 1)
     {
         return;
     }
     if (!skillDataGridView.IsCurrentRowDirty)
     {
         return;
     }
     Validate();
     ((Skill)skillBindingSource.Current).PersonnelNo = Personnel.PersonnelNo;
     skillBindingSource.EndEdit();
     var iResult = SkillManagement.Save((Skill)skillBindingSource.Current);
 }
Ejemplo n.º 9
0
        private void DeleteSkill()
        {
            var dResult = MessageBox.Show(@"Delete Skill current record?", @"Delete", MessageBoxButtons.YesNo,
                                          MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);

            if (dResult == DialogResult.Yes)
            {
                if (SkillManagement.Delete(((Skill)skillBindingSource.Current).SkillNo))
                {
                    MessageBox.Show(@"Record was deleted successfully.", @"Delete", MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                    skillBindingSource.RemoveCurrent();
                }
                else
                {
                    MessageBox.Show(@"Error on delete operation.", @"Delete", MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
                    skillDataGridView.Focus();
                }
            }
        }
Ejemplo n.º 10
0
        private void LoadInitPersonnelRelatedRecord()
        {
            Cursor.Current = Cursors.WaitCursor;
            var pNo = ((Personnel)personnelBindingSource.Current).PersonnelNo;

            if (pNo > 0)
            {
                eligibilityBindingSource.DataSource  = EligibilityManagement.GetAll(pNo);
                experiencyBindingSource.DataSource   = ExperienceManagement.GetAll(pNo);
                voluntaryBindingSource.DataSource    = VoluntaryManagement.GetAll(pNo);
                trainingBindingSource.DataSource     = TrainingManagement.GetAll(pNo);
                educationObjBindingSource.DataSource = StaticClass.ListEducation(pNo);
                spousBindingSource.DataSource        = SpouseManagement.GetAll(pNo);
                skillBindingSource.DataSource        = SkillManagement.GetAll(pNo);
                organizationBindingSource.DataSource = OrganizationManagement.GetAll(pNo);
                distinctionBindingSource.DataSource  = DistinctionManagement.GetAll(pNo);
                questionBindingSource.DataSource     = QuestionManagement.GetAll(pNo);
                referenceBindingSource.DataSource    = ReferencesManagement.GetAll(pNo);
                detailBindingSource.DataSource       = Details.GetAll(pNo);
            }
            Cursor.Current = Cursors.Default;
        }
Ejemplo n.º 11
0
        private void GetInput(out float speed)
        {
            // Read input
            float horizontal = CrossPlatformInputManager.GetAxis("Horizontal");
            float vertical   = CrossPlatformInputManager.GetAxis("Vertical");

            bool waswalking = m_IsWalking;

#if !MOBILE_INPUT
            // On standalone builds, walk/run speed is modified by a key press.
            // keep track of whether or not the character is walking or running
            // m_IsWalking = !Input.GetKey(KeyCode.LeftShift);
#endif
            // set the desired speed to be walking or running

            //�ړ����x�̐ݒ�
            SkillManagement.SetSpeedMagnification(0);
            float AccelSpeed = SkillManagement.GetSpeedPlus();
            speed = m_IsWalking ? m_WalkSpeed + (m_WalkSpeed * AccelSpeed)
                             : m_RunSpeed + (m_RunSpeed * AccelSpeed);

            m_Input = new Vector2(horizontal, vertical);

            // normalize input if it exceeds 1 in combined length:
            if (m_Input.sqrMagnitude > 1)
            {
                m_Input.Normalize();
            }

            // handle speed change to give an fov kick
            // only if the player is going to a run, is running and the fovkick is to be used
            if (m_IsWalking != waswalking && m_UseFovKick && m_CharacterController.velocity.sqrMagnitude > 0)
            {
                StopAllCoroutines();
                StartCoroutine(!m_IsWalking ? m_FovKick.FOVKickUp() : m_FovKick.FOVKickDown());
            }
        }
Ejemplo n.º 12
0
    void Update()
    {
        //ここ追加
        if (!PauseScript.pause())
        {
            if (!SkillManagement.GetTimeStop())
            {
                //if(!PauseScript.pause()){
                //if(!SkillManagement.GetTimeStop()){

                // ========
                // アニメーション
                // ========
                //あらかじめ設定していたintパラメーター「trans」の値を取り出す.
                trans = animator.GetInteger("trans");


                // 発見フラグ条件判定
                if (foundflg == false)
                {
                    // 敵が正面を向いていて知覚できる範囲内なら
                    if ((transform.position - player.gameObject.transform.position).magnitude < 15 && trans == 0)
                    {
                        foundflg = true;
                        fireflg  = true;
                        trans    = 0;
                        //intパラメーターの値を設定する.
                        animator.SetInteger("trans", trans);
                    }

                    // プレイヤーとの距離が範囲内なら
                    if ((transform.position - player.gameObject.transform.position).magnitude < 5)
                    {
                        foundflg = true;
                        fireflg  = true;
                        trans    = 0;
                        //intパラメーターの値を設定する.
                        animator.SetInteger("trans", trans);
                    }

                    // プレイヤーから攻撃を受けたら
                }

                // 発見フラグがONなら
                if (foundflg == true)
                {
                    // 正面を向き
                    trans = 0;
                    animator.SetInteger("trans", trans);

                    //targetに向かって進む
                    transform.position += transform.forward * ep.speed * 0.1f;
                }
                // 発見フラグがOFFなら
                else if (foundflg == false)
                {
                    // 角度計算
                    rot = GetAim(new Vector2(transform.position.x, transform.position.z),
                                 new Vector2(player.gameObject.transform.position.x, player.gameObject.transform.position.z));

                    rot = rot + ep.startrot;


                    // 角度計算
                    // 正面
                    if (rot >= -45.0f && rot <= 45.0f)
                    {
                        trans = 0;
                    }
                    // 右面
                    else if (rot >= 45.0f && rot <= 135.0f)
                    {
                        trans = 1;
                    }
                    // 左面
                    else if (rot >= -135 && rot <= -45)
                    {
                        trans = 3;
                    }
                    // 後面
                    else
                    {
                        trans = 2;
                    }

                    //intパラメーターの値を設定する
                    animator.SetInteger("trans", trans);
                }
            }
        }


        // デバッグ表示
        //Debug.Log("FlyerHP");
        //Debug.Log(ep.hp);


        // 敵の体力が0になったら
        if (ep.hp == 0)
        {
            // 死亡時の爆発エフェクトを再生
            GameObject de = Instantiate(deadeffect) as GameObject;
            de.transform.position = this.gameObject.transform.position;
            de.transform.position = new Vector3(de.transform.position.x, de.transform.position.y, de.transform.position.z);

            // 死んだときにアイテムポップ
            if (PopObject)
            {
                GameObject po = Instantiate(PopObject) as GameObject;
                po.transform.position = this.gameObject.transform.position;
            }

            // 解放処理
            Destroy(de, 2.0f);
            Destroy(this.gameObject);
        }



        // // 弾発射
        // // z キーが押された時
        // if (Input.GetKeyDown(KeyCode.Z))
        // {
        //     if(fireflg == true)
        //     {
        //         fireflg = false;
        //     }
        //     else
        //     {
        //         fireflg = true;
        //         ftime = 0;
        //     }
        // }


        // 発射フラグがONなら
        if (fireflg == true)
        {
            if (ftime == 0)
            {
                // 弾丸の複製
                GameObject bullets = Instantiate(bullet) as GameObject;

                // マテリアル
                Material b_material = bullets.GetComponent <SpriteRenderer>().material;

                if (AILevel == 1)
                {
                    b_material.SetFloat(propID_h, 0.0f);
                    b_material.SetFloat(propID_s, 0.5f);
                    b_material.SetFloat(propID_c, 0.5f);
                }
                else if (AILevel == 2)
                {
                    b_material.SetFloat(propID_h, 0.45f);
                    b_material.SetFloat(propID_s, 1.0f);
                    b_material.SetFloat(propID_c, 0.7f);
                }
                else if (AILevel == 3)
                {
                    b_material.SetFloat(propID_h, 0.3f);
                    b_material.SetFloat(propID_s, 0.5f);
                    b_material.SetFloat(propID_c, 1.0f);
                }

                // 攻撃力の挿入
                eap = bullets.GetComponent <EnemyAttackPower>();
                eap.SetAtkPower(ep.atk);

                // 向き方向の取得
                Vector3 aim = player.gameObject.transform.position - this.transform.position;

                // Rigidbodyに力を加えて発射
                bullets.GetComponent <Rigidbody>().AddForce(aim, ForceMode.Impulse);

                // 弾丸の位置を調整
                bullets.transform.position = this.gameObject.transform.position;

                // 三秒後に削除
                Destroy(bullets, 3.0f);
            }

            ftime++;
            if (AILevel == 1)
            {
                if (ftime > 60)
                {
                    ftime = 0;
                }
            }
            else if (AILevel == 2)
            {
                if (ftime > 50)
                {
                    ftime = 0;
                }
            }
            else if (AILevel == 3)
            {
                if (ftime > 40)
                {
                    ftime = 0;
                }
            }
        }


        if (moveflg == true)
        {
            if (mtime == 0)
            {
                // 乱数
                mvalue = Random.Range(-0.1f, 0.1f);
            }

            this.gameObject.transform.position = new Vector3(
                this.gameObject.transform.position.x + mvalue,
                this.gameObject.transform.position.y + mvalue,
                this.gameObject.transform.position.z + mvalue
                );

            mtime++;
            if (mtime > 15)
            {
                mtime   = 0;
                moveflg = false;
            }
        }
//    }
//}
    }
Ejemplo n.º 13
0
 public static bool parse(string field, float defaultvalue, out float value)
 {
     return(SkillManagement.configfloat(nameof(CastSmokescreen), field, defaultvalue, out value));
 }
Ejemplo n.º 14
0
 public static bool parse(string field, float defaultvalue, out float value)
 {
     return(SkillManagement.configfloat(nameof(Secondary), field, defaultvalue, out value));
 }
Ejemplo n.º 15
0
 void Skill()
 {
     StartCoroutine(SkillManagement.IERotateAroundCenter(anim));
 }