// GET: Potions public ActionResult Index(int?id) { if (id < 0 || id == null) { return(View(new Potions { Name = "No Recipie found", Description = "No Recipie found with the id of " + id, navColor = new Color { Description = string.Empty }, navEffect = new Effect { Description = string.Empty } })); } PotionManager pManager = new PotionManager(); var potion = pManager.GetPotion(n => n.PotionID == id) ?? new Potions { Name = "No Recipie found", Description = "No Recipie found with the id of " + id, navColor = new Color { Description = string.Empty }, navEffect = new Effect { Description = string.Empty } }; List <Potions> plist = new List <Potions>(); plist.Add(potion); return(View(potion)); }
public PotionManager megaPotion() { PotionManager pm = null; pm = new PotionManager("Mega Potion", "mega_potion", "This Potion Restores 50 HP To The User!", 0, 0, 0, 0, PotionBace.PotionTypes.HP, 0); return(pm); }
// Use this for initialization void Start() { ASstep = GameObject.Find("StepSound").GetComponent <AudioSource>(); ASswing = GameObject.Find("SwingSound").GetComponent <AudioSource>(); ASbackground = GameObject.Find("BackgroundSound").GetComponent <AudioSource>(); ASbackground.Play(); Shop = FindObjectOfType <ShopManager>(); Shopi = FindObjectOfType <ShopHolder>(); PM = FindObjectOfType <PotionManager>(); canattack = true; rbody = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); weapon.GetComponent <SpriteRenderer>().sortingOrder = 3; hadRun = 2; canMove = true; hadAttacked = false; waitToWaste = 0.5f; //HAY QUE HACERLO SMOOT. auxiliarfloat = 0.7f; //este float es el tiempo entre cada golpe waitToWasteRun = 1.5f; anim.SetFloat("lastmove_x", 0f); anim.SetFloat("lastmove_y", -1f); runMoveSpeed = moveSpeed; }
public PotionManager wizardsElixer() { PotionManager pm = null; pm = new PotionManager("Wizards Elixer", "wizards_elixer", "This Potion Restores ALL MP To The User!", 0, 0, 0, 0, PotionBace.PotionTypes.MP, 0); return(pm); }
public PotionManager hyperPotion() { PotionManager pm = null; pm = new PotionManager("Hyper Potion", "hyper_potion", "This Potion Restores 225 HP To The User!", 0, 0, 0, 0, PotionBace.PotionTypes.HP, 0); return(pm); }
public PotionManager extremePotion() { PotionManager pm = null; pm = new PotionManager("Extreme Potion", "extreme_potion", "This Potion Restores 150 HP To The User!", 0, 0, 0, 0, PotionBace.PotionTypes.HP, 0); return(pm); }
public PotionManager healingPotion() { PotionManager pm = null; pm = new PotionManager("Healing Potion", "healing_potion", "This Potion Restores 20 HP To The User!", 0, 0, 0, 0, PotionBace.PotionTypes.HP, 0); return(pm); }
public PotionManager restorePotion() { PotionManager pm = null; pm = new PotionManager("Restore", "restore", "It Has A 50% Chance Restoring A Fallen Player, If Reserected Player Will Only Have HALF Health!", 0, 0, 0, 0, PotionBace.PotionTypes.RESTORE, 0); return(pm); }
public PotionManager omniRestorePotion() { PotionManager pm = null; pm = new PotionManager("Omni-Restore", "omnirestore", "It Restores A Fallen Player To Full Health!", 0, 0, 0, 0, PotionBace.PotionTypes.RESTORE, 0); return(pm); }
public PotionManager magicPotion() { PotionManager pm = null; pm = new PotionManager("Magic Potion", "magic_potion", "This Potion Restores 25 MP To The User!", 0, 0, 0, 0, PotionBace.PotionTypes.MP, 0); return(pm); }
private static void AddItemstoMenu(Menu menu) { var tempMenu = menu; var potionmenu = new Menu("药水", "act_potionmanager"); PotionManager.AddtoMenusub(potionmenu); tempMenu.AddSubMenu(potionmenu); var defensivemenu = new Menu("防御用品", "act_defensiveItem"); defensivemenu.AddSubMenu(new Menu("PUC 负面魔法", "act_debuff")); foreach (var buffname in BuffnamesCC) { defensivemenu.SubMenu("act_debuff").AddItem(new MenuItem("act_debuff_" + buffname, "Anti " + buffname).SetValue(true)); } foreach (var buffname in BuffnamesExtendet) { defensivemenu.SubMenu("act_debuff").AddItem(new MenuItem("act_debuff_" + buffname, "Anti " + buffname).SetValue(true)); } var offensivemenu = new Menu("厌恶的物品ㄧ", "act_offensiveItem"); var onhitmenu = new Menu("OnHit Items", "act_onhitItem"); ItemManager.AddSupMenu(defensivemenu, offensivemenu, onhitmenu); tempMenu.AddSubMenu(defensivemenu); tempMenu.AddSubMenu(offensivemenu); tempMenu.AddSubMenu(onhitmenu); }
public PotionManager fullPotion() { PotionManager pm = null; pm = new PotionManager("Full Potion", "full_potion", "This Potion Restores ALL HP To The User!", 0, 0, 0, 0, PotionBace.PotionTypes.HP, 0); return(pm); }
public HttpResponseMessage GetGrid() { try { var pManager = new PotionManager(); var potions = pManager.GetAllPotions(); Mapper.CreateMap <Potions, PotionResponse>().ForMember(dest => dest.Color, opt => opt.MapFrom(src => src.navColor.Name)).ForMember(dest => dest.Effect, opt => opt.MapFrom(src => src.navEffect.Name)); var response = Mapper.Map <List <Potions>, List <PotionResponse> >(potions); var responseMessage = new PotionResponseMessage { page = "1", records = response.Count.ToString(CultureInfo.InvariantCulture), total = 1, rows = new PotionResponse[response.Count] }; for (var i = 0; i < response.Count; i++) { responseMessage.rows[i] = response[i]; } return(Request.CreateResponse(HttpStatusCode.OK, responseMessage)); } catch (Exception exception) { return(Request.CreateResponse(HttpStatusCode.InternalServerError, exception.Message)); } }
public void StartGame() { if (GameObject.Find("PotionManager") != null) { potionMngr = GameObject.Find("PotionManager").GetComponent <PotionManager>(); potionMngr.Reset(); } SceneManager.LoadScene("PotionCreation"); }
public HttpResponseMessage Get() { var pManager = new PotionManager(); var effect = pManager.GetAllEffects(); Mapper.CreateMap <Effect, EffectResponseMessage>(); List <EffectResponseMessage> response = Mapper.Map <List <Effect>, List <EffectResponseMessage> >(effect); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public HttpResponseMessage Get() { var pManager = new PotionManager(); var colors = pManager.GetAllColors(); Mapper.CreateMap <Color, ColorResponseMessage>(); List <ColorResponseMessage> response = Mapper.Map <List <Color>, List <ColorResponseMessage> >(colors); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { DestroyImmediate(gameObject); } }
void SetUpEvents() { Cleanser.OnLoad(); PotionManager.OnLoad(Menu); ItemManager.OnLoad(Menu); Game.OnGameUpdate += Game_OnGameUpdate; Orbwalking.AfterAttack += OrbwalkingAfterAttack; AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser; Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget; Drawing.OnDraw += Drawing_OnDraw; }
public HttpResponseMessage Post(PotionRecipieRequestMessage requestMessage) { try { var pManager = new PotionManager(); var potionrecipies = pManager.GetPotionRecipes(n => n.PotionRecipieIngredientList == requestMessage.PotionRecipieIngredientList && n.MoodID == requestMessage.MoodID); Mapper.CreateMap <PotionRecipes, PotionRecipieResponseMessage>().ForMember(dest => dest.Effect, opt => opt.MapFrom(src => src.navEffect.Name)); PotionRecipieResponseMessage response = Mapper.Map <PotionRecipes, PotionRecipieResponseMessage>(potionrecipies); return(Request.CreateResponse(HttpStatusCode.OK, response)); } catch (Exception exception) { return(Request.CreateResponse(HttpStatusCode.InternalServerError, exception.Message)); } }
static void SetUpEvents() { Cleanser.OnLoad(); PotionManager.OnLoad(Menu); ItemManager.OnLoad(Menu); Game.OnUpdate += Game_OnGameUpdate; Orbwalking.AfterAttack += OrbwalkingAfterAttack; AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser; Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget; Stealth.OnStealth += Stealth_OnStealth; Drawing.OnDraw += Drawing_OnDraw; Obj_AI_Hero.OnPlayAnimation += Obj_AI_Hero_OnPlayAnimation; GameObject.OnCreate += GameObject_OnCreate; }
// Use this for initialization void Start() { players.Add(player1); players.Add(player2); countdownTimer = 120.0f; restartButton.enabled = false; restartButton.gameObject.SetActive(false); restartButton.onClick.AddListener(reloadMenu); quitButton.enabled = false; quitButton.gameObject.SetActive(false); quitButton.onClick.AddListener(quitGame); pMngr = GameObject.Find("PotionManager").GetComponent <PotionManager>(); pMngr.Modify(player1, pMngr.GenerateEffects(pMngr.p1_potions)); pMngr.Modify(player2, pMngr.GenerateEffects(pMngr.p2_potions)); }
//public GameObject SwordRayo; // Use this for initialization void Start() { PM = FindObjectOfType <PotionManager> (); PS = FindObjectOfType <PlayerStats> (); gold = FindObjectOfType <GoldManager> (); //hover.SetActive(false); waterIsOn = false; thunderIsON = false; weapon = GameObject.Find("sword"); anim = weapon.GetComponent <Animator> (); player = GameObject.Find("Player"); animPlayer = player.GetComponent <Animator> (); LevelOfSword = 0; //anim = weapon.GetComponent<Animator> (); DEBERÍA ARREGLARLO ALGÚN DÍA }
public HttpResponseMessage Post([FromBody] int?id) { try { var pManager = new PotionManager(); var potion = id < 0 || id == null ? new Potions { Name = "No Recipie found", Description = "No Recipie found with the id of " + id, navColor = new Color { Description = string.Empty }, navEffect = new Effect { Description = string.Empty } } : (pManager.GetPotion(n => n.PotionID == id) ?? new Potions { Name = "No Recipie found", Description = "No Recipie found with the id of " + id, navColor = new Color { Description = string.Empty }, navEffect = new Effect { Description = string.Empty } }); Mapper.CreateMap <Potions, PotionResponse>(); var response = Mapper.Map <Potions, PotionResponse>(potion); return(Request.CreateResponse(HttpStatusCode.OK, response)); } catch (Exception exception) { return(Request.CreateResponse(HttpStatusCode.InternalServerError, exception.Message)); } }
public static void OnLoad(EventArgs args) { Player = ObjectManager.Player; Config = new Menu("DZAIO", "dzaio", true); TargetSelector.AddToMenu(Config.SubMenu("Target selector")); Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking")); Game.PrintChat("<b><font color='#FF0000'>[DZAIO]</font></b><font color='#FFFFFF'> DZAIO Loaded!</font> v{0}", Assembly.GetExecutingAssembly().GetName().Version); if (ChampList.ContainsKey(Player.ChampionName)) { CurrentChampion = ChampList[Player.ChampionName].Invoke(); CurrentChampion.OnLoad(Config); CurrentChampion.SetUpSpells(); CurrentChampion.RegisterEvents(); ItemManager.OnLoad(Config); Game.PrintChat("<b><font color='#FF0000'>[DZAIO] </font></b><font color='#FFFFFF'>Loaded</font> <b><font color='#FF0000'>{0}</font></b> plugin! <font color='#FFFFFF'> Have fun! </font>", Player.ChampionName); } Game.PrintChat("<b><font color='#FF0000'>[DZAIO] </font></b><font color='#FFFFFF'>Special credits to:</font> <b><font color='#FF0000'>Hellsing</font></b>, <b><font color='#FF0000'>ChewyMoon</font></b> "); Cleanser.OnLoad(); ChatHook.OnLoad(); DebugHelper.OnLoad(); NotificationDrawing.OnLoad(); PotionManager.OnLoad(Config); Config.AddItem(new MenuItem("dzaio.hpdraw.disable", "Disable HP Bar Drawing").SetValue(false)); var aboutMenu = new Menu(Player.ChampionName + " - About", "dzaio.about"); { aboutMenu.AddItem(new MenuItem("dzaio.about.line1", "DZAIO By Asuna/DZ191")); aboutMenu.AddItem(new MenuItem("dzaio.about.line2", "v." + Assembly.GetExecutingAssembly().GetName().Version)); aboutMenu.AddItem(new MenuItem("dzaio.about.line3", " ")); aboutMenu.AddItem(new MenuItem("dzaio.about.line4", "If you liked/appreciated the assembly")); aboutMenu.AddItem(new MenuItem("dzaio.about.line5", "Feel free to donate at:")); aboutMenu.AddItem(new MenuItem("dzaio.about.line6", "*****@*****.**")); } Config.AddSubMenu(aboutMenu); Config.AddToMainMenu(); }
public ActionResult Next(int?id) { if (id < 0 || id == null) { return(Json(new Potions { Name = "No Recipie found", Description = "No Recipie found with the id of " + id, navColor = new Color { Description = string.Empty }, navEffect = new Effect { Description = string.Empty } })); } PotionManager pManager = new PotionManager(); var potion = pManager.GetPotion(n => n.PotionID == id) ?? new Potions { Name = "No Recipie found", Description = "No Recipie found with the id of " + id, navColor = new Color { Description = string.Empty }, navEffect = new Effect { Description = string.Empty } }; List <Potions> plist = new List <Potions>(); plist.Add(potion); string json = JsonConvert.SerializeObject(potion, Formatting.Indented); return(Json(json)); }
// Use this for initialization void Start() { potionManager = FindObjectOfType <PotionManager>(); degat = 4; }
private void Create() { #if DEBUG Debugger.Log(1, "Main", "Started initialization phase.\n"); #endif Rectangle window = new Rectangle(0, 0, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight); sky = new Sky(skyTex, window); yat = new Yat(yatClimbing, yatRunning, yatSmashing, yatFalling, snapEffect, window); BlockManager blockManager = new BlockManager(ground3Tex, ground2Tex, ground1Tex, ladder, window); level = new Level(blockManager, window); experience = new Experiencebar(yat, cage, xpBar, button14, new Vector2(50, window.Height - 50), new Resize(DockType.LowerLeft, new Vector2(cage.Width, cage.Height), new Vector2(25)), 0, 100, AmountType.AmountAndTotal); XPManager xpManager = new XPManager(yat, experience, xpOrb, xpEffect); MushroomFactory mgen = new MushroomFactory(mushroomSheet, fireballSheet, Mushroom.Size, level, yat, flameEffect, squashEffect, xpManager, window); CoinFactory cgen = new CoinFactory(level, yat, coin, coinEffect, window); BirdFactory bgen = new BirdFactory(level, yat, birdSheet, hawkEffect, xpManager, window); PotionManager pmanager = new PotionManager(yat, (Experiencebar)experience, new Texture2D[] { potionRed, potionGreen, potionBlue, potionYellow }, potionEffect, 20); yat.Init(level, pmanager); Plains hillzone = new Plains(ground3Tex, ground2Tex, ground1Tex, ladder, 2, 7, Rand.Next(10, 20), window); level.Init(new IFactory <ILevelObject>[] { cgen }, new IFactory <IEntity>[] { mgen, bgen }, new ITerrain[] { hillzone }); fpsCounter = new FPSCounter(new Vector2(10), new Resize(new Vector2(10)), window, button14, Color.Black); score = new Score(new Vector2(0, 10), new Resize(new Vector2(2, 0), new Vector2(0, 35)), window, button36, Color.Black); gameoverLabel = new Button(new Vector2(0, window.Height / 3), new Resize(new Vector2(2, 3), new Vector2(0, 0)), window, "Game over", button72, true, Color.Black, Color.Black, false, null, tint); mainMenuLabel = new Button(new Vector2(0, window.Height / 3 + 100), new Resize(new Vector2(2, 3), new Vector2(0, 100)), window, "Main menu", button36, true, Color.Black, Color.Red, true, new Request(0, 2, delegate() { Actions.Gameover = false; Score.Points = 0; })); soundButton = new ImageButton(new Vector2(window.Width - 50, 20), new Resize(DockType.UpperRight, new Vector2(soundLoud.Width, soundLoud.Height), new Vector2(50, 20)), new Action[] { delegate() { Settings.PlaySounds = false; MediaPlayer.IsMuted = true; }, delegate() { Settings.PlaySounds = true; MediaPlayer.IsMuted = false; } }, window, null, false, soundLoud, soundMute); playPauseButton = new ImageButton(new Vector2(window.Width - 120, 20), new Resize(DockType.UpperRight, new Vector2(pauseButton.Width, pauseButton.Height), new Vector2(120, 20)), new Request[] { new Request(1, 2), new Request(3, 2) }, window, 'P', true, pauseButton, playButton); healthbar = new Healthbar(yat, cage, healthBar, button14, new Vector2(window.Width - 200, window.Height - 50), new Resize(DockType.LowerRight, new Vector2(cage.Width, cage.Height), new Vector2(25)), Yat.health, Yat.health, AmountType.Percentage); clock = new Clock(button36, new Vector2(window.Width / 2, 75), new Resize(new Vector2(2, 0), new Vector2(0, 75)), Color.Black, window); gameplay = new Screen(1, new IButton[] { fpsCounter, score, clock, soundButton, playPauseButton, healthbar, experience }, new IObject[] { sky, level, yat }, gameplaySong, true); Button title = new Button(new Vector2(0, window.Height / 3), new Resize(new Vector2(2, 3), new Vector2(0)), window, "Yat Sprint", button72, true, Color.Black, Color.DimGray, false, null); Button play = new Button(new Vector2(0, window.Height / 3 + 100), new Resize(new Vector2(2, 3), new Vector2(0, 100)), window, "Play", button36, true, Color.Black, Color.DimGray, true, new Request(1, 1)); Button fullscreen = new Button(new Vector2(0, window.Height / 3 + 150), new Resize(new Vector2(2, 3), new Vector2(0, 150)), window, "Fullscreen", button36, true, Color.Black, Color.DimGray, true, new Request(-1, 1, delegate() { if (graphics.IsFullScreen) { graphics.PreferredBackBufferWidth = 800; graphics.PreferredBackBufferHeight = 600; graphics.ApplyChanges(); } else { graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width; graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height; graphics.ApplyChanges(); } display.UpdateWindow(new Rectangle(0, 0, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight)); Actions.ToggleFullscreen = true; })); Button exit = new Button(new Vector2(0, window.Height / 3 + 200), new Resize(new Vector2(2, 3), new Vector2(0, 200)), window, "Exit", button36, true, Color.Black, Color.DimGray, true, new Request(-1, 1, delegate() { Actions.Exitgame = true; })); Button motd = new Button(new Vector2(window.Width / 2 + 250, window.Width / 3 + 10), new Resize(new Vector2(2, 3), new Vector2(250, 25)), window, Messages[Rand.Next(Messages.Length)], button14, false, Color.Black, Color.Black, false, null); motd.SetRotation(Rand.Next(-45, -20)); titleScreen = new Screen(0, new IButton[] { fpsCounter, soundButton, title, motd, play, fullscreen, exit }, new IObject[] { sky }, mainmenuSong, true); gameover = new Screen(2, new IButton[] { fpsCounter, score, soundButton, gameoverLabel, mainMenuLabel }, new IObject[] { sky }, gameplaySong, true); Button pauseTitle = new Button(new Vector2(0, window.Height / 3), new Resize(new Vector2(2, 3), new Vector2(0)), window, "Paused", button72, true, Color.Black, Color.Black, false, null, tint); Button resumeButton = new Button(new Vector2(0, window.Height / 3 + 100), new Resize(new Vector2(2, 3), new Vector2(0, 100)), window, "Resume", button36, true, Color.Black, Color.Gray, true, new Request(1, 2)); Button mainMenuPause = new Button(new Vector2(0, window.Height / 3 + 150), new Resize(new Vector2(2, 3), new Vector2(0, 150)), window, "Main Menu", button36, true, Color.Black, Color.Gray, true, new Request(0, 2)); paused = new Screen(3, new IButton[] { fpsCounter, score, soundButton, playPauseButton, pauseTitle, resumeButton, mainMenuPause }, new IObject[] { sky }, gameplaySong, false); display = new Display(); display.Add(gameplay); display.Add(titleScreen); display.Add(gameover); display.Add(paused); MediaPlayer.Play(mainmenuSong); #if DEBUG Debugger.Log(1, "Main", "Finished initialization phase.\n"); #endif }
// Use this for initialization void Start() { StartCoroutine("die"); degat = 3; potionManager = FindObjectOfType <PotionManager>(); }
void Start() { armourManager = GetComponent<ArmourManager> (); potionManager = GetComponent<PotionManager> (); scrollManager = GetComponent<ScrollManager> (); armourManager.Start (); potionManager.Start (); scrollManager.Start (); CreateItems (); PrintAllItems (); }
public void Start() { pm = GameObject.Find("EventSystem").GetComponent <PotionManager>(); StartCoroutine(Spawner()); }
private void Start() { potionMngr = GameObject.Find("PotionManager").GetComponent <PotionManager>(); potionMngr.ingredientButtons.Add(this.gameObject); currentPlayer = 1; }