1 registered members (AbrahamR),
717
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: [C#] AckNET
[Re: pararealist]
#444169
08/01/14 09:36
08/01/14 09:36
|
Joined: Nov 2007
Posts: 2,568 Germany, BW, Stuttgart
MasterQ32
OP
Expert
|
OP
Expert
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
|
A few minor mistakes? ent_setskin -> Entity.GetSkin = mistake. should be Entity.SetSkin ent_type -> Entity.get_Type why get_Type and not getType ? conformity.
Typo fixed. Why get_Type? Because conformity get_Type is the internal method created by C# if you use properties.
EntityType type = ent.Type;
So you don't call a function but use get_type as a read only variable.
|
|
|
Re: [C#] AckNET
[Re: MasterQ32]
#444403
08/08/14 15:59
08/08/14 15:59
|
Joined: Nov 2007
Posts: 2,568 Germany, BW, Stuttgart
MasterQ32
OP
Expert
|
OP
Expert
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
|
Added some new features! AckNET has now a Scheduler similar behaving to the Gamestudio scheduler:
private static IEnumerable<Wait> MainMethod()
{
OnTab += (s, e) => { Console.WriteLine("Pressed [TAB]"); };
MouseMode = 3;
Level.Load("");
yield return Wait.ForFrames(1);
EngineVars.SkyColor = Color.DeepSkyBlue;
var ent = new Entity("cargo.mdl", new Vector(550.0, 0.0, 0.0));
var snd = new Sound("beep.wav");
OnSpace += (s, e) => { snd.Play(100, 0); };
WindowsFormsHost host = new WindowsFormsHost(1024, 768);
var tb = new TextBox()
{
Left = 120,
Top = 120,
Width = 80,
Text = "Change me!"
};
host.Controls.Add(tb);
var btn = new Button()
{
Left = 120,
Top = 80,
Width = 80,
Height = 25,
Text = "Click me!",
};
btn.Click += (s, e) => { MessageBox.Show(tb.Text); };
host.Controls.Add(btn);
while (!(bool)KeyEsc)
{
if (ReferenceEquals(ent, EngineVars.MouseEnt))
{
ent.Pan += 1.5 * TimeStep;
}
Camera.Pan += (KeyCul - KeyCur) * TimeStep;
Graphics.DrawQuad(
host.Target,
new Vector(0, 0, 0),
null,
null,
null,
null,
100,
0);
yield return Wait.ForFrames(1);
}
}
Also i have added a WindowsFormsHosting tool that allows to host all Windows Forms controls in Gamestudio:
|
|
|
Re: [C#] AckNET
[Re: MasterQ32]
#444405
08/08/14 17:36
08/08/14 17:36
|
Joined: Dec 2011
Posts: 1,823 Netherlands
Reconnoiter
Serious User
|
Serious User
Joined: Dec 2011
Posts: 1,823
Netherlands
|
I see what you did there Leonidas . Anyway keep it up, I imagine this can be very usefull in some situations.
|
|
|
Re: [C#] AckNET
[Re: MasterQ32]
#444423
08/10/14 01:18
08/10/14 01:18
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
@MasterQ32 you might consider using a different name? Acknet was(is?) a quite popular Networkingreplacement for Gamestudio. Just to avoid nameclashes when talking about
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: [C#] AckNET
[Re: sivan]
#444435
08/10/14 16:31
08/10/14 16:31
|
Joined: Sep 2003
Posts: 9,859
FBL
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
|
|
|
|