Esempio n. 1
0
        void StartExplosion(CCNode monster, object arg2)
        {
            var particleExplosion = new CCParticleExplosion(monster.Position)
            {
                TotalParticles = 809,
                Texture        = CCTextureCache.SharedTextureCache.AddImage("textureRed.png"),
                Life           = 0.0f,
                LifeVar        = 0.708f,
                StartSize      = 40,
                StartSizeVar   = 38,
                EndSize        = 14,
                EndSizeVar     = 0,
                Angle          = 360,
                AngleVar       = 360,
                Speed          = 243,
                SpeedVar       = 1
            };

            particleExplosion.Gravity    = new CCPoint(1.15f, 1.58f);
            particleExplosion.StartColor = new CCColor4F(0.89f, 0.56f, 0.36f, 1.0f);
            particleExplosion.EndColor   = new CCColor4F(1.0f, 0.0f, 0.0f, 1.0f);

            AddChild(particleExplosion);
            particleExplosion.ResetSystem();
        }
Esempio n. 2
0
        bool HandleFunc()
        {
            explosion.ResetSystem();
            var explodo = new CCParticleExplosion(CCPoint.Zero);

            explodo.StartColor = new CCColor4F(CCColor3B.Red);
            explodo.EndColor   = new CCColor4F(CCColor3B.Black);
            //startLocation = new CCPoint(XLoc, YLoc);
            // XLoc += 10;
            /// YLoc += 10;
            explodo.Position = startLocation;

            layer.AddChild(explodo);
            return(true);
        }