Beispiel #1
0
 public ChessMan(string Name, TurnPlay SoHuu, Statue TrangThai, Color clrText)
 {
     this.Name      = Name;
     this.SoHuu     = SoHuu;
     this.TrangThai = TrangThai;
     this.clrText   = clrText;
 }
        public IHttpActionResult PutStatue(int id, Statue statue)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != statue.Id)
            {
                return(BadRequest());
            }

            db.Entry(statue).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!StatueExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Beispiel #3
0
 public override void Initialize()
 {
     Statue = DarkestDungeonManager.Campaign.Estate.Statue;
     for (int i = 0; i < audioEntries.Count; i++)
     {
         audioEntries[i].UpdateCondition();
     }
 }
        public ActionResult DeleteConfirmed(int id)
        {
            Statue statue = db.Statues.Find(id);

            db.Statues.Remove(statue);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,Name")] Statue statue)
 {
     if (ModelState.IsValid)
     {
         db.Entry(statue).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(statue));
 }
Beispiel #6
0
    /// <summary>
    /// Triggers player leaning off statue and returning to idle
    /// </summary>
    void OnPlayerLeanCancelled()
    {
        this.inputVector = Vector3.zero;
        this.UpdateAnimator("StopLeaning");
        this.StartCoroutine(this.WaitForAnimationEnd("PlayerStopsLeaningAnimation"));

        this.statue.PlayerDisingaged();
        this.statue = null;
        this.rigidbody.constraints = RigidbodyConstraints.FreezeRotation;
    }
Beispiel #7
0
    void Attack()
    {
        //Bruh
        //Checks all colliders in circle of radius size 1f right now
        Collider2D[] colliders = Physics2D.OverlapCircleAll(
            new Vector2(transform.position.x + .5f * (controller.movement.facingRight? 1f : -1f), transform.position.y), .25f);

        bool somethingHit = false;

        SoundFXManager.instance.PlaySound("FX", "Woosh", false, .4f, .7f);

        for (int rep = 0; rep < colliders.Length; rep++)
        {
            EnemyHP hpComponent = colliders[rep].GetComponent <EnemyHP>();



            if (hpComponent != null)
            {
                hpComponent.TakeDamage(0);
                somethingHit = true;
            }

            EnemyMeleeBehavior  meleeBehavior  = colliders[rep].GetComponent <EnemyMeleeBehavior>();
            EnemyRangedBehavior rangedBehavior = colliders[rep].GetComponent <EnemyRangedBehavior>();

            if (meleeBehavior != null)
            {
                meleeBehavior.AddToVelocity(12f * (controller.movement.facingRight? Vector3.right : Vector3.left));
                somethingHit = true;
            }

            if (rangedBehavior != null)
            {
                rangedBehavior.AddToVelocity(12f * (controller.movement.facingRight? Vector3.right : Vector3.left));
                somethingHit = true;
            }

            Statue statue = colliders[rep].GetComponent <Statue>();

            if (statue != null)
            {
                statue.Break();
                somethingHit = true;
            }
        }

        if (somethingHit)
        {
            CameraFollow.INSTANCE.ShakeScreen(1f);
            SoundFXManager.instance.PlaySound("FX", "Shove");
        }

        CameraFollow.INSTANCE.ShakeScreen(.3f);
    }
        public ActionResult Create([Bind(Include = "ID,Name")] Statue statue)
        {
            if (ModelState.IsValid)
            {
                db.Statues.Add(statue);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(statue));
        }
        public IHttpActionResult GetStatue(int id)
        {
            Statue statue = db.Statue.Find(id);

            if (statue == null)
            {
                return(NotFound());
            }

            return(Ok(statue));
        }
Beispiel #10
0
    void SetVumark()
    {
        Statue s = Query(vb.VuMarkTarget.InstanceId.ToString());               //vb.VuMarkTarget.InstanceId.ToString());

        Debug.Log(s.name);
        name.GetComponent <TextMesh> ().text = s.name;
        name.transform.localPosition         = setPos(s.namePos);
        name.transform.localRotation         = setRot(s.namePos);
        name.transform.localScale            = setScale(s.namePos);
        SetSpecial(s.s);
    }
        public IHttpActionResult PostStatue(Statue statue)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.Statue.Add(statue);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = statue.Id }, statue));
        }
Beispiel #12
0
        public override bool IsActive(int timeOut)
        {
            NetDebuger.PrintDebugMessage(this, "STATE:" + Statue.ToString());

            //会话超时,而且当前状态或者未登陆
            if (!base.IsActive(timeOut) && (Statue == FtpSessionStatue.Wait || Statue == FtpSessionStatue.NotLogin))
            {
                return(false);
            }

            return(true);
        }
Beispiel #13
0
    public Estate(SaveCampaignData saveData)
    {
        RosterIds = new List <int>();
        for (int i = 1; i < 100; i++)
        {
            RosterIds.Add(i);
        }

        EstateTitle = saveData.HamletTitle;

        Currencies = new Dictionary <string, int>();
        Currencies.Add("gold", saveData.GoldAmount);
        Currencies.Add("bust", saveData.BustsAmount);
        Currencies.Add("deed", saveData.DeedsAmount);
        Currencies.Add("portrait", saveData.PortraitsAmount);
        Currencies.Add("crest", saveData.CrestsAmount);

        HeroPurchases = saveData.InstancedPurchases;
        TownPurchases = saveData.BuildingUpgrades;

        Buildings = new Dictionary <BuildingType, Building>();
        Abbey     = DarkestDungeonManager.Data.Buildings["abbey"] as Abbey;
        Buildings.Add(BuildingType.Abbey, Abbey);
        Tavern = DarkestDungeonManager.Data.Buildings["tavern"] as Tavern;
        Buildings.Add(BuildingType.Tavern, Tavern);
        Sanitarium = DarkestDungeonManager.Data.Buildings["sanitarium"] as Sanitarium;
        Buildings.Add(BuildingType.Sanitarium, Sanitarium);
        Blacksmith = DarkestDungeonManager.Data.Buildings["blacksmith"] as Blacksmith;
        Buildings.Add(BuildingType.Blacksmith, Blacksmith);
        Guild = DarkestDungeonManager.Data.Buildings["guild"] as Guild;
        Buildings.Add(BuildingType.Guild, Guild);
        NomadWagon = DarkestDungeonManager.Data.Buildings["nomad_wagon"] as NomadWagon;
        Buildings.Add(BuildingType.NomadWagon, NomadWagon);
        StageCoach = DarkestDungeonManager.Data.Buildings["stage_coach"] as StageCoach;
        Buildings.Add(BuildingType.StageCoach, StageCoach);
        CampingTrainer = DarkestDungeonManager.Data.Buildings["camping_trainer"] as CampingTrainer;
        Buildings.Add(BuildingType.CampingTrainer, CampingTrainer);
        Graveyard = new Graveyard();
        Buildings.Add(BuildingType.Graveyard, Graveyard);
        Statue = new Statue();
        Buildings.Add(BuildingType.Statue, Statue);

        Abbey.InitializeBuilding(TownPurchases);
        Tavern.InitializeBuilding(TownPurchases);
        Sanitarium.InitializeBuilding(TownPurchases);
        Blacksmith.InitializeBuilding(TownPurchases);
        Guild.InitializeBuilding(TownPurchases);
        CampingTrainer.InitializeBuilding(TownPurchases);
        NomadWagon.InitializeBuilding(TownPurchases);
        StageCoach.InitializeBuilding(TownPurchases);
        Graveyard.Records.AddRange(saveData.DeathRecords);
    }
Beispiel #14
0
    void HeavyAttack()
    {
        Collider2D[] colliders = Physics2D.OverlapBoxAll(
            new Vector2(transform.position.x + .75f * (controller.movement.facingRight? 1f : -1f), transform.position.y), new Vector2(1f, .7f), 0f);

        SoundFXManager.instance.PlaySound("FX", "Woosh", false, .5f, .5f);

        bool somethingHit = false;

        for (int rep = 0; rep < colliders.Length; rep++)
        {
            EnemyHP hpComponent = colliders[rep].GetComponent <EnemyHP>();

            if (hpComponent != null)
            {
                hpComponent.TakeDamage(1);
                somethingHit = true;
            }

            EnemyMeleeBehavior  meleeBehavior  = colliders[rep].GetComponent <EnemyMeleeBehavior>();
            EnemyRangedBehavior rangedBehavior = colliders[rep].GetComponent <EnemyRangedBehavior>();

            if (meleeBehavior != null)
            {
                meleeBehavior.AddToVelocity(1f * (controller.movement.facingRight? Vector3.right : Vector3.left));
                somethingHit = true;
            }

            if (rangedBehavior != null)
            {
                rangedBehavior.AddToVelocity(1f * (controller.movement.facingRight? Vector3.right : Vector3.left));
                somethingHit = true;
            }

            Statue statue = colliders[rep].GetComponent <Statue>();

            if (statue != null)
            {
                statue.Break();
                somethingHit = true;
            }
        }

        if (somethingHit)
        {
            CameraFollow.INSTANCE.ShakeScreen(1f);
            SoundFXManager.instance.PlaySound("FX", "Player_Attack");
        }

        CameraFollow.INSTANCE.ShakeScreen(1f);
    }
        // GET: Statues/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index"));
            }
            Statue statue = db.Statues.Find(id);

            if (statue == null)
            {
                return(HttpNotFound());
            }
            return(View(statue));
        }
Beispiel #16
0
        // GET: Statues/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Statue statue = db.Statue.Find(id);

            if (statue == null)
            {
                return(HttpNotFound());
            }
            return(View(statue));
        }
        public IHttpActionResult DeleteStatue(int id)
        {
            Statue statue = db.Statue.Find(id);

            if (statue == null)
            {
                return(NotFound());
            }

            db.Statue.Remove(statue);
            db.SaveChanges();

            return(Ok(statue));
        }
Beispiel #18
0
    /// <summary>
    /// Returns the statue that is directly infront of the player
    /// </summary>
    /// <returns></returns>
    Statue GetStatueInfront(Vector3 direction)
    {
        Statue  statue = null;
        Vector3 origin = this.rigidbody.position;

        Debug.DrawLine(origin, origin + direction * this.rayDistance, Color.green, .25f);
        Ray        ray = new Ray(origin, direction);
        RaycastHit hit;

        if (Physics.Raycast(ray, out hit, this.rayDistance, this.statueLayer))
        {
            statue = hit.collider.GetComponent <Statue>();
            statue.UpdateInteractedFrom();
        }

        return(statue);
    }
Beispiel #19
0
        public override void Paint(Level level, Room room)
        {
            Fill(level, room, Terrain.WALL);
            Fill(level, room, 1, Terrain.EMPTY);

            var c  = room.Center();
            var cx = c.X;
            var cy = c.Y;

            var door = room.Entrance();

            door.Set(Room.Door.DoorType.LOCKED);

            level.AddItemToSpawn(new IronKey());

            if (door.X == room.Left)
            {
                Fill(level, room.Right - 1, room.Top + 1, 1, room.Height() - 1, Terrain.STATUE);
                cx = room.Right - 2;
            }
            else
            if (door.X == room.Right)
            {
                Fill(level, room.Left + 1, room.Top + 1, 1, room.Height() - 1, Terrain.STATUE);
                cx = room.Left + 2;
            }
            else
            if (door.Y == room.Top)
            {
                Fill(level, room.Left + 1, room.Bottom - 1, room.Width() - 1, 1, Terrain.STATUE);
                cy = room.Bottom - 2;
            }
            else
            if (door.Y == room.Bottom)
            {
                Fill(level, room.Left + 1, room.Top + 1, room.Width() - 1, 1, Terrain.STATUE);
                cy = room.Top + 2;
            }

            var statue = new Statue();

            statue.pos = cx + cy * Level.Width;
            level.mobs.Add(statue);
            Actor.OccupyCell(statue);
        }
        /// <summary>
        ///     Creates a product and returns it
        /// </summary>
        /// <param name="numberOfDecorations">
        ///     How many decorations to have on statue
        /// </param>
        /// <returns>
        ///     IStatue Returns a product
        /// </returns>
        public IStatue CreateProduct(int numberOfDecorations)
        {
            IStatue statue = new Statue();

            for (var i = 0; i < numberOfDecorations; i++)
            {
                var value = Client.Rnd.Next(1, 4);

                switch (value)
                {
                case 1:
                    if (CanUseDecoration(statue.GetDescription(), "jewel"))
                    {
                        var jewelDecoratedStatue = new JewelDecorator(statue);
                        statue = jewelDecoratedStatue;
                        break;
                    }
                    i--;
                    break;

                case 2:
                    if (CanUseDecoration(statue.GetDescription(), "sticker"))
                    {
                        var stickerDecoratedStatue = new StickerDecorator(statue);
                        statue = stickerDecoratedStatue;
                        break;
                    }
                    i--;
                    break;

                case 3:
                    if (CanUseDecoration(statue.GetDescription(), "color"))
                    {
                        var colorDecoratedStatue = new ColorDecorator(statue);
                        statue = colorDecoratedStatue;
                        break;
                    }
                    i--;
                    break;
                }
            }
            return(statue);
        }
Beispiel #21
0
    public Estate(SaveCampaignData saveData)
    {
        rosterIds = new List <int>();
        for (int i = 1; i < 100; i++)
        {
            rosterIds.Add(i);
        }

        EstateTitle = saveData.hamletTitle;

        Currencies = new Dictionary <string, EstateCurrency>();
        Currencies.Add("gold", new EstateCurrency(saveData.goldAmount, false));
        Currencies.Add("bust", new EstateCurrency(saveData.bustsAmount, true));
        Currencies.Add("deed", new EstateCurrency(saveData.deedsAmount, true));
        Currencies.Add("portrait", new EstateCurrency(saveData.portraitsAmount, true));
        Currencies.Add("crest", new EstateCurrency(saveData.crestsAmount, true));

        HeroPurchases = saveData.instancedPurchases;
        TownPurchases = saveData.buildingUpgrades;

        Abbey          = DarkestDungeonManager.Data.Buildings["abbey"] as Abbey;
        Tavern         = DarkestDungeonManager.Data.Buildings["tavern"] as Tavern;
        Sanitarium     = DarkestDungeonManager.Data.Buildings["sanitarium"] as Sanitarium;
        Blacksmith     = DarkestDungeonManager.Data.Buildings["blacksmith"] as Blacksmith;
        Guild          = DarkestDungeonManager.Data.Buildings["guild"] as Guild;
        NomadWagon     = DarkestDungeonManager.Data.Buildings["nomad_wagon"] as NomadWagon;
        StageCoach     = DarkestDungeonManager.Data.Buildings["stage_coach"] as StageCoach;
        CampingTrainer = DarkestDungeonManager.Data.Buildings["camping_trainer"] as CampingTrainer;
        Graveyard      = new Graveyard();
        Statue         = new Statue();
        Abbey.InitializeBuilding(TownPurchases);
        Tavern.InitializeBuilding(TownPurchases);
        Sanitarium.InitializeBuilding(TownPurchases);
        Blacksmith.InitializeBuilding(TownPurchases);
        Guild.InitializeBuilding(TownPurchases);
        CampingTrainer.InitializeBuilding(TownPurchases);
        NomadWagon.InitializeBuilding(TownPurchases);
        StageCoach.InitializeBuilding(TownPurchases);
        Graveyard.Records.AddRange(saveData.deathRecords);
    }
Beispiel #22
0
        public void ApplyStatue(Statue statue)
        {
            System.Diagnostics.Debug.WriteLine("ApplySettings");
            this.PackIcon_StatueIcon.Kind = MaterialDesignThemes.Wpf.PackIconKind.Download;

            this.Label_StatueDescription.Content = "";
            this.Label_Progress.Content          = "";
            this.Label_Speed.Content             = "";
            this.Label_Percent.Content           = "";
            this.ProgressBar_Progress.Value      = 0;

            if (statue == Statue.Download)
            {
                this.PackIcon_StatueIcon.Kind = MaterialDesignThemes.Wpf.PackIconKind.Download;
                this.Label_Statue.Content     = "下載中";
                this.Label_Speed.Visibility   = Visibility.Visible;
            }
            else if (statue == Statue.Check)
            {
                this.PackIcon_StatueIcon.Kind = MaterialDesignThemes.Wpf.PackIconKind.FileFindOutline;
                this.Label_Statue.Content     = "檢查中";
                this.Label_Speed.Visibility   = Visibility.Hidden;
            }
        }
Beispiel #23
0
 /// <summary>
 /// 设置项目信息
 /// </summary>
 /// <param name="statue">项目的状态</param>
 public SaveAttribute(Statue statue)
 {
     this.Statue = statue;
 }
Beispiel #24
0
    /// <summary>
    /// Store player inputs to trigger rotation/movement
    /// Handles player pull/push action
    /// </summary>
    void Update()
    {
        // @TODO: replace this with a game manager to determine when to disable the player
        if (this.IsDisabled || this.menu.isMenuOpened)
        {
            this.inputVector = Vector3.zero;
            return;
        }

        // Player has died, trigger death sequence
        if (this.IsDead)
        {
            this.PlayerDeath();
        }

        this.inputVector = new Vector3(
            Input.GetAxisRaw("Horizontal"),
            0f,
            Input.GetAxisRaw("Vertical")
            );

        if (this.inputVector.magnitude > 1)
        {
            this.inputVector.Normalize();
        }

        bool isActionButton = Input.GetButton("Jump") || Input.GetButton("Fire1");

        // Currently not enaged
        // Trigger animation to engage
        if (isActionButton && !this.IsInteractingWithStatue)
        {
            Statue statue = this.GetStatueInfront(this.transform.forward);

            // Player is facing a statue, let's grab it
            if (statue != null && !string.IsNullOrEmpty(statue.InteractedFrom))
            {
                this.statue = statue;
                string dirName = this.statue.InteractedFrom;

                if (dirName == "forward" || dirName == "back")
                {
                    this.rigidbody.constraints = ~RigidbodyConstraints.FreezePositionZ;
                }
                else
                {
                    this.rigidbody.constraints = ~RigidbodyConstraints.FreezePositionX;
                }

                this.OnPlayerLean();
            }
        }

        // No longer grabing the statue
        if (!isActionButton && this.IsInteractingWithStatue)
        {
            this.OnPlayerLeanCancelled();
        }

        // Updates animations
        this.UpdateAnimator();
    }
Beispiel #25
0
        public Order(Village village, string name, int quantity = 1)
        {
            id           = GetId();
            headquarters = new Headquarters();
            timberCamp   = new TimberCamp();
            clayPit      = new ClayPit();
            ironMine     = new IronMine();
            farm         = new Farm();
            warehouse    = new Warehouse();
            rallyPoint   = new RallyPoint();
            barracks     = new Barracks();
            statue       = new Statue();
            wall         = new Wall();
            hospital     = new Hospital();
            market       = new Market();
            tavern       = new Tavern();
            academy      = new Academy();
            hallOfOrders = new HallOfOrders();

            spearman      = new Spearman();
            swordsman     = new Swordsman();
            archer        = new Archer();
            heavyCavalry  = new HeavyCavalry();
            axeFighter    = new AxeFighter();
            lightCavalry  = new LightCavalry();
            mountedArcher = new MountedArcher();
            ram           = new Ram();
            catapult      = new Catapult();


            barracksInfos      = new List <PartialBarracksInfo>();
            farmInfos          = new List <PartialFarmInfo>();
            waitInfos          = new List <PartialWaitInfo>();
            barracksToDateTime = new Dictionary <int, DateTime>();
            stringToEntity     = new Dictionary <string, Entity>()
            {
                { "Headquarters", headquarters },
                { "TimberCamp", timberCamp },
                { "ClayPit", clayPit },
                { "IronMine", ironMine },
                { "Farm", farm },
                { "Warehouse", warehouse },
                { "RallyPoint", rallyPoint },
                { "Barracks", barracks },
                { "Statue", statue },
                { "Wall", wall },
                { "Hospital", hospital },
                { "Market", market },
                { "Tavern", tavern },
                { "Academy", academy },
                { "HallOfOrders", hallOfOrders },

                { "Spearman", spearman },
                { "Swordsman", swordsman },
                { "Archer", archer },
                { "HeavyCavalry", heavyCavalry },
                { "AxeFighter", axeFighter },
                { "LightCavalry", lightCavalry },
                { "MountedArcher", mountedArcher },
                { "Ram", ram },
                { "Catapult", catapult },

                { "init", null }
            };
            barracksToLimit = new Dictionary <int, int>()
            {
                { 1, 5 },
                { 2, 10 },
                { 3, 15 }
            };
            for (int i = 4; i <= 25; i++)
            {
                barracksToLimit.Add(i, int.MaxValue);
            }
            this.name     = name;
            this.quantity = quantity;
            entity        = stringToEntity[name];
            bar           = new OrderBar(this.village = village);
        }
Beispiel #26
0
 public void UpdateExplosions_statue(Statue statue)
 {
     explosion_statue.AddParticles(new Vector2(statue.position.X - Camera.X + (statue.SourceRectangle.Value.Width / 2), statue.position.Y - Camera.Y + (statue.SourceRectangle.Value.Height / 2)), statue);
 }
Beispiel #27
0
        void InitializeBehaviors()
        {
            Delegater delegater = repo.Delegater;

            /*
             * FPS
             */
            fps = new FrameRateCounter();
            delegater.Bind(Groups.FrameRate, fps);

            /*
             * Camera
             */
            DefaultCamera camera = new DefaultCamera(GraphicsDevice)
            {
                ClearColor = Color.CornflowerBlue
            };

            delegater.Bind(Groups.Camera, camera);

            /*
             * Background
             */
            // bug: spritebatch.Begin(AlphaBlend) makes sure that this quad gets drawn in the background
            // which means that some important renderstates are getting set, but not by me
            FullScreenQuad background = new FullScreenQuad()
            {
                Top       = new Color(25, 31, 32),
                Bottom    = new Color(71, 81, 90),
                DrawOrder = 0
            };

            delegater.Bind(Groups.Background, background);

            /*
             * Statue
             */
            StatueInformation statueInformation = new StatueInformation()
            {
                StatueSettings = StatueSettings[0]
            };

            delegater.Bind(Groups.Statue, statueInformation);

            Statue statue = new Statue()
            {
                DrawOrder = 2 // to fix some troubles with blobs getting viewed through the statue
            };

            delegater.Bind(Groups.Statue, statue);

            StatueMouseController statueController = new StatueMouseController();

            delegater.Bind(Groups.Statue, statueController);

            /*
             * Game Information
             */
            GameInformation gameInfo = new GameInformation()
            {
                GameMode = GameMode.Regular
            };

            delegater.Bind(Groups.GameInformation, gameInfo);

            GameInformationDisplay gameInfoDisplay = new GameInformationDisplay()
            {
                DrawOrder = 3
            };

            delegater.Bind(Groups.GameInformation, gameInfoDisplay);

            /*
             * Blob Production
             */
            DirtProducer blobProducer = new DirtProducer();

            delegater.Bind(Groups.DirtProduction, blobProducer);

            /*
             * Game State Control
             */
            GameStateController stateController = new GameStateController();

            delegater.Bind(Groups.GameStateControl, stateController);

            /*
             * Menu stuff
             */
            StatueInformation menuStatueInformation = new StatueInformation()
            {
                StatueSettings = StatueSettings[0]
            };

            delegater.Bind(Groups.MenuStatuePreview, menuStatueInformation);

            Statue menuStatue = new Statue()
            {
                DrawOrder = 2
            };

            delegater.Bind(Groups.MenuStatuePreview, menuStatue);

            StatuePreviewSpinner statueSpinner = new StatuePreviewSpinner();

            delegater.Bind(Groups.MenuStatuePreview, statueSpinner);

            MenuItemsDisplay menuItems = new MenuItemsDisplay()
            {
                DrawOrder = 3
            };

            delegater.Bind(Groups.MenuItemsDisplay, menuItems);

            /*
             * Intro
             */
            Intro intro = new Intro();

            delegater.Bind(Groups.Intro, intro);



            // omg, lousy hack.. these two lines makes sure we get to see the damn preview model in menu screen :P
            // im too tired to find the reason.. the code is such a mess already
            stateController.GameState = GameState.Playing;
            stateController.GameState = GameState.Menu;
            stateController.GameState = GameState.Intro;
        }
Beispiel #28
0
 // Start is called before the first frame update
 void Start()
 {
     Statue   = GetComponent <Statue>();
     animator = GetComponent <Animator>();
 }
Beispiel #29
0
 public StatuePiece(Statue parent)
 {
     _parent = parent;
 }
Beispiel #30
0
        // pour gerer les collisions
        public Rectangle Rectangle_Hadoken_Statue(Statue statue)
        {
            if (explosion_statue.FreeParticleCount == 2000) // lorsque freeparticulecount = 2000 le hadoken est termine
                Rectangle_Hadoken_Est_Present_Statue = true;// je reinitialise donc mon rectangle

            if (explosion_statue.FreeParticleCount < 2000 && Rectangle_Hadoken_Est_Present_Statue)
            { // j'attend une demi seconde avant de créer le rectangle pour geré la collision
                if (statue.SourceRectangle.Value.Y == 357) // haut
                    return new Rectangle((int)statue.position.X + (statue.SourceRectangle.Value.Width / 2), (int)statue.position.Y - (explosion_statue.LongueurExplosion * 28) + (statue.SourceRectangle.Value.Height / 2), 28, (explosion_statue.LongueurExplosion * 28));

                else if (statue.SourceRectangle.Value.Y == 0) // bas
                    return new Rectangle((int)statue.position.X + (statue.SourceRectangle.Value.Width / 2), (int)statue.position.Y + (statue.SourceRectangle.Value.Height / 2), 28, (explosion_statue.LongueurExplosion * 28));

                else if (statue.SourceRectangle.Value.Y == 123) // gauche
                    return new Rectangle((int)statue.position.X + (statue.SourceRectangle.Value.Width / 2) - (explosion_statue.LongueurExplosion * 28), (int)statue.position.Y + (statue.SourceRectangle.Value.Height / 2), (explosion_statue.LongueurExplosion * 28), 28);

                else // droite
                    return new Rectangle((int)statue.position.X + (statue.SourceRectangle.Value.Width / 2), (int)statue.position.Y + (statue.SourceRectangle.Value.Height / 2), (explosion_statue.LongueurExplosion * 28), 28);
            }
            else // pas de rectangle
                return new Rectangle(0, 0, 0, 0);
        }