Esempio n. 1
0
 public void AddObject(SceneObject obj)
 {
     objects.Add(obj);
 }
Esempio n. 2
0
        private void updateGameObjectFromsceneData(int scene, GameObj go, SceneObject so)
        {
            if (so.Type == Constants.ROAD_BLOCK_T)
            {
                go.SpriteName = "road_block";
                base.ObjectManager.AddGameObject(go, so.Lane);

                int offset = lastScreenOffset;

                go.UpdatePosition(so.X + offset, LanePositionY[so.Lane] - go.W / 2);
            }
            else if (so.Type == Constants.BARRICADE)
            {
                go.SpriteName = "barricade";
                base.ObjectManager.AddGameObject(go, so.Lane);

                int offset = lastScreenOffset;

                go.UpdatePosition(so.X + offset, LanePositionY[so.Lane] - go.W / 2);
            }
        }