public static void Attempt(Character c) { if (Constants.Rand.NextDouble() > Constants.MobDeathRoulette_Odds) { return; } var roulette = new MobDeathRoulette(); for (int i = -1; i < 3; i++) { var effect = new FieldEffectPacket(FieldEffect.Screen) { sName = roulette.GetEffectString(i) }; effect.Broadcast(c, true); } var pItem = MasterManager.CreateItem(roulette.nScrollItemID); pItem.nNumber = 1; // todo delay this InventoryManipulator.InsertInto(c, pItem); }
public void switchMusic(string sceneName, GenericDictionary message) { if (MasterManager.isMenu(sceneName)) { switchAudio(menuAudio); return; } if (message == null) { Debug.LogError("Message is null and we are supposed to play biome music"); return; } object levelId = message.GetValue <object>("levelId"); object biome = message.GetValue <object>("biome"); if (levelId != null && biome != null) { LevelData levelData = LevelLoader.instance.LoadLevelData((int)levelId, (DataTypes.BiomeType)biome); if (levelData != null) { if (levelData.isBossLevel) { switchAudio(biomeAudioList.bossAudio); } else { switchAudio(biomeAudioList.GetAudioForBiome((DataTypes.BiomeType)biome)); } } } }
private void Awake() { masterManager = FindObjectOfType <MasterManager>(); saveSlotNum = -1; alphaMask.enabled = false; saveSlotsMenuCanvas.enabled = false; }
public List <MyCurrency> Currencyviewparticular(MyCurrency Data) { MasterManager cm = new MasterManager(); List <MyCurrency> st = cm.GetCurrencyMasterRecord(Data); return(st); }
public void UseLotteryItem(short nPOS, int nItemID) { if (Parent.Stats.nHP <= 0) { return; } var pItemRaw = InventoryManipulator.GetItem(Parent, ItemConstants.GetInventoryType(nItemID), nPOS); // TODO determine if we can hardcode the inventory type var itemResult = MasterManager.CreateItem(RandomBoxes.GetRandom(nItemID)); if (itemResult != null && pItemRaw is GW_ItemSlotBundle pItem) { if (InventoryManipulator.CountFreeSlots(Parent, InventoryType.Equip) > 0 && InventoryManipulator.CountFreeSlots(Parent, InventoryType.Consume) > 0) { InventoryManipulator.RemoveFrom(Parent, pItemRaw.InvType, nPOS); InventoryManipulator.InsertInto(Parent, itemResult); } else { Parent.SendMessage("Please make some room in your inventory."); } } else { Parent.SendMessage("This item has not been implemented yet. If you believe this to be an error, please report it on the discord server."); } }
private void Start() { if (masterManager == null) { masterManager = GameObject.Find("MasterManager").GetComponent <MasterManager>(); } for (int i = 0; i < ItemNum; i++) { if (DropTarget[i] == null) { DropTarget[i] = GameObject.Find("PopUpPos"); } } if (StopTargetPos == null) { StopTargetPos = GameObject.Find("TargetPos").transform; } if (DropTargetPos == null) { DropTargetPos = GameObject.Find("PopUpPos").transform; } }
public List <MyPort> portBind(MyPort Data) { MasterManager cm = new MasterManager(); List <MyPort> st = cm.GetCommonPortMaster(Data); return(st); }
// Start is called before the first frame update void Start() { masterManager = GetComponent <MasterManager>(); groundTilemap = masterManager.groundTilemap; worldTiles = masterManager.worldTiles; }
public List <MyDepot> DepotRecord(MyDepot Data) { MasterManager cm = new MasterManager(); List <MyDepot> st = cm.GetDepotMasterRecord(Data); return(st); }
public List <MyTerminal> TerminalRecord(MyTerminal Data) { MasterManager cm = new MasterManager(); List <MyTerminal> st = cm.GetTerminalMasterRecord(Data); return(st); }
public List <MyCity> cityBind(MyCity Data) { MasterManager cm = new MasterManager(); List <MyCity> st = cm.GetCommonCityMaster(Data); return(st); }
public List <MyCountry> countryBind(MyCountry Data) { MasterManager cm = new MasterManager(); List <MyCountry> st = cm.GetCommonCountryMaster(Data); return(st); }
public List <MyDepot> Depot(MyDepot Data) { MasterManager cm = new MasterManager(); List <MyDepot> st = cm.InsertDepotMaster(Data); return(st); }
public List <MyTerminal> Customer(MyTerminal Data) { MasterManager cm = new MasterManager(); List <MyTerminal> st = cm.InsertTerminalMaster(Data); return(st); }
public List <MyCountry> Countryview(MyCountry Data) { MasterManager cm = new MasterManager(); List <MyCountry> st = cm.GetCountryMaster(Data); return(st); }
public bool AddRandomMasteryBook(int nJobID = -1) { int bookid; if (nJobID == -1) { bookid = MasterManager.ItemTemplates .MasteryBooks() .Random() // grab random set .Random(); // grab random item from set } else { bookid = MasterManager.ItemTemplates .MasteryBooksByJob(PlayerJob) .Random(); } if (bookid <= 0) { return(false); } var item = MasterManager.CreateItem(bookid); var slot = InventoryManipulator.InsertInto(Character, item); return(slot != 0); }
public List <MyCountry> Countryviewparticular(MyCountry Data) { MasterManager cm = new MasterManager(); List <MyCountry> st = cm.GetCountryMasterRecord(Data); return(st); }
private void TryDropDojoItem(TagPoint pos) { // 50% chance to drop a dojo powerup if (Constants.Rand.NextDouble() < 0.50) { var randBuffItem = Constants.Rand.Next(2022359, 2022422); var item = MasterManager.CreateItem(randBuffItem); if (item is null) { return; } CDropFactory.CreateDropItem(this, pos, 0, item); } // 50% chance to drop a dojo hp/mp pot if (Constants.Rand.NextDouble() < 0.50) { var randPotItem = Constants.Rand.Next(2022430, 2022433); var item = MasterManager.CreateItem(randPotItem); if (item is null) { return; } CDropFactory.CreateDropItem(this, pos, 0, item); } }
public List <MyCurrency> Currency(MyCurrency Data) { MasterManager cm = new MasterManager(); List <MyCurrency> st = cm.InsertCurrencyMaster(Data); return(st); }
private void OnStart() { if (MasterManager.Players.Count >= MIN_PLAYERS) { MasterManager.Game(); } }
public List <MyCurrency> Currencyview(MyCurrency Data) { MasterManager cm = new MasterManager(); List <MyCurrency> st = cm.GetCurrrencyMaster(Data); return(st); }
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, jafleetContext context) { app.UseExceptionHandler("/Home/Error"); app.UseLoggingMiddleware(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute("EditStore", "E/Store", defaults: new { controller = "E", action = "Store" }); endpoints.MapControllerRoute("Edit1", "e/{id?}", defaults: new { controller = "E", action = "Index" }); endpoints.MapControllerRoute("Edit2", "E/{id?}", defaults: new { controller = "E", action = "Index" }); endpoints.MapControllerRoute("Log", "log/{id?}", defaults: new { controller = "log", action = "Index" }); endpoints.MapControllerRoute("AircraftDetail1", "AircraftDetail/{id?}", defaults: new { controller = "AircraftDetail", action = "Index" }); endpoints.MapControllerRoute("AircraftDetail2", "AD/{id?}", defaults: new { controller = "AircraftDetail", action = "Index" }); endpoints.MapControllerRoute("AircraftDetail3", "ADN/{id?}", defaults: new { controller = "AircraftDetail", action = "IndexNohead" }); endpoints.MapControllerRoute("AircraftDetail4", "ADNB/{id?}", defaults: new { controller = "AircraftDetail", action = "IndexNoheadBack" }); endpoints.MapControllerRoute("Logy", "logy", defaults: new { controller = "log", action = "Yesterday" }); endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}/{id2?}"); }); MasterManager.ReadAll(context); }
public DetailDisplay(MasterManager manMaster) { InitializeComponent(); Dock = DockStyle.Fill; managerMaster = manMaster; flowPanelDetails.Controls.AddRange(managerMaster.GetModulePanels()); }
protected override void Awake() { base.Awake(); MasterManager.Sync(); ScenarioEventManager.AddEvent(new ActionScenarioEvent(630, FinDuJeu)); }
void Start() { if (Instance != null) { Destroy(gameObject); return; } DontDestroyOnLoad(gameObject); Instance = this; return; Pools.Add("chest", new List <GameObject>()); Pools.Add("superchest", new List <GameObject>()); Pools.Add("gem", new List <GameObject>()); Pools.Add("laser", new List <GameObject>()); Pools.Add("cash", new List <GameObject>()); Pools.Add("explode", new List <GameObject>()); for (int i = 0; i < 5; i++) { Pools["chest"].Add((GameObject)GameObject.Instantiate(ChestPrefab)); Pools["superchest"].Add((GameObject)GameObject.Instantiate(SuperChestPrefab)); Pools["gem"].Add((GameObject)GameObject.Instantiate(GemPrefab)); Pools["laser"].Add((GameObject)GameObject.Instantiate(LaserPrefab)); Pools["cash"].Add((GameObject)GameObject.Instantiate(CashPrefab)); Pools["explode"].Add((GameObject)GameObject.Instantiate(ExplodeParticle)); } }
private void Spawn() { if (PhotonNetwork.InRoom) { MasterManager.NetworkInstantiate(objectToSpawn, position, Quaternion.identity); } }
private void playSound() { MasterManager masterManager = GetComponent <Cannon>().MasterManager; int cannonIndex = GetComponent <Cannon>().CannonIndex; masterManager.soundManager.PlayCannonShootSound(cannonIndex); }
private void Awake() { Vector2 offset = Random.insideUnitCircle * 5f; Vector3 pos = new Vector3(transform.position.x + offset.x, transform.position.y + offset.y, transform.position.z); MasterManager.NetworkInstantiate(prefab, pos, Quaternion.identity); }
void Start() { controllerAI = GetComponent <ControllerAI>(); gravity = -(2f * maxJumpHeight) / (timeToJumpApex * timeToJumpApex); minJumpVelocity = Mathf.Sqrt(2f * Mathf.Abs(gravity * minJumpHeight)); maxJumpVelocity = Mathf.Abs(gravity) * timeToJumpApex; currentMoveSpeed = moveSpeed; //at start, move speed is max (decreased when landing from dash) currentJumpHeightMultiplier = 1f; //same as above but for jump height playerCollider = GetComponent <BoxCollider>(); playerRenderer = GetComponent <Renderer>(); masterManager = FindObjectOfType <MasterManager>(); characterScale = gameObject.transform.localScale; //uglyNose = transform.GetChild(0).gameObject;//abomination //uglyNoseRenderer = uglyNose.GetComponent<Renderer>(); //uglyArm = transform.GetChild(1).gameObject;//abomination //uglyArmRenderer = uglyArm.GetComponent<Renderer>(); //this is the projectile stopper //projectileStopper = transform.GetChild(2).GetComponent<BoxCollider>(); //if (projectileStopper.enabled) projectileStopper.enabled = false;//if active, deactivate it #if UNITY_EDITOR //that's taken care by master manager when scene is loaded lastRegisteredSpawnerPos = FindObjectOfType <PlayerSpawner>().transform.position; //initialise spawner pos #endif masterManager.LevelRestartEvent += RestartLevel;//subscribe restartlevel to event from master manager }
public void DelAdminLogin() { string UserName = Request["UserName"]; string PassWord = Request["PassWord"]; string VerifyCode = Request["VerifyCode"]; MasterManager mm = new MasterManager(); if (VerifyCode.ToLower() != Session[Keys.SESSION_CODE].ToString().ToLower()) { Response.Write("您输入的验证码不正确!"); return; } if (!mm.IsManager(UserName)) { Response.Write("您输入的用户名不存在!"); return; } Master master = mm.GetManager(UserName, DESEncrypt.Md5(PassWord, 32)); if (master == null) { Response.Write("您输入的密码错误!"); return; } Session[Keys.SESSION_ADMIN_INFO] = master; Session.Timeout = 45; AddMasterLog(master); }
public void Awake() { if ( GM == null) { DontDestroyOnLoad(gameObject); GM = this; } else if (GM != this) { Destroy(gameObject); } MM = gameObject.GetComponent<MasterManager>(); }
public virtual void Init(MasterManager masterManager) { this.masterManager = masterManager; }