Beispiel #1
0
        internal static bool InvokeDraw(SpriteBatch spriteBatch, string type)
        {
            switch (type)
            {
            case "":
                Raptor.Draw(spriteBatch);
                break;

            case "Interface":
                Raptor.DrawInterface(spriteBatch);
                break;

            case "PlayerChat":
                Raptor.DrawPlayerChat(spriteBatch);
                return(true);
            }

            if (Draw[type] != null)
            {
                var args = new DrawEventArgs(spriteBatch);
                Draw[type](null, args);
                return(args.Handled);
            }
            return(false);
        }
Beispiel #2
0
 public async Task Insert(Raptor raptor)
 {
     using (SqlConnection connection = new SqlConnection(_cs))
     {
         var query = @"Insert into dbo.Raptor (Name, Anno) VALUES(@Name, @Anno)";
         await connection.QueryAsync(query, raptor);
     }
 }
Beispiel #3
0
 public IActionResult RegisterRaptor(Raptor raptor)
 {
     if (ModelState.IsValid)
     {
         _raptorRepo.Insert(raptor);
     }
     return(RedirectToAction("Index"));
 }
Beispiel #4
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!this.CheckUse(from))
            {
                return;
            }
            Map     map = this.Map;
            Point3D loc = this.Location;

            if (from.InRange(loc, 1) || from.InLOS(this))
            {
                (this).Delete();

                Snake         snake         = new Snake();
                Mongbat       mongbat       = new Mongbat();
                SilverSerpent silverserpent = new SilverSerpent();
                Raptor        raptor        = new Raptor();
                Ballem        ballem        = new Ballem();
                FNPitchfork   fnpitchfork   = new FNPitchfork();

                switch (Utility.Random(6))
                {
                case 0:
                    snake.MoveToWorld(loc, map);
                    break;

                case 1:
                    mongbat.MoveToWorld(loc, map);
                    break;

                case 2:
                    silverserpent.MoveToWorld(loc, map);
                    break;

                case 3:
                    raptor.MoveToWorld(loc, map);
                    break;

                case 4:
                    ballem.MoveToWorld(loc, map);
                    break;

                case 5:
                    if (Utility.RandomDouble() < 0.20)
                    {
                        fnpitchfork.MoveToWorld(loc, map);
                        from.SendMessage("You find Farmer Nash's pitchfork under one of the brambles of weeds. You pick up the pitchfork and put it in your backpack.");
                        break;
                    }
                    else
                    {
                        silverserpent.MoveToWorld(loc, map);
                        break;
                    }
                }
            }
        }
Beispiel #5
0
        internal static void InvokeLoadedContent(ContentManager cm)
        {
            Raptor.LoadedContent(cm);

            if (LoadedContent != null)
            {
                LoadedContent(null, new LoadedContentEventArgs(cm));
            }
        }
Beispiel #6
0
        internal static void InvokeInitialized()
        {
            Raptor.Initialize();

            if (Initialized != null)
            {
                Initialized(null, EventArgs.Empty);
            }
        }
Beispiel #7
0
        internal static void InvokeGotData(int index, int length)
        {
            Raptor.GotData(index, length);

            if (GotData != null)
            {
                var args = new GetDataEventArgs(index, length);
                GotData(null, args);
            }
        }
Beispiel #8
0
        internal static bool InvokeUpdate(GameTime gt)
        {
            Raptor.Update();

            if (Update != null)
            {
                var args = new UpdateEventArgs(gt);
                Update(null, args);
                return(args.Handled);
            }
            return(false);
        }
Beispiel #9
0
        public Hoehle()
        {
            //Figuren definieren
            Spieler = new Spieler();

            Raptoren = new Raptor[RaptorenAnzahl];
            for (int i = 0; i < RaptorenAnzahl; i++)
            {
                Raptoren[i] = new Raptor();
            }

            Riesenfledermaeuse = new Riesenfledermaus[FledermausAnzahl];
            for (int i = 0; i < FledermausAnzahl; i++)
            {
                Riesenfledermaeuse[i] = new Riesenfledermaus();
            }

            WumpusFigur = new Spielfiguren.Wumpus();

            //Alle Figuren der Liste Figuren hinzufügen
            Figuren = new List <Figur>()
            {
                WumpusFigur,
                Spieler
            };

            Figuren.AddRange(Raptoren);
            Figuren.AddRange(Riesenfledermaeuse);

            //
            Eingang = new Position()
            {
                X = 10,
                Y = 5
            };

            //Für jede einzelne Figur soll die Position bestimmt werden
            foreach (var figur in Figuren)
            {
                if (figur is Spieler)
                {
                    figur.Position = Eingang;
                }
                else
                {
                    figur.Position.SetStartPosition(Laenge, Breite);
                }
            }
        }
Beispiel #10
0
        internal static bool InvokeGetData(int index, int length)
        {
            if (Raptor.GetData(index, length))
            {
                return(true);
            }

            if (GetData != null)
            {
                var args = new GetDataEventArgs(index, length);
                GetData(null, args);
                return(args.Handled);
            }
            return(false);
        }
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     ai                    = animator.GetComponent <Raptor>();
     perception            = animator.GetComponent <Perception>();
     rigidbody             = animator.GetComponent <Rigidbody2D>();
     movementSpeed         = ai.movementSpeed;
     movementSpeed        *= Random.Range(0.8f, 1.2f);
     transform             = animator.transform;
     groundLayer           = ai.groundLayer;
     wallLayer             = ai.wallLayer;
     platformLayer         = ai.platformLayer;
     smallJumpHeight       = ai.smallJumpHeight;
     largeJumpHeight       = ai.largeJumpHeight;
     jumpDetectionDistance = ai.wallDetectionDistance;
 }
Beispiel #12
0
        public ITSBooster(string craftDirectory, DVector2 position, DVector2 velocity, double propellantMass = 6078138)
            : base(craftDirectory, position, velocity, propellantMass, "Textures/itsBooster.png")
        {
            StageOffset = new DVector2(0, 61);

            Engines = new IEngine[42];

            for (int i = 0; i < 42; i++)
            {
                double engineOffsetX = (i - 21.0) / 21.0;

                var offset = new DVector2(engineOffsetX * Width * 0.38, Height * 0.45);

                Engines[i] = new Raptor(i, this, offset);
            }
        }
Beispiel #13
0
        public ITSShip(string craftDirectory, DVector2 position, DVector2 velocity, double propellantMass = 1769010)
            : base(craftDirectory, position, velocity, propellantMass, "Textures/itsShip.png")
        {
            Engines = new IEngine[9];

            // Raptor Vac engines
            for (int i = 0; i < 6; i++)
            {
                double engineOffsetX = (i - 2.5) / 2.5;

                var offset = new DVector2(engineOffsetX * Width * 0.2, Height * 0.45);

                Engines[i] = new RaptorVac(i, this, offset);
            }

            // Raptor SL engines
            Engines[6] = new Raptor(6, this, new DVector2(-2, Height * 0.45));
            Engines[7] = new Raptor(7, this, new DVector2(0, Height * 0.45));
            Engines[8] = new Raptor(8, this, new DVector2(2, Height * 0.45));
        }
Beispiel #14
0
        internal static void InvokeNewText(string text, byte r, byte g, byte b)
        {
            if ((r | g | b) == 0)
            {
                r = g = b = 255;
            }

            if (NewText != null)
            {
                var args = new NewTextEventArgs(new Color(r, g, b), text);
                NewText(null, args);

                if (!args.Handled)
                {
                    Raptor.NewText(text, r, g, b);
                }
            }
            else
            {
                Raptor.NewText(text, r, g, b);
            }
        }
Beispiel #15
0
 public void Create(out ICreature obj) => obj = new Raptor();
Beispiel #16
0
 void Awake()
 {
     inputMngr = GetComponent <InputManager>();
     raptor    = GetComponentInChildren <Raptor>();
 }
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     ai         = animator.GetComponent <Raptor>();
     perception = animator.GetComponent <Perception>();
     Attack(animator);
 }