Example #1
0
        private int ENQUEUE_TIME = 30; /// Delay time between two actions

        #endif

        #region Constructors

        public ViewQueue(MapView mapView)
        {
            this.mapView = mapView;
            queue = new Queue<ItemQueue>();
            lastEnque = 0;
            queue.Clear();
        }
Example #2
0
        public override void DrawShadow(MapView mapView, Matrix shadow)
        {
            base.DrawShadow(mapView, shadow);

            Model m;
            m = GameResources.Inst().GetTreeModel(2);
            mapView.DrawShadow(m, worldM, shadow);
        }
Example #3
0
        public MapController(Map map, MapView mapView)
        {
            this.map = map;
            this.mapView = mapView;
            this.gm = GameMaster.Inst();

            PromptWindow.Inst().Deactive();
            MarketComponent.Inst().SetIsActive(false);
        }
Example #4
0
        public override void DrawShadow(MapView mapView, Matrix shadow)
        {
            base.DrawShadow(mapView, shadow);

            Model m = GameResources.Inst().GetTreeModel(0);

            for (int loop1 = 0; loop1 < translateM.Length; loop1++)
            {
                if (model.getTown((CorePlugin.TownPos)(loop1 / 8)).GetBuildingKind(model.GetID()) != BuildingKind.NoBuilding)
                    continue;

                mapView.DrawShadow(m, objectMatrix[loop1] * world, shadow);
            }
        }
Example #5
0
 public void Initialize(String src)
 {
     mapView = GameMaster.Inst().GetMap().GetMapView();
     tutorialList.Clear();
     LoadFromXML(src);
 }
Example #6
0
        public virtual void DrawShadow(MapView mapView, Matrix shadow)
        {
            Model m;
            Matrix tempMatrix;

            for (int loop1 = 0; loop1 < 6; loop1++)
            {
                if (townView == null || !townView[loop1].getBuildingIsBuild(model.GetID()))
                {
                    continue;
                }

                m = GetBuildingModel((TownPos)loop1, out tempMatrix);

                if (m == null)
                    continue;

                int banID = -1;
                if (model.getTown((TownPos)loop1).GetBuildingKind(model.GetID()) == BuildingKind.SourceBuilding)
                {
                    if(model.GetKind() == HexaKind.Stone)
                        banID = 1;
                    else if (model.GetKind() == HexaKind.Mountains)
                    {
                        //continue;
                    }
                }

                mapView.DrawShadow(m, tempMatrix * world, shadow, banID);
            }

            if(roadView != null)
                for (int loop1 = 0; loop1 < roadView.Length; loop1++)
                    if (model.GetRoadOwner(loop1))
                        roadView[loop1].DrawShadow(mapView, shadow);

            if(townView != null)
                for (int loop1 = 0; loop1 < roadView.Length; loop1++)
                    if (model.GetTownOwner(loop1))
                        townView[loop1].DrawShadow(mapView, shadow);
        }
Example #7
0
 public BuildingItemQueue(MapView mapView, int townID, int pos)
     : base(mapView)
 {
     this.townID = townID;
     this.pos = pos;
 }
Example #8
0
 internal void DrawShadow(MapView mapView, Matrix shadow)
 {
     if (isBuildView)
     {
         Model m = GameResources.Inst().GetRoadModel();
         mapView.DrawShadow(m, world, shadow);
     }
 }
Example #9
0
 public RoadItemQueue(MapView mapView, int roadID)
     : base(mapView)
 {
     this.roadID = roadID;
 }
Example #10
0
 public TownItemQueue(MapView mapView, int townID)
     : base(mapView)
 {
     this.townID = townID;
 }
Example #11
0
 public Map(Game game)
 {
     this.game = game;
     mapView = new MapView(this);
     mapController = new MapController(this, mapView);
 }
Example #12
0
        public override void DrawShadow(MapView mapView, Matrix shadow)
        {
            base.DrawShadow(mapView, shadow);

            Model m = GameResources.Inst().GetTreeModel(5);
            mapView.DrawShadow(m, worldM, shadow);

            if (stepherds == 0)
                return;

            m = GameResources.Inst().GetTreeModel(1);
            for (int loop1 = 0; loop1 < translateM.Length; loop1++)
            {
                if (loop1 % 3 == 0 && stepherds >= 1 ||
                   loop1 % 3 == 1 && stepherds >= 3 ||
                   loop1 % 3 == 2 && stepherds >= 2)
                {
                    mapView.DrawShadow(m, objectMatrix[loop1] * world, shadow);
                }
            }
        }
Example #13
0
 public ItemQueue(MapView mapView)
 {
     this.mapView = mapView;
 }