📄 word.cs
字号:
using System;
using System.Collections;
using System.Drawing;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectDraw;
namespace SpaceWar {
/// <summary>
/// Creates words from the letter vectors and draws complete words.
/// </summary>
public class Word {
string word;
ArrayList letters = new ArrayList();
public Word(string word, float scale) {
this.word = word;
foreach (char c in word) {
Letter letter = new Letter(c);
letter.SetLetter(scale);
letters.Add(letter);
}
}
public void Draw(Surface surface, int color, int step, Point location) {
foreach (Letter letter in letters) {
letter.Draw(surface, color, location);
location.X += step;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -