示例#1
0
        public StressTest2()
        {
            CCSize s = CCDirector.SharedDirector.WinSize;

            CCLayer sublayer = new CCLayer();

            CCSprite sp1 = new CCSprite(TestResource.s_pPathSister1);
            sp1.Position = (new CCPoint(80, s.Height / 2));

            CCActionInterval move = new CCMoveBy (3, new CCPoint(350, 0));
            CCActionInterval move_ease_inout3 = new CCEaseInOut((CCActionInterval) (move.Copy()), 2.0f);
            var move_ease_inout_back3 = (CCActionInterval) move_ease_inout3.Reverse();
            CCFiniteTimeAction seq3 = CCSequence.FromActions(move_ease_inout3, move_ease_inout_back3);
            sp1.RunAction(new CCRepeatForever ((CCActionInterval) seq3));
            sublayer.AddChild(sp1, 1);

            CCParticleFire fire = new CCParticleFire();
            fire.Texture = (CCTextureCache.SharedTextureCache.AddImage("Images/fire"));
            fire.Position = (new CCPoint(80, s.Height / 2 - 50));

            var copy_seq3 = (CCActionInterval) (seq3.Copy());

            fire.RunAction(new CCRepeatForever (copy_seq3));
            sublayer.AddChild(fire, 2);

            Schedule((shouldNotLeak), 6.0f);

            AddChild(sublayer, 0, CocosNodeTestStaticLibrary.kTagSprite1);
        }
示例#2
0
        public static new CCParticleFire node()
        {
            CCParticleFire cCParticleFire = new CCParticleFire();

            if (cCParticleFire.init())
            {
                return(cCParticleFire);
            }
            return(null);
        }
示例#3
0
        public static CCParticleFire node()
        {
            CCParticleFire pRet = new CCParticleFire();

            if (pRet.init())
            {
                return(pRet);
            }
            return(null);
        }
 public static CCParticleFire node()
 {
     CCParticleFire pRet = new CCParticleFire();
     if (pRet.init())
     {
         return pRet;
     }
     return null;
 }
示例#5
0
        public override void OnEnter()
        {
            base.OnEnter();

            m_emitter = new CCParticleFire();
            m_background.AddChild(m_emitter, 10);

            m_emitter.Texture = CCTextureCache.SharedTextureCache.AddImage(TestResource.s_fire); //.pvr"];
            CCPoint p = m_emitter.Position;
            m_emitter.Position = new CCPoint(p.X, 100);

            setEmitterPosition();
        }