Beispiel #1
0
 public void CreateObstacle(int id, string texture, int x, int y, string tag)
 {
     try {
         var M = KMaps[id];
         var L = M.Layers[Layers[id]];
         var O = new KthuraObject("Obstacle", L);
         O.x        = x;
         O.y        = y;
         O.Tag      = tag;
         O.Texture  = texture;
         O.Visible  = true;
         O.Alpha255 = 255;
         O.R        = 255;
         O.G        = 255;
         O.B        = 255;
         L.RemapTags();
     } catch (Exception Afgang) {
         SBubble.MyError($"CreateObstacle({id},\"{texture}\",{x},{y},\"{tag}\"):", Afgang.Message, LuaTrace);
     }
 }
Beispiel #2
0
 public void Kill(int ID, string Tag)
 {
     try {
         KthuraObject Victim = null;
         foreach (KthuraObject Obj in KMaps[ID].Layers[Layers[ID]].Objects)
         {
             if (Obj.Tag == Tag)
             {
                 Victim = Obj;
             }
         }
         if (Victim == null)
         {
             return;
         }
         KMaps[ID].Layers[Layers[ID]].Objects.Remove(Victim);
         if (AutoRemap[ID])
         {
             TotalRemap(ID);
         }
     } catch (Exception Disasteriffic) {
         SBubble.MyError($"Kthura.Kill({ID},{Tag}):", Disasteriffic.Message, $"Layer: {Layers[ID]}\n\n{SBubble.TraceLua(statename)}");
     }
 }
 public override bool HasTexture(KthuraObject obj) => false;
 public override void DrawTiledArea(KthuraObject obj, int ix = 0, int iy = 0, int scrollx = 0, int scrolly = 0)
 {
 }
 public override void DrawPic(KthuraObject obj, int ix = 0, int iy = 0, int scrollx = 0, int scrolly = 0)
 {
 }
 public override void AnimReset(KthuraObject obj)
 {
 }
 public override int ObjectWidth(KthuraObject obj) => 0;
 public override int ObjectHeight(KthuraObject obj) => 0;