using Otter;
using Puppyups.entities;
using Puppyups.UI;

class Global
{
    public static Game GAME = null;
    public static Session PlayerSession;
    public static Session Player2Session;

    public static Player Player = null;
    public static Player2 Player2 = null;

    public const int MW = 720;
    public const int MH = 480;

    public const int GRID_WIDTH = 32;
    public const int GRID_HEIGHT = 32;

    public static float PlayerX = 0.0f;
    public static float PlayerY = 0.0f;
    public static int PlayerHealth = 10;
    public static Speed PlayerSpeed = new Speed(200);//lets try 200

    public static float Player2X = 0.0f;
    public static float Player2Y = 0.0f;
    public static int Player2Health = 10;
    public static Speed Player2Speed = new Speed(200);//make the final version of player2 slightly faster than 1 so she :) can catch up to him easily.

    public static bool IsTwoPlayerActive = false;
    public static bool IsPlayer1GunCollected = false;
    public static bool IsPlayer2GunCollected = false;

    public static float GrappleX = 0;
    public static float Grapple2X = 0;
    public static float GrappleY = 0;
    public static float Grapple2Y = 0;

    public static float dogSpeed = .1f;
    public static int Player1DogsCollected = 0;
    public static int Player2DogsCollected = 0;
    public static int DogsLeft = 0;
    //rings
    public static int Player1SilverRingsCollected = 0;
    public static int Player1GoldRingsCollected = 0;
    public static int Player1PlatRingsCollected = 0;
    public static int Player2SilverRingsCollected = 0;
    public static int Player2GoldRingsCollected = 0;
    public static int Player2PlatRingsCollected = 0;
    //score
    public static long score = 0;
    public static long score2 = 0;

    public enum Type
    {
        PLAYER,
        PLAYER2,
        SOLID,
        NUMBERS,
        PLANT,
        DOG,
        GRAPPLE,
        GRAPPLE2,
        CHAIN,
        LABGUN,
        LABGUN2,
        SMOGMONSTER
    }

    public static void WriteWord(float x, float y, string word, Color color, float scale, int layer, Scene scene)
    {
        var a = 0;
        for (var i = 0; i < word.Length; i++)
        {
            scene.Add(new Numbers(x + a, y, word[i].ToString(), color, scale, layer));
            a += 10;
        }
    }
}

