Inheritance: MonoBehaviour
Exemplo n.º 1
0
 protected virtual Engine MakeEngines()
 {
     simRoot        = new Engine();
     simRoot.Name   = "magicmirror.simroot";
     physics        = new Physics();
     physics.Name   = "magicmirrot.physics";
     physics.Active = false;
     simRoot.Append(physics);
     scriptor      = new Scriptor();
     scriptor.Name = "magicmirror.scriptor";
     simRoot.Append(scriptor);
     cameraController      = new Transformer();
     cameraController.Name = "magicmirror.camera.xform";
     simRoot.Append(cameraController);
     if (!SuppressNavigation)
     {
         navigator = new Flyer();
         if (typeof(Flyer).IsAssignableFrom(navigator.GetType()))
         {
             navigator.DegreesOfFreedom = Flyer.Y_ROT | Flyer.X_TRANS | Flyer.Y_TRANS | Flyer.Z_TRANS;
             navigator.Speed            = 15.0f;
         }
         else
         {
             navigator.Speed      = 0.1f;
             navigator.TurnSpeed *= 0.05f;
         }
         navigator.Name = "magicmirror.navigator";
         navigator.SetFlags((uint)SharedObj.DOEVENTS);
         cameraController.Append(navigator);
     }
     return(simRoot);
 }
Exemplo n.º 2
0
        //Sigh, were on a taxi so we need todo dirty shit
        public override void OnTick()
        {
            while (!IsDone)
            {
                ObjectManager.Update();

                if (!Me.OnTaxi)
                {
                    Logging.Write("Not on taxi");
                    Flyer.Interact();
                    GossipFrame.Instance.SelectGossipOption(0);
                }
                else if (Bomb.Cooldown > 0)
                {
                }
                else if (!IsObjectiveComplete(1, (uint)QuestId) && GatewayMurketh != null)
                {
                    Logging.Write("GatewayMurketh");
                    Bomb.Use();
                    SpellManager.ClickRemoteLocation(GatewayMurketh.Location);
                }
                else if (!IsObjectiveComplete(2, (uint)QuestId) && GatewayShaadraz != null)
                {
                    Logging.Write("GatewayShaadraz");
                    Bomb.Use();
                    SpellManager.ClickRemoteLocation(GatewayShaadraz.Location);
                }
                else if (IsObjectiveComplete(2, (uint)QuestId) && IsObjectiveComplete(1, (uint)QuestId))
                {
                    _isBehaviorDone = true;
                }
            }
        }
Exemplo n.º 3
0
        public IActionResult Create(string flyerCategory)
        {
            var flyerCate  = _flyerCategoryRepository.GetByCondition(c => c.Name == flyerCategory).FirstOrDefault();
            var linkFlyers = Helper.FlyerLink.GetLink(flyerCategory);

            foreach (var link in linkFlyers)
            {
                var merchantCode = Helper.FlyerLink.MerchantCode(link);
                var merchant     = _merchantRepository.GetByCondition(m => m.MerchantCode == merchantCode).FirstOrDefault();
                if (merchant == null)
                {
                    merchant = new Merchant {
                        MerchantCode = merchantCode
                    };
                    _merchantRepository.Add(merchant);
                }
                var flyer = new Flyer
                {
                    Url             = link,
                    FlyerCategoryId = flyerCate.Id,
                    FlyerCategory   = flyerCate,
                    MerchantId      = merchant.Id,
                    Merchant        = merchant,
                    IsActive        = true
                };
                if (!_flyerRepository.IsExist(f => f.Url == link))
                {
                    _flyerRepository.Add(flyer);
                }
            }
            return(RedirectToAction("Index"));
        }
Exemplo n.º 4
0
    public FlyerReturningState(FlyerFSM stateMachine, Flyer flyer)
    {
        _stateMachine = stateMachine;
        _flyer        = flyer;

        _movement = flyer.Movement;
    }
Exemplo n.º 5
0
        private void SetResult(Boolean result, String message)
        {
            var isBackgroundCheck = Request.ParseCheckboxValue("backgroundcheck") ?? false;

            if (isBackgroundCheck)
            {
                var checkoutResult = new CheckoutResult
                {
                    Result  = result,
                    Message = message
                };

                Helper.RespondWithJsonObject(checkoutResult, Response);
            }
            else
            {
                if (result)
                {
                    var order = Flyer.ToOrder();

                    order.Save();
                    WizardFlyer.DeleteFlyer();
                    Response.SuppressContent = true;
                    Response.Redirect("~/cart.aspx?orderid=" + order.order_id.ToString());
                }
                else
                {
                    throw new Exception(message);
                }
            }
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            Bird myBird = new Bird("Bird_name", 5, "Lithuania", 20, "White", true);

            myBird.PrintBird();

            Console.WriteLine();

            Animal animal = new Animal("Vilkas", 10, "Lithuania");

            animal.PrintAnimal();

            Vehicle vehicle = new Vehicle(150, 4);

            vehicle.ChangeWheel(4);
            vehicle.Move();

            Console.WriteLine("Flyer");
            Flyer flyer = new Flyer(250, 10, 250);

            flyer.Move();
            flyer.ChangeWheel(2);
            flyer.PichUp(50);
            Console.WriteLine($"Altitude:  {flyer.Altitude}");
        }
Exemplo n.º 7
0
    public FlyerHitState(FlyerFSM stateMachine, Flyer flyer)
    {
        _stateMachine = stateMachine;

        _receiveHit = flyer.ReceiveHit;
        _hitVolume  = flyer.HitVolume;
    }
Exemplo n.º 8
0
 private void Initialize()
 {
     container.Inject(this);
     health = GetComponent <Health>();
     flyer  = GetComponent <Flyer>();
     anim   = GetComponent <Animator>();
 }
Exemplo n.º 9
0
        public override void SetSessionData(Boolean isInitial)
        {
            InitFields(Profile);

            if (!isInitial)
            {
                var          propertiesDict = Flyer.GetType().GetProperties().Where(p => p.PropertyType == typeof(Boolean)).ToDictionary(p => p.Name, p => p);
                PropertyInfo pi;
                Boolean?     @bool;

                foreach (String key in Request.Form)
                {
                    if (propertiesDict.ContainsKey(key))
                    {
                        pi    = propertiesDict[key];
                        @bool = Request.ParseCheckboxValue(key);

                        if (@bool.HasValue)
                        {
                            pi.SetValue(Flyer, @bool.Value, null);
                        }
                    }
                }

                Flyer.AmenitiesStepCompleted = true;
            }
        }
Exemplo n.º 10
0
        public ActionResult Create(ImageFlyer model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            //Verificar si hay una imagen https://www.youtube.com/watch?v=XtjoCuE_J48

            var pic    = string.Empty;
            var folder = "~/Content/img";

            if (model.ImageFile == null)
            {
                return(View(model));
            }

            pic = FilesHelper.UploadPhoto(model.ImageFile, folder);
            pic = string.Format("{0}/{1}", folder, pic);

            using (var db = new DataBasesSGCEntities())
            {
                Flyer oFlyer = new Flyer();
                oFlyer.description = model.Description;
                oFlyer.name        = model.Name;
                oFlyer.imagen      = model.Imagen;
                oFlyer.imagen      = pic;

                db.Flyer.Add(oFlyer);
                db.SaveChanges();
            }

            return(Redirect(Url.Content("~/Flyer/Index")));
        }
Exemplo n.º 11
0
    public FlyerIdleState(FlyerFSM stateMachine, Flyer flyer)
    {
        _stateMachine = stateMachine;
        _flyer        = flyer;

        _playerInRange = flyer.PlayerDetector.PlayerInRange;
    }
Exemplo n.º 12
0
 void Go_Harder()
 {
     Walker.Level_Up(1.1f);
     Flyer.Level_Up(1.1f);
     generate_walker_interval /= 1.1f;
     generate_flyer_interval  /= 1.1f;
 }
Exemplo n.º 13
0
        public ActionResult DeleteConfirmed(int id)
        {
            Flyer flyer = db.Flyer.Find(id);

            db.Flyer.Remove(flyer);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 14
0
    public FlyerChasingState(FlyerFSM stateMachine, Flyer flyer)
    {
        _stateMachine = stateMachine;
        _flyer        = flyer;

        _playerInRange = flyer.PlayerDetector.PlayerInRange;
        _movement      = flyer.Movement;
    }
Exemplo n.º 15
0
 private static void missTower()
 {
     if (++missCount == 10)
     {
         Flyer.die();
         Spawn.die(true);
     }
 }
Exemplo n.º 16
0
        //
        // GET: /AdminFlyer/Edit/5

        public ActionResult Edit(int id)
        {
            Flyer flyer = db.FlyerSet.First(f => f.flyerId == id);

            ViewData["Promote"]  = db.PromoteSet.ToList();
            ViewData["Merchant"] = db.MerchantSet.ToList();
            ViewData["Category"] = db.CategorySet.ToList();
            return(View(flyer));
        }
Exemplo n.º 17
0
        public ActionResult Save(Flyer model)
        {
            var flyer = fr.GetById(model.Id);

            flyer.IsPubblicato = model.IsPubblicato;
            flyer.Titolo       = model.Titolo;
            flyer.Descrizione  = model.Descrizione;
            fr.Save(flyer);
            return(View("Edit", model));
        }
Exemplo n.º 18
0
 public ActionResult Edit([Bind(Include = "flyerID,firstName,lastName,email,phone,flyerSince")] Flyer flyer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(flyer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(flyer));
 }
Exemplo n.º 19
0
 public ActionResult Delete(DeleteFlyerModel model)
 {
     using (var db = new DataBasesSGCEntities())
     {
         Flyer oFlyer = db.Flyer.Find(model.Id);
         db.Flyer.Remove(oFlyer);
         db.SaveChanges();
     }
     return(Redirect(Url.Content("~/Flyer/Index")));
 }
Exemplo n.º 20
0
 private void Awake()
 {
     _flyer      = GetComponent <Flyer>();
     _receiveHit = _flyer.ReceiveHit;
     // states
     IdleState      = new FlyerIdleState(this, _flyer);
     ChasingState   = new FlyerChasingState(this, _flyer);
     ReturningState = new FlyerReturningState(this, _flyer);
     HitState       = new FlyerHitState(this, _flyer);
 }
Exemplo n.º 21
0
 public static void ToggleViaggio(Flyer flyer, Viaggio viaggio)
 {
     if (flyer.Viaggi.Any(v => v.Id == viaggio.Id))
     {
         flyer.Viaggi.Remove(viaggio);
     }
     else
     {
         flyer.Viaggi.Add(viaggio);
     }
 }
Exemplo n.º 22
0
        public ActionResult Create([Bind(Include = "flyerID,firstName,lastName,email,phone,flyerSince")] Flyer flyer)
        {
            if (ModelState.IsValid)
            {
                db.Flyer.Add(flyer);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(flyer));
        }
Exemplo n.º 23
0
    public Flyer Generate_Flyer()
    {
        int        rand          = Random.Range(0, dens_pos.Count);
        GameObject prf           = Resources.Load("Prefabs/Flyer") as GameObject;
        GameObject new_flyer_obj = Instantiate(prf) as GameObject;

        new_flyer_obj.transform.position = dens_pos[rand];
        Flyer new_flyer = new Flyer(new_flyer_obj);

        flyers.Add(new_flyer);
        return(new_flyer);
    }
Exemplo n.º 24
0
        private void Update(Evento aux_evento)
        {
            if (evento != null)
            {
                Flyer flyer_aux = ctx.Flyers.Where(x => x.IdEvento == evento.Id).FirstOrDefault();
                local = ctx.Locals.Where(x => x.Id == 3).FirstOrDefault();

                flyer.Flyer1 = flyer_aux.Flyer1;

                string selectPoblacion = ctx.Direccions.Where(x => x.Id == evento.IdDireccion).Select(x => x.Población).ToString();
                selectedDireccion = ctx.Direccions.Where(x => x.Población == selectPoblacion).FirstOrDefault();
            }
        }
Exemplo n.º 25
0
        public ActionResult Create(int id)
        {
            var agency = ar.GetById(id);
            var model  = new Flyer
            {
                Titolo       = string.Format("Nuovo Flyer {0}", fr.GetFlyersPerAgenzia(id).Count + 1),
                Descrizione  = string.Format("Nuovo Flyer di {0}", agency.Nome),
                Agenzia      = agency,
                IsPubblicato = false
            };

            fr.Save(model);
            return(RedirectToAction("Edit", new { id = model.Id }));
        }
Exemplo n.º 26
0
        // GET: Flyers/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Flyer flyer = db.Flyer.Find(id);

            if (flyer == null)
            {
                return(HttpNotFound());
            }
            return(View(flyer));
        }
Exemplo n.º 27
0
        protected void Create()
        {
            if (!gameObject.activeSelf || !enabled)
            {
                return;
            }

            foreach (var createInfo in createInfos)
            {
                if (!createInfo.enable)
                {
                    continue;
                }
                switch (createInfo._personType)
                {
                case PersonType.Boner:
                    Boner.GetInstance(createInfo.position);
                    break;

                case PersonType.Player:
                    if (GlobalVar.UsePlayerCachePos)
                    {
                        Sworder.GetInstance(DefaultData.PlayerPos);
                    }
                    else
                    {
                        Sworder.GetInstance(createInfo.position);
                        GlobalVar.UsePlayerCachePos = true;
                    }
                    break;

                case PersonType.Spider:
                    Spider.GetInstance(createInfo.position);
                    break;

                case PersonType.Boss:
                    AngryBall.GetInstance(createInfo.position);
                    break;

                case PersonType.Defender:
                    Defender.GetInstance(createInfo.position);
                    break;

                case PersonType.Flyer:
                    Flyer.GetInstance(createInfo.position);
                    break;
                }
            }
        }
Exemplo n.º 28
0
        //
        // GET: /AdminFlyer/Delete/5
        public ActionResult Delete(int id, FormCollection collection)
        {
            Flyer flyer = db.FlyerSet.FirstOrDefault(f => f.flyerId == id);

            try
            {
                db.DeleteObject(flyer);
                db.SaveChanges();

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View("Error"));
            }
        }
Exemplo n.º 29
0
    public void GetHurt(int launchDirection, int hitPower)
    {
        //Hit the enemy, causing a damage effect, and decreasing health. Allows for requiring a downward pound attack
        if ((GetComponent <Walker>() != null || GetComponent <Flyer>() != null) && !recoveryCounter.recovering)
        {
            if (!requirePoundAttack || (requirePoundAttack && NewPlayer.Instance.pounding))
            {
                NewPlayer.Instance.cameraEffects.Shake(100, 1);
                health -= hitPower;
                animator.SetTrigger("hurt");

                audioSource.pitch = (1);
                audioSource.PlayOneShot(hitSound);

                //Ensure the enemy and also the player cannot engage in hitting each other for the max recoveryTime for each
                recoveryCounter.counter = 0;
                NewPlayer.Instance.recoveryCounter.counter = 0;

                if (NewPlayer.Instance.pounding)
                {
                    NewPlayer.Instance.PoundEffect();
                }


                //The Walker being launched after getting hit is a little different than the Flyer getting launched by a hit.
                if (GetComponent <Walker>() != null)
                {
                    Walker walker = GetComponent <Walker>();
                    walker.launch          = launchDirection * walker.hurtLaunchPower / 5;
                    walker.velocity.y      = walker.hurtLaunchPower;
                    walker.directionSmooth = launchDirection;
                    walker.direction       = walker.directionSmooth;
                }

                if (GetComponent <Flyer>() != null)
                {
                    Flyer flyer = GetComponent <Flyer>();
                    flyer.speedEased.x = launchDirection * 5;
                    flyer.speedEased.y = 4;
                    flyer.speed.x      = flyer.speedEased.x;
                    flyer.speed.y      = flyer.speedEased.y;
                }

                NewPlayer.Instance.FreezeFrameEffect();
            }
        }
    }
Exemplo n.º 30
0
        private void SetInputs()
        {
            var propertiesDict = Flyer.GetType().GetProperties().Where(p => p.PropertyType == typeof(Boolean)).ToDictionary(p => p.Name, p => p);
            HtmlInputCheckBox checkbox;
            PropertyInfo      pi;

            foreach (Control control in form.Controls)
            {
                checkbox = control as HtmlInputCheckBox;

                if (checkbox != null && propertiesDict.ContainsKey(checkbox.Attributes["data-clientname"]))
                {
                    pi = propertiesDict[checkbox.Attributes["data-clientname"]];
                    checkbox.Checked = (Boolean)pi.GetValue(Flyer, null);
                }
            }
        }
Exemplo n.º 31
0
    // Use this for initialization
    void Start()
    {
        GameObjects = getObjectsByMaterialName("distanceLerp");

        if (EnableEchoLocation)
        {
            Character = GetComponent<Flyer>();
            //Character.m_Block = true; //singleton!!! handig

            Microfoon = new MicIn(this, MicrophoneSensitivity);
        }

        fading = true;

        //if (!Blocking)
        //    Character.m_Block = false;
    }