Exemplo n.º 1
0
        public override void RightClick(int i, int j)
        {
            Tile tile = Main.tile[i, j];
            int  left = i - (tile.frameX / 18);
            int  top  = j - (tile.frameY / 18);

            int index = mod.GetTileEntity <TEScoreBoard>().Find(left, top);

            if (index == -1)
            {
                return;
            }
            Main.NewText("Scores:");
            TEScoreBoard tEScoreBoard = (TEScoreBoard)TileEntity.ByID[index];

            foreach (var item in tEScoreBoard.scores)
            {
                Main.NewText(item.Key + ": " + item.Value);
            }
        }
Exemplo n.º 2
0
        public override bool NewRightClick(int i, int j)
        {
            Tile tile = Main.tile[i, j];
            int  left = i - tile.frameX / 18;
            int  top  = j - tile.frameY / 18;

            int index = GetInstance <TEScoreBoard>().Find(left, top);

            if (index == -1)
            {
                return(false);
            }
            Main.NewText("Scores:");
            TEScoreBoard tEScoreBoard = (TEScoreBoard)TileEntity.ByID[index];

            foreach (var item in tEScoreBoard.scores)
            {
                Main.NewText(item.Key + ": " + item.Value);
            }
            return(true);
        }