public void set_Animation(Animation_Name_Enum Animation) { Ani_Index = 0; Ani_Step = 0; Ani_Current = Navi_resources.Get_Animation(Animation); Current_Animation = Animation; }
private void initialiseNaviClient(Client peer, Navi_Name_ID NaviID, ulong NAVIEXEID) { NetNavi_Type navi = Navi_resources.Get_Data(NaviID, NAVIEXEID); navi.Initialised = true; navi.Program_Step = NaviData.Host_Navi.Program_Step; NaviData.Client_Navi[peer.Name] = navi; }
private void addPeer(string name, Client peer) { peer.Name = name; peers.Add(name, peer); ++peerCount; if (!NaviData.Client_Navi.ContainsKey(peer.Name)) { NaviData.Client_Navi.Add(peer.Name, Navi_resources.Get_Data(Navi_Name_ID.Junker, 0)); //adds blank to fill later } Console.WriteLine("Peer " + name + " successfully added"); }
public bool DoEvents() { Handle_UI(); Physics_Timer.Stop(); // doesn't actually stop the timer, just updates it if (Physics_Rate > Physics_Timer.ElapsedTime) { Thread.Sleep((int)(Physics_Rate - Physics_Timer.ElapsedTime) + 1); } if (Physics_Timer.ElapsedTime > Physics_Rate) //if (Advance_Physics == true) { //Advance_Physics = false; if (!Net.NetworkHold) { Random_Stuff(); Process_Navi_Commands(); Update_Physics(); Navi_resources.Set_Correct_Animation(ref Host_Navi); Host_Navi.Update_Sprite(); Host_Navi.ShootCharge += 1; Host_Navi.Program_Step++; Physics_Timer.Start(); } Net.NetworkHold = true; Net.DoNetworkEvents(); } Render_Timer.Stop(); if (Render_Timer.ElapsedTime > Render_Rate) { Draw_Navi(); //Advance_Physics = true; Render_Timer.Start(); } return(Term); }
public Navi_Main(int Navi_Name_ID, ulong NAVIEXEID) { Host_Navi = Navi_resources.Get_Data((Navi_Name_ID)Navi_Name_ID, NAVIEXEID); }