public SendExpAction(Ships.Fleet fl, Missions.Expedition exp) { fleet = fl; //expeditionNumber = expNumber; Exp = exp; ExecuteDate = DateTime.Now; }
public override void OnRestart(Vector3 pos) { missions = Game.Instance.level.missions; Data.Instance.GetComponent <MusicManager> ().BossMusic(true); //bossBar.enabled = true; base.OnRestart(pos); //bossBar.Init (this); }
public ActionResult DeleteConfirmed(int id) { Missions missions = db.missions.Find(id); db.missions.Remove(missions); db.SaveChanges(); return(RedirectToAction("Index")); }
private void btn_Create_Click(object sender, RoutedEventArgs e) { Missions m = new Missions(); _currentMission = m; UC_AIFSetting.CreateMission(_currentMission); fy_Settings.IsOpen = !fy_Settings.IsOpen; }
internal void StartNewMission() { foreach (GameObject item in current_mission.luggage) { Destroy(item); } current_mission = Missions.GetNextMission(); }
void Awake() { if (RESET) { PlayerPrefs.DeleteAll(); } #if UNITY_ANDROID // isAndroid = true; #endif // Cursor.visible = false; if (FORCE_LOCAL_SCORE > 0) { PlayerPrefs.SetInt("scoreLevel_1", FORCE_LOCAL_SCORE); } if (!mInstance) { mInstance = this; } else { Destroy(this.gameObject); return; } DontDestroyOnLoad(this); if (LevelDataDebug.Instance) { playMode = PlayModes.STORYMODE; DEBUG = LevelDataDebug.Instance.isDebbug; this.isArcadeMultiplayer = LevelDataDebug.Instance.isArcadeMultiplayer; this.playOnlyBosses = LevelDataDebug.Instance.playOnlyBosses; this.playMode = LevelDataDebug.Instance.playMode; this.forceVideogameID = LevelDataDebug.Instance.videogameID; this.forceMissionID = LevelDataDebug.Instance.missionID; this.testAreaName = LevelDataDebug.Instance.testArea; } events = GetComponent <Events>(); missions = GetComponent <Missions>(); multiplayerData = GetComponent <MultiplayerData>(); videogamesData = GetComponent <VideogamesData> (); inputSaver = GetComponent <InputSaver> (); inputSavedAutomaticPlay = GetComponent <InputSavedAutomaticPlay> (); versusManager = GetComponent <VersusManager> (); handWriting = GetComponent <HandWriting> (); texts = GetComponent <Texts> (); // GetComponent<Tracker>().Init(); GetComponent <CurvedWorldManager>().Init(); voicesManager.Init(); events.SetVolume += SetVolume; }
public void removeMission(long?missionId) { var foundMission = Missions.SingleOrDefault(mission => mission.missionid == missionId); if (foundMission != null) { Missions.Remove(foundMission); } }
private void deleteMission() { if (SelectedMission == null) { return; } mRepository.deleteMission(SelectedMission.missionid.Value); Missions.Remove(SelectedMission); }
static void Main(string[] args) { Console.WriteLine("This is what i have so far"); Personal person = new Personal(); Weapons weapon = new Weapons(); Missions mission = new Missions(); Vehicles vehicle = new Vehicles(); }
public void GetCoin() { int count = balance.reward.coinValue * (isFever ? 3 : 1); coins += count; Missions.OnGetGoldfishes(count); iTween.PunchScale(level.coinsImage.gameObject, UI.halfVector3, 1f); sound.Play(sound.getCoin); }
public void ProgressReset() { PlayerPrefs.DeleteAll(); user = new User(); Missions.LockAll(); header.UpdateAll(); }
private void FillMissionListBox() { MissionListBox.Items.Clear(); for (int i = 1; i < 8; i++) { MissionListBox.Items.Add(Missions.GetMission(string.Format("SS_{0}{1}", CurrentHouse, i)).Name); } MissionListBox.SelectedIndex = 0; }
public ActionResult Index(Missions model) { Missions newMission = new Missions(); newMission = db.missions.Find(model.MISSION_ID); globalMission = newMission; return(RedirectToAction("Login")); }
private void OnMissionCreated(Mission mission) { Missions.Add(mission); PlayableCell cell = _Grid.GetCell(mission.CellKey); cell.ClientID = mission.ClientID; cell.TargetID = mission.TargetID; Messenger <PlayableCell> .Broadcast(PlayableCell.EVENT_CELL_UPDATED, cell); }
public void Clear() { Missions.CollectionChanged -= mDatabaseHandler; mRepository.deleteAllCargo(); mRepository.deleteAllMissions(); Missions.Clear(); Cargo.Clear(); MissionRequirements.Clear(); Missions.CollectionChanged += mDatabaseHandler; }
public ActionResult Edit([Bind(Include = "MissionID,Title,Address,Longitude,Latitude,ParkingZone,FieldOfWork,Tools,JobDescription,KeyNr,StartTime,EndTime,Partner,Comments,IsFullDay,Extra1,Extra2")] Missions missions) { if (ModelState.IsValid) { db.Entry(missions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(missions)); }
internal override void Process() { if (this.Device.Player.Avatar.Mission_Finish(Mission_ID)) { Console.WriteLine(Mission_ID); Missions Mission = CSV.Tables.Get(Gamefile.Missions).GetDataWithID(Mission_ID) as Missions; Console.WriteLine($"Mission {Mission.Name} done"); } }
public ActionResult Edit([Bind(Include = "missionID,missionName,missionPresFName,missionPresLName,missionAddress,missionCity,missionState,missionCountry,missionZip,language,climate,dominantReligion,missionSymbol")] Missions missions) { if (ModelState.IsValid) { db.Entry(missions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(missions)); }
public ActionResult Edit([Bind(Include = "Id,Icon,Title,Text,Status")] Missions missions) { if (ModelState.IsValid) { db.Entry(missions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(missions)); }
public ActionResult Edit([Bind(Include = "MissionID,MissionName,MissionPresident,MissionAddress,MissionLanguage,MissionClimate,DominantReligion,FlagSource")] Missions missions) { if (ModelState.IsValid) { db.Entry(missions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(missions)); }
void Start() { cam = Camera.main; flipX = agentSprite.GetComponent <SpriteRenderer>().flipX; // Init mission current_mission = Missions.GetNextMission(); agentAi = agentSprite.GetComponent <AgentAi>(); }
public Missions Details(int?id) { Missions missions = db.Missions.Find(id); if (missions == null) { missions = new Missions(); } return(missions); }
public ActionResult Edit([Bind(Include = "MissionID,MissionName,PresidentName,Address,Language,Climate,Religion,Picture")] Missions missions) { if (ModelState.IsValid) { db.Entry(missions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(missions)); }
public ActionResult EditMission(int id) { ViewBag.Message = "Ask us a question!"; ViewBag.Missions = db.Missions.ToList(); ViewBag.Users = db.Users.ToList(); Missions mish = db.Missions.Find(id); return(View(mish)); }
public virtual IQueryable <TEntity> Set <TEntity>() where TEntity : class { if (typeof(TEntity) == typeof(City)) { return((IQueryable <TEntity>)Cities.AsQueryable()); } if (typeof(TEntity) == typeof(CogTag)) { return((IQueryable <TEntity>)Tags.AsQueryable()); } if (typeof(TEntity) == typeof(Faction)) { return((IQueryable <TEntity>)Factions.AsQueryable()); } if (typeof(TEntity) == typeof(Gear)) { return((IQueryable <TEntity>)Gears.AsQueryable()); } if (typeof(TEntity) == typeof(Mission)) { return((IQueryable <TEntity>)Missions.AsQueryable()); } if (typeof(TEntity) == typeof(Squad)) { return((IQueryable <TEntity>)Squads.AsQueryable()); } if (typeof(TEntity) == typeof(SquadMission)) { return((IQueryable <TEntity>)SquadMissions.AsQueryable()); } if (typeof(TEntity) == typeof(Weapon)) { return((IQueryable <TEntity>)Weapons.AsQueryable()); } if (typeof(TEntity) == typeof(LocustLeader)) { return((IQueryable <TEntity>)LocustLeaders.AsQueryable()); } if (typeof(TEntity) == typeof(LocustHighCommand)) { return((IQueryable <TEntity>)LocustHighCommands.AsQueryable()); } throw new InvalidOperationException("Invalid entity type: " + typeof(TEntity)); }
/// <summary> /// Initializes a new instance of the <see cref="Player"/> class. /// </summary> /// <param name="Device">The device.</param> /// <param name="HighID">The high identifier.</param> /// <param name="LowID">The low identifier.</param> internal Player(Device Device, int HighID, int LowID) : this() { this.Device = Device; this.HighID = HighID; this.LowID = LowID; this.Objects = new Objects(this); this.Facebook = new Facebook(this); this.Google = new Google(this); this.Gamecenter = new Gamecenter(this); this.Resources = new Resources(this, true); this.ResourceCaps = new Caps(this); this.Variables = new Variables(this, true); this.Units = new GameSlots(); this.Units2 = new GameSlots(); this.Spells = new GameSlots(); this.AllianceUnits = new GameSlots(); this.HeroStates = new GameSlots(); this.HeroHealth = new GameSlots(); this.HeroUpgrade = new GameSlots(); this.NpcProgress = new GameSlots(); this.NpcLootedGold = new GameSlots(); this.NpcLootedElixir = new GameSlots(); this.UnitPreset1 = new GameSlots(); this.UnitPreset2 = new GameSlots(); this.UnitPreset3 = new GameSlots(); this.PreviousArmy = new GameSlots(); this.Missions = new Missions(this); this.UnitUpgrades = new Upgrades(this); this.SpellUpgrades = new Upgrades(this); this.Achievements = new Achievements(this); this.Progress = new Progress(this); #if DEBUG this.Missions.Add(21000017); this.Missions.Add(21000018); this.Missions.Add(21000019); this.Missions.Add(21000020); this.Missions.Add(21000021); this.Missions.Add(21000022); this.Missions.Add(21000023); this.Missions.Add(21000024); this.Missions.Add(21000025); #endif }
public void BackMenu() { activeEndPanel.SetActive(true); EndGame.coin = cost; EndGame.two = HudScr.scoreCounter; EndGame.three = HightScore.scoreHightCounter; Missions.SavedPlayerPrefs(); HightScore.HightCoin(); HightScore.HightScoreCounter(); Exit(); }
public async void createMission(Object sender, EventArgs e) { Mission createdMission = new Mission() { description = missionDescriptionText.Text }; if (!string.IsNullOrEmpty(priorityText.Text)) { createdMission.priority = int.Parse(priorityText.Text); } if (!string.IsNullOrEmpty(longitudeText.Text) && !string.IsNullOrEmpty(latitudeText.Text)) { createdMission.location = new GeoPoint() { Latitude = int.Parse(latitudeText.Text), Longitude = int.Parse(longitudeText.Text) }; } try { createdMission = await Missions.Create(createdMission); creationStatus.SetTextColor(Android.Graphics.Color.Green); creationStatus.Text = "Mission created successfully."; missionDescriptionText.Text = ""; priorityText.Text = ""; latitudeText.Text = ""; longitudeText.Text = ""; updateMissions(null, null); } catch (RestException exception) { creationStatus.SetTextColor(Android.Graphics.Color.Red); creationStatus.Text = "Creation failed."; if (exception.StatusCode == 401) { Toast.MakeText(this, "Creation failed: You are not authorized to create, please log in.", ToastLength.Short).Show(); } else if (exception.StatusCode == 422) { Toast.MakeText(this, "Creation failed: Please make sure that you've filled all the required mission details.", ToastLength.Short).Show(); } else { Toast.MakeText(this, "Creation failed" + exception.StatusCode.ToString(), ToastLength.Short).Show(); } } }
public ActionResult Index(Missions myMission) { int M_ID = myMission.MissionID; Missions searchMission = db.Missions.Find(M_ID); //lstMissions.Find(x => x.MissionID == myMission.MissionID); ViewBag.Search = searchMission; Session["M_ID"] = M_ID; return(RedirectToAction("Missions", searchMission)); }
public ActionResult Create([Bind(Include = "MissionID,MissionName,PresidentName,Address,Language,Climate,Religion,Picture")] Missions missions) { if (ModelState.IsValid) { db.Missions.Add(missions); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(missions)); }
// GET: Missions1 //public ActionResult Index() //{ // return View(db.Missions.ToList()); //} //GET: Missions //passes parameters to the MissionInfo view when it gets directed towards public ActionResult Index(int id) { IEnumerable <MissionQuestions> questions = db.Database.SqlQuery <MissionQuestions>( @"SELECT * FROM MissionQuestions WHERE MissionID = " + id); ViewBag.questions = questions; Missions item = db.Missions.Find(id); return(View(item)); }
public static void SendExpedition(Fleet fl, Missions.Expedition exp) { //переписать //int page = ((expNumber - 1) / 8) + 1; //int line = ((expNumber - 1) % 8) + 1; if (fl.IsOkForExp(exp)==false) { try { LogWriter.WriteLogSucces(String.Format("Fleet {0} will be reequiped for expedition {1}", fl.ID, exp.ID)); fl.ClearShips(); fl = Dock.Fleets[fl.ID - 1]; Missions.FleetCreator flk = new Missions.FleetCreator(exp); Fleet tmp = flk.EquipForExpedition(); fl.FillFleetWithShips(tmp); fl = Dock.Fleets[fl.ID - 1]; if (fl.IsOkForExp(exp) == false) throw new AlgoritmicException("Strange thing happened i dunno"); LogWriter.WriteLogSucces(String.Format("Fleet {0} successfully equiped for expedition {1}", fl.ID, exp.ID)); } catch (Exception ex) { LogWriter.WriteLogOnException(ex); return; } } if (fl.IsSuplied == false) { HttpSender.SupplyFleet(fl); Map.ReloadMainMenu(); } Map.OpenExpeditions(); (Map.CurrentFrame as Expeditions).StartExpedition(exp.PageInList, exp.RowInPage, fl.ID); // Map.OpenMainMenu(); }
public bool IsOkForExp(Missions.Expedition exp ) { if (Ships.Count == 0) return false; if (Ships[0].Level < exp.FlagshipLevel) return false; int sumLevel = 0; foreach (Ship shp in Ships) sumLevel += shp.Level; if (sumLevel < exp.SumOfLevels) return false; Fleet tmp = this.Clone(); foreach (var type in exp.Requirements) { if (type.ShipType != ShipTypes.XX) { if (tmp.Ships.FindIndex(x => x.ShipType == type.ShipType) == -1) return false; else { tmp.Ships.Remove(tmp.Ships.Find(x => x.ShipType == type.ShipType)); } } else { if (tmp.Ships.Count == 0) return false; else tmp.Ships.Remove(tmp.Ships[0]); } } return true; }
public static void ShowJobSummary(Missions.Job job) { if (CanShowMenu()) { EnableMenuManager(); Windows.WindowSwitcher.GameWindow.MenuManager.CloseOpenMenus(); Windows.WindowSwitcher.GameWindow.MenuManager.AddMenu(new Menus.mnuJobDescription("mnuJobDescription", job, false)); Windows.WindowSwitcher.GameWindow.MenuManager.SetActiveMenu("mnuJobDescription"); } }