Esempio n. 1
0
        private void AddParticle()
        {
            //出口の粒子
            int tileSize = (int)MapDef.TILE_SIZE;

            for (int i = 0; i < 1; i++)
            {
                Vector3 position = new Vector3(
                    map.EndPoint.X * tileSize,
                    0,
                    map.EndPoint.Y * tileSize);
                position += new Vector3(
                    gameDevice.Random.Next(-tileSize * 45, tileSize * 45 + 1) / 100.0f,
                    0,
                    gameDevice.Random.Next(-tileSize * 45, tileSize * 45 + 1) / 100.0f);
                position.Y = tileSize / 2;
                pManager.AddParticle(new TransportParticle(position, stageManager.ConstactColor(), gameDevice));
            }

            //以下は浮遊粒子
            if (!stageManager.UseParticle())
            {
                return;
            }

            if (pManager.Count() < 1500)
            {
                for (int i = 0; i < 20; i++)
                {
                    Vector3 position = characterManager.GetPlayer().GetPosition;
                    position += new Vector3(
                        gameDevice.Random.Next(-30000, 30001) / 100.0f,
                        0,
                        gameDevice.Random.Next(-30000, 30001) / 100.0f);
                    position.Y = tileSize / 2;
                    pManager.AddParticle(new SphereParticle(position, stageManager.ConstactColor(), gameDevice));
                }
            }
        }
Esempio n. 2
0
        private void AddSphereParticle()
        {
            if (!stageManager.UseParticle())
            {
                return;
            }

            float tileSize = MapDef.TILE_SIZE;

            if (pManager.Count() < 1500)
            {
                for (int i = 0; i < 30; i++)
                {
                    Vector3 position = characterManager.GetPlayer().GetPosition;
                    position += new Vector3(
                        gameDevice.Random.Next(-30000, 30001) / 100.0f,
                        gameDevice.Random.Next(-30000, 30001) / 100.0f,
                        gameDevice.Random.Next(-30000, 30001) / 100.0f);
                    position.Y = 0;
                    pManager.AddParticle(new SphereParticle(position, stageManager.ConstactColor(), gameDevice));
                }
            }
        }