Ejemplo n.º 1
0
        //@Override
        public override void UpdateObjects(GameTime gameTime)
        {
            base.UpdateObjects(gameTime);
            lock (particularObjects){
                for (int id = 0; id < particularObjects.Count; id++)
                {
                    ParticularObject obj = particularObjects[id];

                    if (obj.isObjectOutOfCameraView() || obj.getState() == GameObject.MainState.DEATH)
                    {
                        particularObjects.RemoveAt(id);
                        //System.out.println("Remove");
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public virtual void UpdateObjects(GameTime gameTime)
        {
            lock (particularObjects){
                for (int id = 0; id < particularObjects.Count; id++)
                {
                    ParticularObject obj = particularObjects[id];


                    if (!obj.isObjectOutOfCameraView())
                    {
                        obj.Update(gameTime);
                    }

                    if (obj.getState() == GameObject.MainState.DEATH)
                    {
                        particularObjects.RemoveAt(id);
                    }
                }
            }

            //System.out.println("Camerawidth  = "+camera.getWidth());
        }