コード例 #1
0
ファイル: Object.cs プロジェクト: 2Light/Insomnia
 public Object(Objectdatabase objektdatenbank, Animationsmanager animationsmanager, ObjectClass typ, int variante , Vector2 position, float skalierung, int layer, Objektebene objektebene, bool statisch)
 {
     this.Statisch = statisch;
     this.MaxSpeed = new Vector2(6, 12);
     this.Typ = typ;
     this.PositionCurrent = position;
     this.Skalierung = skalierung;
     this.Layer = layer;
     this.Variante = variante;
     this.Objektvariante = objektdatenbank.Auslesen(Typ, Variante);
     if (this.Objektvariante == null) return;
     this.Objektebene = objektebene;
     this.BearbeitungsID = (int)PositionCurrent.Y + (int)Objektvariante.Bearbeitungsverschiebung.Y + (Layer * 1000);
     if (Objektvariante.Animiert == true)
     {
         Animation = new Animation(Objektvariante.Textur, Objektvariante.Wiederholen, Objektvariante.Spalten, Objektvariante.Texturausschnitt, skalierung, Objektvariante.Geschwindigkeit);
         animationsmanager.AddAnimation(Animation);
     }
 }
コード例 #2
0
ファイル: Eventaction.cs プロジェクト: 2Light/Insomnia
 //Konstruktor Editor
 //public Enemy Gegner;
 public Eventaction(Mathe mathe, Player player, Levelmanager levelmanager, Enemymanager enemymanager, DepressionHandler depressionhandler, Eventmanager eventmanager, Objectmanager objectmanager, Objectdatabase objectdatabase,BackgroundMusic musik)
 {
     this.Mathe = mathe;
     this.Player = player;
     this.Levelmanager = levelmanager;
     this.Name = levelmanager.Levels[0].Name;
     this.Enemymanager = enemymanager;
     this.DepressionHandler = depressionhandler;
     this.Eventmanager = eventmanager;
     this.Objectmanager = objectmanager;
     this.Objectdatabase = objectdatabase;
     this.Objecttyp = Objectdatabase.Auslesen(ObjectClass.Stadtdekoration);
     this.bgMusik = musik;
 }