Exemplo n.º 1
0
    public static string GetSyozaichi(Ken ken)
    {
        switch (ken)
        {
        case Ken.Chiba:
            return("ちば");

        case Ken.Tokyo:
            return("しんじゅく");

        case Ken.Kanagawa:
            return("よこはま");

        case Ken.Ibaraki:
            return("みと");

        case Ken.Saitama:
            return("さいたま");

        case Ken.Gunma:
            return("まえばし");

        case Ken.Tochigi:
            return("うつのみや");

        default:
            return("");
        }
    }
Exemplo n.º 2
0
        /// <summary>
        /// 知识点新增

        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static Ken Ken_ADD(Ken model)
        {
            try
            {
                using (var conn = DbHelper.ResourceService())
                {
                    var p = new DynamicParameters();
                    p.Add("@KenID", dbType: DbType.Int32, direction: ParameterDirection.Output);
                    p.Add("@CreateUserID", model.CreateUserID);
                    p.Add("@OwnerUserID", model.OwnerUserID);
                    p.Add("@CourseID", model.CourseID);
                    p.Add("@OCID", model.OCID);
                    p.Add("@ChapterID", model.ChapterID);
                    p.Add("@Name", model.Name);
                    p.Add("@Pingyin", model.Pingyin);
                    p.Add("@Requirement", model.Requirement);
                    conn.Execute("Ken_ADD", p, commandType: CommandType.StoredProcedure);
                    model.KenID = p.Get <int>("KenID");
                    return(model);
                }
            }
            catch (Exception e)
            {
                return(model);
            }
        }
Exemplo n.º 3
0
    protected override void Awake()
    {
        ken = FindObjectOfType <Ken>();

        animator = GetComponent <Animator>();
        animator.Play("TurretDeactivating", 0, 1);
    }
Exemplo n.º 4
0
    static bool IsCollect(Ken ken, int count, bool isMaru)
    {
        switch (ken)
        {
        case Ken.Chiba:
            return(IsCollectChiba(count, isMaru));

        case Ken.Tokyo:
            return(IsCollectTokyo(count, isMaru));

        case Ken.Kanagawa:
            return(IsCollectKanagawa(count, isMaru));

        case Ken.Ibaraki:
            return(IsCollectIbaraki(count, isMaru));

        case Ken.Saitama:
            return(IsCollectSaitama(count, isMaru));

        case Ken.Gunma:
            return(IsCollectGunma(count, isMaru));

        case Ken.Tochigi:
            return(IsCollectTochigi(count, isMaru));

        default:
            return(IsCollectChiba(count, isMaru));
        }
    }
Exemplo n.º 5
0
    void Awake()
    {
        lootGeneratePosition = transform.Find("LootGeneratePosition");

        spriteRenderer = GetComponent <SpriteRenderer>();
        ken            = FindObjectOfType <Ken>();
    }
Exemplo n.º 6
0
    static string get(Ken ken, int count)
    {
        switch (ken)
        {
        case Ken.Chiba:
            return(getChiba(count));

        case Ken.Tokyo:
            return(getTokyo(count));

        case Ken.Kanagawa:
            return(getKanagawa(count));

        case Ken.Ibaraki:
            return(getIbaraki(count));

        case Ken.Saitama:
            return(getSaitama(count));

        case Ken.Gunma:
            return(getGunma(count));

        case Ken.Tochigi:
            return(getTochigi(count));

        default:
            return(getChiba(count));
        }
    }
Exemplo n.º 7
0
 public void AddToKennith(GameObject gameObject)
 {
     _kennithModel = FindObjectsOfType <Kennith_Model>();
     foreach (var Ken in _kennithModel)
     {
         Ken.AddNewEnemy(gameObject);
     }
 }
Exemplo n.º 8
0
 // Start is called before the first frame update
 protected override void Awake()
 {
     base.Awake();
     ken              = FindObjectOfType <Ken>();
     image            = dialogBox.transform.Find("Image").GetComponent <Image>();
     instructionImage = dialogBox.transform.Find("InstructionImage").GetComponent <Image>();
     dialogText       = dialogBox.GetComponentInChildren <TextMeshProUGUI>();
     sentences        = new Queue <Sentence>();
 }
Exemplo n.º 9
0
    //private GameObject reticle;

    void Awake()
    {
        //Cursor.visible = false;
        cam      = Camera.main;
        ken      = GetComponentInParent <Ken>();
        animator = GetComponent <Animator>();

        //reticle = Instantiate(reticlePrefab);
    }
Exemplo n.º 10
0
 void OnPressKen(Ken ken)
 {
     if (GetKenObject(ken).Kencho.activeSelf)
     {
         return;
     }
     GameSetting.SetKen(ken);
     mScreen.ShowAfterPanel();
     mState = State.Answer;
 }
Exemplo n.º 11
0
 protected override void Awake()
 {
     base.Awake();
     heartIcon1 = GameObject.Find("HeartIcon1");
     heartIcon2 = GameObject.Find("HeartIcon2");
     heartIcon3 = GameObject.Find("HeartIcon3");
     animator   = GetComponent <Animator>();
     ken        = GetComponent <Ken>();
     heldWeapon = GetComponentInChildren <HeldWeapon>().gameObject;
     trigger1   = transform.Find("Colliders").Find("Trigger 1").gameObject;
     UIManager.Instance.SetStats(Hp, maxHp, infection, maxInfection);
 }
Exemplo n.º 12
0
 /// <summary>
 /// 获取知识点相关章节列表
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static List <Chapter> Chapter_KenID_List(Ken model)
 {
     try
     {
         using (var conn = DbHelper.ResourceService())
         {
             var p = new DynamicParameters();
             p.Add("@KenID", model.KenID);
             p.Add("@OCID", model.OCID);
             return(conn.Query <Chapter>("Chapter_KenID_List", p, commandType: CommandType.StoredProcedure).ToList());
         }
     }
     catch (Exception e)
     {
         return(null);
     }
 }
Exemplo n.º 13
0
 /// <summary>
 /// 获取知识点的关联文件列表
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static List <File> Ken_File_List(Ken model)
 {
     try
     {
         using (var conn = DbHelper.ResourceService())
         {
             var p = new DynamicParameters();
             p.Add("@KenID", model.KenID);
             p.Add("@UserID", model.CreateUserID);
             return(conn.Query <File>("Ken_File_List", p, commandType: CommandType.StoredProcedure).ToList());
         }
     }
     catch (Exception e)
     {
         return(null);
     }
 }
Exemplo n.º 14
0
        /// <summary>
        ///  知识点删除

        /// </summary>
        /// <param name="id"></param>
        public static bool Ken_Del(Ken model)
        {
            try
            {
                using (var conn = DbHelper.ResourceService())
                {
                    var p = new DynamicParameters();
                    p.Add("@KenID", model.KenID);
                    p.Add("@UserID", model.CreateUserID);
                    conn.Execute("Ken_Del", p, commandType: CommandType.StoredProcedure);
                    return(true);
                }
            }
            catch (Exception e)
            {
                return(false);
            }
        }
Exemplo n.º 15
0
        public static IList <Exercise> Chapter_Exercise_List(int chapterId, int kenId, int ocid)
        {
            if (!IES.Service.UserService.OC_IsRole(ocid))
            {
                return(null);
            }

            Chapter chapter = new Chapter();

            chapter.ChapterID    = chapterId;
            chapter.OCID         = ocid;
            chapter.CreateUserID = IES.Service.UserService.CurrentUser.UserID;
            Ken ken = new Ken()
            {
                KenID = kenId
            };

            return(new ChapterBLL().Chapter_Exercise_List(chapter, ken));
        }
Exemplo n.º 16
0
 /// <summary>
 /// 章节关联的习题信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static List <Exercise> Chapter_Exercise_List(Chapter model, Ken ken)
 {
     try
     {
         using (var conn = DbHelper.ResourceService())
         {
             var p = new DynamicParameters();
             p.Add("@ChapterID", model.ChapterID);
             p.Add("@UserID", model.CreateUserID);
             p.Add("@OCID", model.OCID);
             p.Add("@KenID", ken.KenID);
             return(conn.Query <Exercise>("Exercise_ChapterID_KenID_List", p, commandType: CommandType.StoredProcedure).ToList());
         }
     }
     catch (Exception e)
     {
         return(null);
     }
 }
Exemplo n.º 17
0
        public static List <IES.Resource.Model.File> File_ChapterID_KenID_List(int chapterId, int kenId, int ocid)
        {
            if (!IES.Service.UserService.OC_IsRole(ocid))
            {
                return(null);
            }

            Chapter chapter = new Chapter();

            chapter.ChapterID    = chapterId;
            chapter.OCID         = ocid;
            chapter.CreateUserID = IES.Service.UserService.CurrentUser.UserID;
            Ken ken = new Ken()
            {
                KenID = kenId
            };

            return(new ChapterBLL().File_ChapterID_KenID_List(chapter, ken));
        }
Exemplo n.º 18
0
 public static bool File_Chapter_Ken_Edit(File model, Chapter chapter, Ken ken)
 {
     try
     {
         using (var conn = DbHelper.ResourceService())
         {
             var p = new DynamicParameters();
             p.Add("@FileID", model.FileID);
             p.Add("@ChapterID", chapter.ChapterID);
             p.Add("@KenID", ken.KenID);
             conn.Execute("File_Chapter_Ken_Edit", p, commandType: CommandType.StoredProcedure);
             return(true);
         }
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Exemplo n.º 19
0
	public static string GetSyozaichi(Ken ken) {
		switch (ken) {
		case Ken.Chiba:
			return "ちば";
		case Ken.Tokyo:
			return "しんじゅく";
		case Ken.Kanagawa:
			return "よこはま";
		case Ken.Ibaraki:
			return "みと";
		case Ken.Saitama:
			return "さいたま";
		case Ken.Gunma:
			return "まえばし";
		case Ken.Tochigi:
			return "うつのみや";
		default:
			return "";
		}
	}
Exemplo n.º 20
0
	static string get(Ken ken, int count) {
		switch(ken) {
		case Ken.Chiba:
			return getChiba(count);
		case Ken.Tokyo:
			return getTokyo(count);
		case Ken.Kanagawa:
			return getKanagawa(count);
		case Ken.Ibaraki:
			return getIbaraki(count);
		case Ken.Saitama:
			return getSaitama(count);
		case Ken.Gunma:
			return getGunma(count);
		case Ken.Tochigi: 
			return getTochigi(count);
		default:
			return getChiba(count);
		}
	}
Exemplo n.º 21
0
	static bool IsCollect(Ken ken, int count, bool isMaru) { 
		switch (ken) {
		case Ken.Chiba:
			return IsCollectChiba(count, isMaru);
		case Ken.Tokyo:
			return IsCollectTokyo(count, isMaru);
		case Ken.Kanagawa:
			return IsCollectKanagawa(count, isMaru);
		case Ken.Ibaraki:
			return IsCollectIbaraki(count, isMaru);
		case Ken.Saitama:
			return IsCollectSaitama(count, isMaru);
		case Ken.Gunma:
			return IsCollectGunma(count, isMaru);
		case Ken.Tochigi:
			return IsCollectTochigi(count, isMaru);
		default:
			return IsCollectChiba(count, isMaru);
		}
	}
Exemplo n.º 22
0
    KenchoKen GetKenObject(Ken ken)
    {
        KenchoKen obj = Tokyo;

        switch (ken)
        {
        case Ken.Tokyo:
            obj = Tokyo;
            break;

        case Ken.Chiba:
            obj = Chiba;
            break;

        case Ken.Ibaraki:
            obj = Ibaraki;
            break;

        case Ken.Saitama:
            obj = Saitama;
            break;

        case Ken.Tochigi:
            obj = Tochigi;
            break;

        case Ken.Gunma:
            obj = Gunma;
            break;

        case Ken.Kanagawa:
            obj = Kanagawa;
            break;

        default:
            break;
        }
        return(obj);
    }
Exemplo n.º 23
0
        /// <summary>
        /// 知识点更新

        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool Ken_Upd(Ken model)
        {
            try
            {
                using (var conn = DbHelper.ResourceService())
                {
                    var p = new DynamicParameters();
                    p.Add("@KenID", model.KenID);
                    p.Add("@UserID", model.CreateUserID);
                    p.Add("@OCID", model.OCID);
                    p.Add("@ChapterID", model.ChapterID);
                    p.Add("@Name", model.Name);
                    p.Add("@Pingyin", model.Pingyin);
                    p.Add("@Requirement", model.Requirement);
                    conn.Execute("Ken_Upd", p, commandType: CommandType.StoredProcedure);
                    return(true);
                }
            }
            catch (Exception e)
            {
                return(false);
            }
        }
Exemplo n.º 24
0
 public IList <Exercise> Exercise_KenID_ChapterID_List(Chapter chapter, Ken ken)
 {
     return(KenDAL.Exercise_KenID_ChapterID_List(chapter, ken));
 }
Exemplo n.º 25
0
 public List <IES.Resource.Model.File> File_KenID_ChapterID_List(Chapter chapter, Ken ken)
 {
     return(KenDAL.File_KenID_ChapterID_List(chapter, ken));
 }
Exemplo n.º 26
0
 public List <Ken> Ken_List(Ken model)
 {
     return(KenDAL.Ken_List(model));
 }
Exemplo n.º 27
0
 public bool Ken_Upd(Ken model)
 {
     return(KenDAL.Ken_Upd(model));
 }
Exemplo n.º 28
0
 public Ken Ken_ADD(Ken model)
 {
     return(KenDAL.Ken_ADD(model));
 }
Exemplo n.º 29
0
 public bool Ken_Del(Ken model)
 {
     return(KenDAL.Ken_Del(model));
 }
Exemplo n.º 30
0
	public static void SetKen(Ken ken) {
		mKen = ken;
		mList.Add (ken);
		mScoreStudyOneCount = 0;
	}
Exemplo n.º 31
0
	public static bool  IsCorrectKenchoshozaichi(Ken ken, string syozaichi) {
		return syozaichi == GetSyozaichi(ken);
	}
Exemplo n.º 32
0
 void Awake()
 {
     ken = FindObjectOfType <Ken>();
 }
Exemplo n.º 33
0
	void OnPressKen(Ken ken) {
		if (GetKenObject(ken).Kencho.activeSelf) 
			return;
		GameSetting.SetKen(ken);
		mScreen.ShowAfterPanel();
		mState = State.Answer;
	}
Exemplo n.º 34
0
	GameObject GetKencho(Ken ken) {
		return GetKenObject(ken).Kencho;
	}
Exemplo n.º 35
0
 protected virtual void Awake()
 {
     ken = FindObjectOfType <Ken>();
 }
Exemplo n.º 36
0
 public bool File_Chapter_Ken_Edit(File model, Chapter chapter, Ken ken)
 {
     return(FileDAL.File_Chapter_Ken_Edit(model, chapter, ken));
 }
Exemplo n.º 37
0
	KenchoKen GetKenObject(Ken ken) {
		KenchoKen obj = Tokyo;
		switch(ken) {
		case Ken.Tokyo:
			obj = Tokyo;
			break;
		case Ken.Chiba:
			obj = Chiba;
			break;
		case Ken.Ibaraki:
			obj = Ibaraki;
			break;
		case Ken.Saitama:
			obj = Saitama;
			break;
		case Ken.Tochigi:
			obj = Tochigi;
			break;
		case Ken.Gunma:
			obj = Gunma;
			break;
		case Ken.Kanagawa:
			obj = Kanagawa;
			break;
		default:
			break;
		}
		return obj;
	}
Exemplo n.º 38
0
 protected override void Awake()
 {
     base.Awake();
     ken = FindObjectOfType <Ken>();
 }