コード例 #1
0
        public void WorldmapChapterChanged(Data_Chapter chapter)
        {
            // Update lord map sprite location
            Lord_Sprite.loc     = chapter.World_Map_Loc;
            Lord_Sprite.texture = Scene_Map.get_team_map_sprite(
                Constants.Team.PLAYER_TEAM,
                Global.game_actors[chapter.World_Map_Lord_Id].map_sprite_name);

            if (Lord_Sprite.texture != null)
            {
                Lord_Sprite.offset = new Vector2(
                    (Lord_Sprite.texture.Width / Lord_Sprite.frame_count) / 2,
                    (Lord_Sprite.texture.Height / Lord_Sprite.facing_count) - 8);
            }

            SetTargetLoc(chapter.World_Map_Loc -
                         Constants.WorldMap.WORLDMAP_MAP_SPRITE_OFFSET);
        }
コード例 #2
0
 public Texture2D get_team_map_sprite(int team, string name)
 {
     return(Scene_Map.get_team_map_sprite(team, name));
 }
コード例 #3
0
        protected void set_images()
        {
            Game_Actor actor = unit.actor;

            // Face
            set_face(unit);
            // Map Sprite
            Map_Sprite.texture = Scene_Map.get_team_map_sprite(unit.team, unit.map_sprite_name);
            if (Map_Sprite.texture != null)
            {
                Map_Sprite.offset = new Vector2(
                    (Map_Sprite.texture.Width / Map_Sprite.frame_count) / 2,
                    (Map_Sprite.texture.Height / Map_Sprite.facing_count) - 8);
            }
            Map_Sprite.mirrored = unit.has_flipped_map_sprite;
            // Lives

            //Debug
            Blocked_Help_Indices.Remove("Lives");
            if (Global.game_system.Style != Mode_Styles.Casual || !unit.lives_visible)
            {
                Blocked_Help_Indices.Add("Lives");
            }

            // Rescue_Icon
            Rescue_Icon.visible = unit.is_rescued;
            if (unit.is_rescued)
            {
                Rescue_Icon.src_rect = new Rectangle(
                    (Global.game_map.units[unit.rescued].team - 1) *
                    (Rescue_Icon.texture.Width / Constants.Team.NUM_TEAMS),
                    0,
                    Rescue_Icon.texture.Width / Constants.Team.NUM_TEAMS,
                    Rescue_Icon.texture.Height);
            }
            // Pages
            foreach (Status_Page status_page in Pages)
            {
                status_page.set_images(unit);
            }

            // Refresh UI nodes
            foreach (StatusUINode node in TopPanelNodes)
            {
                node.refresh(unit);
            }

            // Get page UI nodes
            StatusNodes   = new List <UINodeSet <StatusUINode> >();
            StatusCursors = new List <UICursor <StatusUINode> >();
            for (int i = 0; i < Pages.Count; i++)
            {
                var page_nodes = Pages[i].node_union(TopPanelNodes);
                StatusNodes.Add(new UINodeSet <StatusUINode>(page_nodes));

                var cursor = new UICursor <StatusUINode>(StatusNodes.Last());
                cursor.draw_offset = new Vector2(-14, 0);
                cursor.hide_when_using_mouse(false);
                StatusCursors.Add(cursor);
            }
        }