public Emitter(Vector2 pos,DebugFlag flag) { this.debugFlag = flag; this.stringBuilder = new StringBuilder(); this.particelPerUpdate = Vector2.Zero; this.ParticelStayOnMax = Vector2.Zero; this.bewegung = new BewegungsHandler(); this.ParticelLifeTime = Vector2.Zero; this.ParticelLifeDrain = Vector2.Zero; this.EmitterAngel = new List<Vector2>() { Vector2.Zero }; this.EmitterRange = Vector2.Zero; this.EmitterTexture = null; this.Position = pos; this.ParticelSize = Vector2.Zero; this.ParticelTexture = new List<Texture2D>(); this.particels = new List<Particel>(); this.PerticelPower = Vector2.Zero; this.ParticelSize = Vector2.Zero; this.r = new Random(); this.color = null; this.EmitterMaxParticel = 0f; this.EmitterUpdate = 0f; // this.Origin = new Vector2(this.EmitterTexture.Width / 2, this.EmitterTexture.Height / 2); this.bewegungsprofil = Bewegungsprofile.Linear; this.go = false; }
public Backgroundmanager(Player player, Backgrounddatabase backgrounddatabase, DebugFlag flag ,Contents contents) { this.Backgrounddatabase = backgrounddatabase; this.debugFlag = flag; this.stringBuilder = new StringBuilder(); this.Contents = contents; this.Player = player; }
public Windowmanager(Settings settings, Cursor mouse,DebugFlag flag, Contents contents, GraphicsDevice graphicsDevice) { this.debugFlag = flag; this.stringBuilder = new StringBuilder(); this.Settings = settings; this.Mouse = mouse; this.Contents = contents; this.windowBatch = new SpriteBatch(graphicsDevice); }
//Initialisieren des Tastaturobjekts und der Tasten public Keymanager(Contents contents,DebugFlag flag) { this.debugFlag = flag; this.stringBuilder = new StringBuilder(); this.Contents = contents; Tastatur = new KeyboardState(); TastenMenü(); //TastenSpiel(); }
public Objectmanager(Objectdatabase objektdatenbank, Animationsmanager animationsmanager, Player player, DebugFlag flag) { this.debugFlag = flag; this.stringBuilder = new StringBuilder(); this.Objektdatenbank = objektdatenbank; this.Animationsmanager = animationsmanager; this.Player = player; Player.Objectmanager = this; }
//爆風のダメージ計算 public void BlastDamage(Vector3 blastCenter) { Collider[] colliders = Physics.OverlapSphere(blastCenter, _blastRadius); for (int i = 0; i < colliders.Length; i++) { if (colliders[i].attachedRigidbody != null) { GameObject colliderParent = colliders[i].attachedRigidbody.gameObject; var ship = colliderParent.GetComponent <FuelTank>(); if (colliderParent == null) { return; } if (ship != null) { Vector3 playerPos = colliders[i].ClosestPoint(blastCenter); float distance = Vector3.Distance(blastCenter, playerPos); float blastDamage = (_blastRadius - distance) / _blastRadius * _maxDamage; ship.DecrementFuel(blastDamage); if (DebugFlag.IsDebug()) { Debug.Log("爆風ダメージ = " + blastDamage + colliderParent.name); } } else if (ship == null) { return; } } } }
void Awake(){ _instance = this; }
public void DrawExtraDebug(DebugFlag extraFlag, SpriteBatch batch, Camera cam, Contents content) { batch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, cam.ViewMatrix); batch.Draw(EmitterTexture, Position, null, Color.White, 0, this.Origin, 1.0f, SpriteEffects.None, 1f); foreach (Vector2 v in EmitterAngel) { drawPartCircel(50, v.X, v.Y, Position, batch, content.Pixel); } drawLine(Position, new Vector2(Position.X + EmitterRange.X, 0 + Position.Y), content.Pixel, 1, batch); drawLine(Position, new Vector2(Position.X - EmitterRange.X, 0 + Position.Y), content.Pixel, 1, batch); drawLine(Position, new Vector2(Position.X, Position.Y + EmitterRange.Y), content.Pixel, 1, batch); drawLine(Position, new Vector2(Position.X, Position.Y - EmitterRange.Y), content.Pixel, 1, batch); batch.End(); }
public void SetFlag(DebugFlag flag, bool on) { flags[flag] = on; }
public bool Flag(DebugFlag flag) { return(flags[flag]); }
public Player(Mathe mathe, Contents contents, World world, DebugFlag flag) { this.Mathe = mathe; debugFlag = flag; this.stringBuilder = new StringBuilder(); this.Contents = contents; PositionCurrent = new Vector2(0, 715); Texturen[0] = contents.Player1; Texturen[1] = contents.Player2; Texturen[2] = contents.Player3; Texturen[3] = contents.Player4; Texturen[4] = contents.Player5; Texturen[5] = contents.Player6; Animation = new Animation(Texturen[0], true, 1, new Rectangle(0, 0, 200, 200), 1, 6); Blickrichtung = Richtung.Rechts; Playerstate = Playerstates.Idle; MaxSpeed = new Vector2(6, 12); Beschleunigung = new Vector2(0.25f, 0.60f); Initialgeschwindigkeit = new Vector2(2.0f, 5.5f); Reibung = 0.35f; Gravitation = 0.40f; jumpCounter = 0; jumpCounterMax = 11; jumpCooldown = 0; jumpCooldownBase = 20; Ground = 715; Groundcollision = true; body = BodyFactory.CreateRectangle(world, 50, 50, 1.0f, PositionCurrent); }
public void DrawExtraDebug(DebugFlag extraFlag,SpriteBatch batch,Camera cam,Contents content) { batch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, cam.ViewMatrix); batch.DrawString(content.Meiryo8, "Test Extra Debug", new Vector2(100, 200) -new Vector2(this.PositionCurrent.X,0), Color.White); batch.End(); }
public static void SetDebugFlag(DebugFlag flag, bool value) { _enumMap[flag].Value = value; }
public void DrawExtraDebug(DebugFlag extraFlag,SpriteBatch batch, Camera cam, Contents content) { batch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, cam.ViewMatrix); foreach (Object Object in ObjectsSpielebene) { if ((extraFlag & DebugFlag.CollisonShape) == DebugFlag.CollisonShape) { batch.Draw(content.Block, new Rectangle((int)614, (int)Player.PositionCurrent.Y+47, 61, 153), Color.Blue*0.5f ); if (Object.Objektvariante.Kollision != null) { foreach (Objectcollision Kollision in Object.Objektvariante.Kollision) { batch.Draw(content.Block, new Rectangle((int)(Object.PositionCurrent.X + (Kollision.Zone.X * Object.Skalierung) - Player.PositionCurrent.X), (int)(Object.PositionCurrent.Y + (Kollision.Zone.Y * Object.Skalierung)), (int)((float)Kollision.Zone.Width * Object.Skalierung), (int)((float)Kollision.Zone.Height * Object.Skalierung)), Color.Yellow); batch.DrawString(content.Meiryo8, Kollision.Zone.ToString(), new Vector2(Object.PositionCurrent.X + Kollision.Zone.X - Player.PositionCurrent.X, Object.PositionCurrent.Y + Kollision.Zone.Y + 40), Color.Red); } } } if ((extraFlag & DebugFlag.ObjectInformation) == DebugFlag.ObjectInformation) { batch.DrawString(content.Meiryo8, "Typ: " + Object.Typ.ToString() + " Variante: " + Object.Variante.ToString(), new Vector2(Object.PositionCurrent.X - Player.PositionCurrent.X, Object.PositionCurrent.Y), Color.Red); batch.DrawString(content.Meiryo8, "Skalierung: " + Object.Skalierung.ToString(), new Vector2(Object.PositionCurrent.X - Player.PositionCurrent.X, Object.PositionCurrent.Y + 10), Color.Red); batch.DrawString(content.Meiryo8, Object.PositionCurrent.ToString(), new Vector2(Object.PositionCurrent.X - Player.PositionCurrent.X, Object.PositionCurrent.Y + 20), Color.Red); batch.DrawString(content.Meiryo8, Object.Objektvariante.Texturausschnitt.ToString(), new Vector2(Object.PositionCurrent.X - Player.PositionCurrent.X, Object.PositionCurrent.Y + 30), Color.Red); batch.DrawString(content.Meiryo8, "Layer: " + Object.Layer.ToString(), new Vector2(Object.PositionCurrent.X - Player.PositionCurrent.X, Object.PositionCurrent.Y + 40), Color.Red); } } batch.End(); }
public static void Log(DebugFlag label, FastString msg, DebugColor colorType = DebugColor.White) { s_Debug.Log(label, msg, colorType); FastString.Release(msg); }
public static void Assert(DebugFlag label, bool flag, FastString msg) { s_Debug.Assert(label, flag, msg); FastString.Release(msg); }
public static void Error(DebugFlag label, FastString msg) { s_Debug.Error(label, msg); FastString.Release(msg); }
public static void Warn(DebugFlag label, FastString msg) { s_Debug.Warn(label, msg); FastString.Release(msg); }
public void DrawExtraDebug(DebugFlag extraFlag, SpriteBatch batch, Camera cam, Contents content) { }
public static bool GetDebugFlag(DebugFlag flag) { return(_enumMap[flag].Value); }