public AssetLoad(loader l, LoadAssetsPool threadpool, Asset a)
 {
     asset   = a;
     a.load  = this;
     pool    = threadpool;
     loader_ = l;
 }
Example #2
0
            public void Cpl() // Gunners words during the fire command (third in order)
            {
                Console.WriteLine("Identified Tank, range 2000 meters");
                Console.ReadLine();
                TC babers = new TC();

                babers.fire();
                Console.WriteLine("ON THE WAY!");
                Console.ReadLine();
                WeaponSystem BB = new WeaponSystem();

                BB.shooting();
                Console.WriteLine("Target");
                Console.ReadLine();
                babers.TC2();
                Console.WriteLine("Identified");
                Console.ReadLine();
                loader cavazos = new loader();

                cavazos.LCpl();
                babers.fire();
                Console.WriteLine("ON THE WAY!");
                Console.ReadLine();
                BB.shooting();
                Console.WriteLine("Target");
                Console.ReadLine();
                babers.TC3();
                Console.WriteLine("That's All Folks come again for story time!!!");
                Console.ReadLine();
            }
Example #3
0
    // Use this for initialization
    void Awake()
    {
        DontDestroyOnLoad(this.gameObject);
        if (manager == null)
        {
            manager = this;
        }
        else
        {
            Destroy(gameObject);
        }

        LifeQutoes = new List <Mood>();
        PsyQuotes  = new List <Mood>();

        moodContainer mc = moodContainer.Load(path);

        foreach (Mood m in mc.moods)
        {
            LifeQutoes.Add(m);
        }
        foreach (Mood m in mc.ListPsy)
        {
            PsyQuotes.Add(m);
        }
    }
	void Awake ()   
	{
		inst = this;
		Common.DEBUG_MSG("go!");

		loadingbarObj.asset = new Asset(); 
		loadingbarObj.asset.source = "loadingbar.unity3d";  
		
		scenes.Add(currentSceneName, new Scene(currentSceneName, this));
	}
Example #5
0
    void Awake()
    {
        inst = this;
        Common.DEBUG_MSG("go!");

        loadingbarObj.asset        = new Asset();
        loadingbarObj.asset.source = "loadingbar.unity3d";

        scenes.Add(currentSceneName, new Scene(currentSceneName, this));
    }
	public AssetLoad(loader l, LoadAssetsPool threadpool, Asset a) {  
		asset = a;
		a.load = this;
		pool = threadpool;
		loader_ = l;
	}
 public LoadAssetsPool(loader l, int maxthread)
 {
     maxthread_ = maxthread;
     loader_    = l;
 }
 public AssetLoadTerrain(loader l, LoadAssetsPool threadpool, Asset a) :
     base(l, threadpool, a)
 {
 }
 public AssetLoadSkybox(loader l, LoadAssetsPool threadpool, Asset a) :
     base(l, threadpool, a)
 {
 }
Example #10
0
        async private void loginbtn_Click(object sender, EventArgs e)
        {
            string user;

            if (usernametxt.Text.Length == 0 || passwordtxt.Text.Length == 0)
            {
                if (usernametxt.Text.Length == 0)
                {
                    error.Text = "Please Enter the username.";
                    return;
                }
                if (passwordtxt.Text.Length == 0)
                {
                    error.Text = "Please Enter the password.";
                    return;
                }
            }
            if (usernametxt.Text.Length == 0 && passwordtxt.Text.Length == 0)
            {
                error.Text = "Please Enter the username and password.";
                return;
            }

            error.Text = "Checking for matching account credential";

            //Get the member from the api
            using (var httpClient = new HttpClient())
            {
                var response = await httpClient.GetAsync("REDACTED" + usernametxt.Text + "REDACTED");

                response.EnsureSuccessStatusCode();
                string content = await response.Content.ReadAsStringAsync();

                api pl = JsonConvert.DeserializeObject <api>(content);


                if (pl.results.Count == 0)
                {
                    error.Text = "No member found.";
                    return;
                }

                user  = usernametxt.Text;
                primG = pl.results[0].PrimaryGroup.name;
                PFP   = pl.results[0].photoUrl;
                //MessageBox.Show(pl.results[0].PrimaryGroup.name);
                //MessageBox.Show(content);
            }



            //Get the password hash from the Database
            string          pwd             = null;
            string          connetionString = null;
            MySqlConnection cnn;

            connetionString = "REDACTED";
            cnn             = new MySqlConnection(connetionString);
            try
            {
                cnn.Open();
                string query  = "REDACTED" + usernametxt.Text + "'";
                var    cmd    = new MySqlCommand(query, cnn);
                var    reader = cmd.ExecuteReader();
                while (reader.Read())
                {
                    string someStringFromColumnZero = reader.GetString(0);
                    pwd = someStringFromColumnZero;
                    //  MessageBox.Show(someStringFromColumnZero);
                }
                cnn.Close();
            }
            catch (Exception ex)
            {
                //error.Text = "Could not connect to database." + ex.ToString();
                MessageBox.Show(ex.ToString());
                return;
            }



            string orignalpass = null;

            orignalpass = passwordtxt.Text;
            //Check the hashed password with the original password
            using (var httpClient = new HttpClient())
            {
                var response = await httpClient.GetAsync("REDACTED" + pwd + "REDACTED" + orignalpass);

                response.EnsureSuccessStatusCode();
                string content = await response.Content.ReadAsStringAsync();

                pwdchecker pcheck = JsonConvert.DeserializeObject <pwdchecker>(content);

                /*  TESTING PURPOSE
                 * MessageBox.Show(pcheck.verify); // Outputs the json object
                 * MessageBox.Show(content); //Outputs raw JSON
                 */


                //If password is incorrect return;
                if (pcheck.verify == "Incorrect Password")
                {
                    error.Text = "Password is incorrect";
                    return;
                }

                //If password is correct open loader
                if (pcheck.verify == "Correct Password")
                {
                    if (primG == "Members" && SubCheck.ENB == "True")
                    {
                        //If CB open time is lower than the actual time, ignore and load loader
                        if (Convert.ToInt32(SubCheck.CBUT) < Convert.ToInt32(SubCheck.OUT))
                        {
                            loader lod2 = new loader();
                            lod2.welcome.Text = "Welcome back, " + user + "!";
                            lod2.Show();
                            this.Hide();
                            return;
                        }

                        //Else, Wait
                        double timestamp = Convert.ToInt32(SubCheck.CBUT);

                        // Format our new DateTime object to start at the UNIX Epoch
                        System.DateTime dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);

                        // Add the timestamp (number of seconds since the Epoch) to be converted
                        dateTime = dateTime.AddSeconds(timestamp);

                        MetroFramework.MetroMessageBox.Show(this, "Free users have to wait till, " + dateTime.ToString() + "UTC. If you do not want to wait, please purchase a subscription from our website", "Information");
                        return;
                    }

                    if (primG == "Members" && SubCheck.ENB == "False")
                    {
                        loader lod1 = new loader();
                        lod1.welcome.Text = "Welcome back, " + user + "!";
                        lod1.Show();
                        this.Hide();
                        return;
                    }

                    loader lod = new loader();
                    lod.welcome.Text = "Welcome back, " + user + "!";
                    lod.Show();
                    this.Hide();
                    return;
                }
            }
        }
Example #11
0
 public Scene(string scenename, loader l)
 {
     name    = scenename;
     loader_ = l;
 }
	public Scene(string scenename, loader l)
	{
		name = scenename;
		loader_ = l;
	}
Example #13
0
 return GetInstance(loader, ElementMap.class);
	public LoadAssetsPool(loader l, int maxthread) {  
		maxthread_ = maxthread;
		loader_ = l;
	}
	public AssetLoadTerrain(loader l, LoadAssetsPool threadpool, Asset a):
		base(l, threadpool, a)
	{  
	}
	public AssetLoadSkybox(loader l, LoadAssetsPool threadpool, Asset a):
		base(l, threadpool, a)
	{  
	}
	// Use this for initialization
	void Awake () {
		loaderRef = GameObject.Find ("GameManager").GetComponent<loader> ();
	}
target is AggregateType aggTarget && HasGenericDelegateExplicitReferenceConversion(loader, source, aggTarget);