本文整理汇总了C#中RenderManager.AddHandlers方法的典型用法代码示例。如果您正苦于以下问题:C# RenderManager.AddHandlers方法的具体用法?C# RenderManager.AddHandlers怎么用?C# RenderManager.AddHandlers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderManager
的用法示例。
在下文中一共展示了RenderManager.AddHandlers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VentanaJuego
public VentanaJuego()
{
InitializeComponent();
//this.Width = w;
//this.Height = h;
//pictureBox1.Width = w ;
//pictureBox1.Height = h;
//----------Manager--------------------//
F_M = new FileManager();
R_M = new RenderManager();
S_M = new SceneManager();
PM = new PhisicManager();
//--------Delegados-------------------//
S_H = new SceneHandler(S_M.PlayScene);
R_H = new RenderHandler(R_M.AddData);
F_H = new FileHandler(F_M.GetImg);
//---------Inicializacion------------//
R_M.AddHandlers(S_H, F_H);
//mapa1.SetFileManager(F_H);
mapa1 = F_M.CargarMapa("../../Mapas/mapa3.xml", this.Width, this.Height, 32);
mapa1.IM.left = Keys.A;
mapa1.IM.right = Keys.D;
mapa1.IM.up = Keys.W;
mapa1.IM.down = Keys.S;
mapa1.Draw(R_H);
R_M.Sorting();
//--------Timer--------------------//
//Thread mov = new Thread(Caminar);
//Thread col = new Thread(Colicion);
//mov.Start();
timer1.Start();
//col.Start();
mapa1.FraccPantalla(pictureBox1.Width, pictureBox1.Height);
mapa1.CentrarJugador();
//----------Sonido------------------//
//mp = new MP3Player();
//mp.Open(F_M.GetAud_Path("Correr"));
//mp.Play();
pictureBox1.Refresh();
}
示例2: MakeMap
//, AddElemento ae)
public MakeMap(FileHandler fh, List<Elemento> herr, CreateMap cm)
{
InitializeComponent();
//
Matriz = new List<Elemento>();
temMap = new Map("", 0, 0, (int)width.Value, (int)height.Value, trackBar1.Maximum);
S_M = new SceneManager();
R_M = new RenderManager();
R_M.AddHandlers(new SceneHandler(S_M.PlayScene), fh);
F_H = fh;
temMap.SetFileManager(fh);
CrearMatriz((int)height.Value,(int)width.Value,trackBar1.Value,1);
temMap.Draw(new RenderHandler(R_M.AddData));
R_M.Fondo = Color.White;
temp = new List<Elemento>();
Herramienta = herr;
pm = new PhisicManager();
C_M = cm;
}