/// <summary> /// place un block si ni a rien /// </summary> /// <param name="joueur"></param> /// <param name="bx"></param> /// <param name="by"></param> /// <param name="block"></param> /// <param name="entite"></param> /// <param name="monde"></param> /// <returns></returns> public override Tuple <bool, Tuple <Ecrans, object> > CliqueDroite(Joueur joueur, int bx, int by, Block block, Entite entite, Monde monde) { if (block == null && entite == null) { monde.SetBlock(bx, by, this.block.Clone()); Item it = Clone(); it.Quantite = 1; joueur.EnleverItem(it); return(new Tuple <bool, Tuple <Ecrans, object> >(false, null)); } return(new Tuple <bool, Tuple <Ecrans, object> >(true, null)); }
/// <summary> /// met le schema dans le monde</br> /// cree accessoirement les chunk non cree en mode non generer /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="monde"></param> public void AppliquerSchema(int x, int y, Monde monde) { foreach (string block in blocks.Keys) { string[] s = block.Split('/'); monde.SetBlock(x + int.Parse(s[0]), y + int.Parse(s[1]), blocks[block]); } foreach (Entite ent in entites) { Entite t = ent.Clone(); t.Tp(t.X + x, t.Y + y); monde.Entites.Add(t); } }