当前位置: 首页>>代码示例>>C#>>正文


C# Mission类代码示例

本文整理汇总了C#中Mission的典型用法代码示例。如果您正苦于以下问题:C# Mission类的具体用法?C# Mission怎么用?C# Mission使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Mission类属于命名空间,在下文中一共展示了Mission类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetLuaTable

		public override LuaTable GetLuaTable(Mission mission)
		{
            Dictionary<object, object> map = new Dictionary<object, object>
				{
					{"message", message},
                    {"fontSize", FontSize},
                    {"time", time},
				};
            if (!string.IsNullOrEmpty(imagePath) && File.Exists(ImagePath))
			{
				var image = new BitmapImage(new Uri(ImagePath));
				map.Add("image", Path.GetFileName(ImagePath));
				map.Add("imageWidth", image.PixelWidth);
                map.Add("imageHeight", image.PixelHeight);
			}
            else if (!string.IsNullOrWhiteSpace(imagePath))
            {
                map.Add("image", ImagePath);
                map.Add("imageFromArchive", true);
            }
            if (!string.IsNullOrEmpty(soundPath) && File.Exists(SoundPath))
            {
                map.Add("sound", Path.GetFileName(soundPath));
            }
            else if (!string.IsNullOrWhiteSpace(soundPath))
            {
                map.Add("sound", soundPath);
                map.Add("soundFromArchive", true);
            }

            return new LuaTable(map);
		}
开发者ID:Jamanno,项目名称:Zero-K-Infrastructure,代码行数:32,代码来源:ConvoMessageAction.cs

示例2: _setCompleted

	override protected void _setCompleted(Mission mission, bool up, bool notify) {
		AndroidJNI.PushLocalFrame(100);
		using(AndroidJavaClass jniMissionStorage = new AndroidJavaClass("com.soomla.levelup.data.MissionStorage")) {
			jniMissionStorage.CallStatic("setCompleted", mission.ID, up, notify);
		}
		AndroidJNI.PopLocalFrame(IntPtr.Zero);
	}
开发者ID:Ratel13,项目名称:unity3d-levelup,代码行数:7,代码来源:MissionStorageAndroid.cs

示例3: Random_Destination

    public void Random_Destination()
    {
        // randomly choose a mission
        // current_mission = missions[Random.Range(0,missions.Length)];

        current_mission = new Mission();
        current_mission.start_portal = startPoint[Random.Range(0,startPoint.Count)];

        // the destination can not be the start point's location
        List<GData.LocationType> locs
            = new List<GData.LocationType>(GameObject.FindObjectOfType<PortalSystem>().
                                           Get_Protals()[current_mission.start_portal].locations);
        Debug.Log("Locs : " + locs.Count);
        current_mission.destination = endPoint[Random.Range(0,endPoint.Count)];
        while(locs.Contains(current_mission.destination))
        {
            current_mission.destination = endPoint[Random.Range(0,endPoint.Count)];
        }

        current_mission.comment = "Find a way to " + current_mission.destination.ToString();
        current_mission.comment = current_mission.comment.Replace("_", " ");

        // place the player
        PortalSystem sys = GameObject.FindObjectOfType<PortalSystem>();
        sys.Place_Player(current_mission.start_portal);
    }
开发者ID:HaikunHuang,项目名称:TutorialForTaikeQ,代码行数:26,代码来源:MissionSystem.cs

示例4: getMission

 public static Mission getMission(String id)
 {
     Mission mission = null;
     String parameter = "id";
     String query = DB.SELECT
                  + "*"
                  + DB.FROM
                  + Net7.Tables.missions
                  + DB.WHERE
                  + ColumnData.GetName(Net7.Table_missions._mission_id)
                  + DB.EQUALS
                  + DB.QueryParameterCharacter
                  + parameter;
     DataTable dataTable = DB.Instance.executeQuery(query, new String[]{parameter}, new String[] {id});
     if (dataTable.Rows.Count == 1)
     {
         mission = new Mission();
         mission.setId(id);
         mission.setXml(ColumnData.GetString(dataTable.Rows[0], Net7.Table_missions._mission_XML));
         mission.setName(ColumnData.GetString(dataTable.Rows[0], Net7.Table_missions._mission_name));
         String type = ColumnData.GetString(dataTable.Rows[0], Net7.Table_missions._mission_type);
         CommonTools.MissionType missionType;
         CommonTools.Enumeration.TryParse<CommonTools.MissionType>(type, out missionType);
         mission.setType(missionType);
         mission.setKey(ColumnData.GetString(dataTable.Rows[0], Net7.Table_missions._mission_key));
     }
     return mission;
 }
开发者ID:RavenB,项目名称:Earth-and-Beyond-server,代码行数:28,代码来源:Database.cs

示例5: CreateTaskWindow

        //private DatabaseModel.Database<Mission> ListOfMissions = new DatabaseModel.Database<Mission>("ToDoList.txt");
        // Instead the above we need to call the parent window
        public CreateTaskWindow(DateTime taskDate, Mission editMission = null)
        {
            InitializeComponent();

            this.taskDate = taskDate;
            this.editMission = editMission;
            // this.missionFileControler = new MissionFileControler();
            List<PriorityLevel> priorityLevels = new List<PriorityLevel>();

            priorityLevels.Add(PriorityLevel.Low);
            priorityLevels.Add(PriorityLevel.Medium);
            priorityLevels.Add(PriorityLevel.Urgent);

            this.ComboBoxPriority.ItemsSource = priorityLevels;

            // set default value
            if (this.editMission == null)
            {
                this.ComboBoxPriority.SelectedValue = priorityLevels[0];
            }
            else
            {
                this.Title = "Edit task";
                this.ComboBoxPriority.SelectedValue = this.editMission.Priority;
                this.TextBoxName.Text = this.editMission.Name;
                this.TextBoxDescription.Text = this.editMission.Description;
                this.addButton.Content = "Update";
            }
        }
开发者ID:razsilev,项目名称:TelerikAcademy_Homework,代码行数:31,代码来源:CreateTaskWindow.xaml.cs

示例6: SetMissionFromHashtable

 /// <summary>
 /// Creates the mission from a hashtable sent over the PhotonNetwork.
 /// </summary>
 /// <param name="missionData">The hashtable containing the mission data.</param>
 public void SetMissionFromHashtable(Hashtable missionData)
 {
     print("mission created from hashtable");
     Mission newMission = new Mission(missionData);
     activeMission = newMission;
     SetMissionTimer();
 }
开发者ID:Solestis,项目名称:SpyGameUnity5,代码行数:11,代码来源:MissionControl.cs

示例7: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (_Request.Get("missionID") != null)
            {
                int missionID = _Request.Get<int>("missionID", Method.Get, 0);

                Mission mission = MissionBO.Instance.GetMission(missionID, true);

                if (mission.ParentID != null)
                    m_ParentMission = MissionBO.Instance.GetMission(mission.ParentID.Value);
            }
            else if(_Request.Get("type") == null)
            {
                m_ParentMission = MissionBO.Instance.GetMission(_Request.Get<int>("pid", 0));

                if (m_ParentMission == null)
                {
                    ShowError("任务组不存在");
                    return;
                }
            }

            if (_Request.IsClick("savemission"))
                SaveMission();
        }
开发者ID:huchao007,项目名称:bbsmax,代码行数:25,代码来源:manage-mission-detail.aspx.cs

示例8: PutMission

        public async Task<IHttpActionResult> PutMission(int id, Mission mission)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != mission.Id)
            {
                return BadRequest();
            }

            db.Entry(mission).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!MissionExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
开发者ID:WorldMaker,项目名称:BattcherIntel,代码行数:32,代码来源:MissionController.cs

示例9: GetLuaTable

		public override LuaTable GetLuaTable(Mission mission)
		{
			if (string.IsNullOrEmpty(imagePath) || !File.Exists(ImagePath))
			{
				var map = new Dictionary<object, object>
					{
						{"message", message},
						{"width", Width},
                        {"height", Height},
						{"pause", Pause},
                        {"fontSize", FontSize},
					};
                if(!string.IsNullOrWhiteSpace(imagePath))
                {
                    map.Add("image", imagePath);
                    map.Add("imageFromArchive", true);
                }
				return new LuaTable(map);
			}
			else
			{
				var image = new BitmapImage(new Uri(ImagePath));
				var map = new Dictionary<object, object>
					{
						{"message", message},
						{"image", Path.GetFileName(ImagePath)},
						{"imageWidth", image.PixelWidth},
						{"imageHeight", image.PixelHeight},
						{"pause", Pause},
                        {"fontSize", FontSize},
					};
				return new LuaTable(map);
			}
		}
开发者ID:Jamanno,项目名称:Zero-K-Infrastructure,代码行数:34,代码来源:GuiMessageAction.cs

示例10: DeleteMission

        public void DeleteMission(Mission mission)
        {
            string tempFile = "temp.txt";
            string serializedMissionForDeleting = mission.Serialize();
            FileStream fsRead = new FileStream(MissionFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
            FileStream fsWrite = new FileStream(tempFile, FileMode.Create, FileAccess.ReadWrite);

            using (StreamReader reader = new StreamReader(fsRead))
            {
                using (StreamWriter writer = new StreamWriter(fsWrite))
                {
                    while (!reader.EndOfStream)
                    {
                        string line = reader.ReadLine();

                        if (!line.Equals(serializedMissionForDeleting))
                        {
                            writer.WriteLine(line);
                        }
                    }
                }
            }

            File.Delete(MissionFileControler.MissionFilePath);
            File.Move(tempFile, MissionFileControler.MissionFilePath);
        }
开发者ID:razsilev,项目名称:TelerikAcademy_Homework,代码行数:26,代码来源:MissionFileControler.cs

示例11: LoadDataromServer

    public void LoadDataromServer(string json_data)
    {
        var Json = SimpleJSON.JSON.Parse(json_data);
        missions = new List<Mission>(Json["missions"].Count);
        for (int a = 0; a < Json["missions"].Count; a++)
        {
            Mission newMission = new Mission();
            newMission.id = int.Parse(Json["missions"][a]["id"]);
            newMission.islandId = int.Parse(Json["missions"][a]["islandId"]);

            newMission.qty = int.Parse(Json["missions"][a]["qty"]);

            switch (Json["missions"][a]["element"])
            {
                case "MADERA": newMission.element = Mission.elements.MADERA; break;
                case "PIEDRAS": newMission.element = Mission.elements.PIEDRAS; break;
                case "ARENA": newMission.element = Mission.elements.ARENA; break;
            }
            newMission.description = Json["missions"][a]["description"];
          //  newMission.description = GetDescription(newMission);

            missions.Add(newMission);
        }
        //foreach(Mission mission in missions)
        //{
        //    Debug.Log("M: " + mission.description);
        //}
    }
开发者ID:pontura,项目名称:matematicas,代码行数:28,代码来源:MissionsManager.cs

示例12: btnNewMission_Click

 private void btnNewMission_Click(object sender, EventArgs e)
 {
     var mission = new Mission() {Name = "NEW MISSION", PartyLevel = 1};
     MissionLoader.Add(mission);
     lstMissions.DataSource = null;
     lstMissions.DataSource = MissionLoader.Get();
 }
开发者ID:Fyzxs,项目名称:FactionMissionRunner,代码行数:7,代码来源:FormMain.cs

示例13: generateMission

 public void generateMission()
 {
     if (currentMission != null)
         return;
     MissionNumber++;
     currentMission = new Mission(MissionNumber, previousMission);
     if (previousMission == Mission.MissionType.Boss || previousMission == Mission.MissionType.BaseAssault)
     {
         spawnPoints = new List<enemySpawnPoint>();
         enemySpawnPoint[] sp = FindObjectsOfType<enemySpawnPoint>();
         foreach (enemySpawnPoint s in sp)
         {
             spawnPoints.Add(s);
         }
     }
     previousMission = currentMission.type;
     Title.Display(currentMission.missionTitle);
     Type.Display(currentMission.missionType);
     Objective.Display(currentMission.missionObjective);
     Bonus.Display(currentMission.missionBonusObjective);
     Reward.Display(currentMission.Reward);
     bReward.Display(currentMission.bonusReward);
     Difficulty.Display(currentMission.missionDifficulty);
     clearRemainingEnemies();
     setUpMission();
 }
开发者ID:TobyDGosselin,项目名称:Star-Sector,代码行数:26,代码来源:InitializeMission.cs

示例14: GetLuaTable

		public override LuaTable GetLuaTable(Mission mission)
		{
			var map = new Dictionary<object, object>
				{
					{"noContinue", noContinue},
				};
			return new LuaTable(map);
		}
开发者ID:GoogleFrog,项目名称:Zero-K-Infrastructure,代码行数:8,代码来源:StopMusicAction.cs

示例15: GetLuaTable

		public override LuaTable GetLuaTable(Mission mission)
		{
			var map = new Dictionary<object, object>
				{
					{"strength", Strength},
				};
			return new LuaTable(map);
		}
开发者ID:GoogleFrog,项目名称:Zero-K-Infrastructure,代码行数:8,代码来源:ShakeCameraAction.cs


注:本文中的Mission类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。