Esempio n. 1
0
        public static void UpdatePaxes()
        {
            if (MainGame.UpdateReactionCommand)
            {
                if (MainGame.ReactionCommand == null)
                {
                    PAXCaster.FinishPAX(@"Content\Effects\Visual\" + MainGame.TriangleType[MainGame.triangleType] + @"\Triangle.dae");
                }
                else
                {
                    PAXCaster.RunPAX(@"Content\Effects\Visual\" + MainGame.TriangleType[MainGame.triangleType] + @"\Triangle.dae", MainGame.DoModel, MainGame.DoBone, MainGame.DoVector);
                }

                MainGame.UpdateReactionCommand = false;
            }
            BulleSpeecher.UpdateBubbles();

            for (int i = 0; i < PAX_Instances.Count; i++)
            {
                PAX px = PAX_Instances[i];
                //px.Output();
                if (!px.Finished)
                {
                    px.Update();
                }
            }
        }
Esempio n. 2
0
        public static void DrawPaxes(GraphicsDeviceManager gcm, AlphaTestEffect at, BasicEffect be, RasterizerState rs, RasterizerState rsNoCull)
        {
            var old_depth = gcm.GraphicsDevice.DepthStencilState;
            var old_rast  = gcm.GraphicsDevice.RasterizerState;


            BulleSpeecher.DrawBubbles(gcm, at, be, rs, rsNoCull);
            for (int i = 0; i < PAX_Instances.Count; i++)
            {
                PAX px = PAX_Instances[i];
                if (!px.Finished)
                {
                    px.Draw(gcm, at, be, rs, rsNoCull);
                }
            }
            gcm.GraphicsDevice.DepthStencilState = old_depth;
            gcm.GraphicsDevice.RasterizerState   = old_rast;
        }
Esempio n. 3
0
        /*public static void ResetPAX(string name)
         * {
         *  for (int i = 0; i < PAX_InstancesNames.Count; i++)
         *  {
         *      if (PAX_InstancesNames[i] == name && !PAX_Instances[i].Finising)
         *      {
         *          PAX_Instances[i].Reset();
         *      }
         *  }
         * }*/

        public static void RunPAX(string name, Model on, int bone, Vector3 offset)
        {
            if (Directory.Exists(name + @"\p0"))
            {
                for (int i = 0; i < 10; i++)
                {
                    if (Directory.Exists(name + @"\p" + i.ToString()))
                    {
                        PAXCaster.RunPAX(name + @"\p" + i.ToString() + @"\p" + i.ToString() + ".dae", on, bone, offset);
                    }
                }
                return;
            }
            PAX px    = null;
            int index = -1;

            for (int i = 0; i < PAX_InstancesNames.Count; i++)
            {
                if (PAX_InstancesNames[i] == name && PAX_Instances[i].Finished)
                {
                    index = i;
                    PAX_Instances[i].Reset();
                    px = PAX_Instances[i];
                    break;
                }
            }
            if (index < 0)
            {
                px = new PAX(name);
                PAX_Instances.Add(px);
                PAX_InstancesNames.Add(name);
            }
            px.Finished = false;
            px.On       = on;
            px.OnBone   = bone;
            px.Offset   = offset;

            px.Update();
        }