Beispiel #1
0
        protected override void NewPlayfieldLoaded(DefaultPlayfield playfield)
        {
            base.NewPlayfieldLoaded(playfield);

            hitboxCheckbox.Current     = ((TestPlayfield)playfield).ShowHitbox;
            deathSpotsCheckbox.Current = ((TestPlayfield)playfield).ShowDeath;
            godCheckbox.Current        = ((TestPlayfield)playfield).GodMode;
        }
Beispiel #2
0
    static void DrawPlayfieldArea(DefaultPlayfield playfield, GizmoType gizmoType)
    {
        Gizmos.color = Color.red;
        Rect rect = playfield.WorldPlayArea;

        for (float x = rect.xMin; x <= rect.xMax; x += 1.0f)
        {
            Gizmos.DrawLine(new Vector3(x, rect.yMax, 0.0f), new Vector3(x, rect.yMin, 0.0f));
        }

        for (float y = rect.yMin; y <= rect.yMax; y += 1.0f)
        {
            Gizmos.DrawLine(new Vector3(rect.xMin, y, 0.0f), new Vector3(rect.xMax, y, 0.0f));
        }
    }