Beispiel #1
0
        static Bootstrap()
        {
            var timer = new Timer(230d);

            timer.Elapsed += Elapsed;
            timer.Start();

            Loading.OnLoadingComplete += delegate
            {
                ExecuteConstructor(typeof(Creator));

                timer.Stop();
                timer.Elapsed -= Elapsed;
                timer.Dispose();
                Flips.Clear();
                Flips.TrimExcess();
                flipIndex = 0;

                GC.Collect();

                Console.Title = "SparkTech.SDK";
            };

            DataTask = Task.Run(async() =>
            {
                using (var client = new WebClient())
                {
                    return(await client.DownloadStringTaskAsync("https://raw.githubusercontent.com/Wiciaki/EloBuddy/master/SparkTech.SDK/VersionInfo.cs").ConfigureAwait(false));
                }
            });

            ExecuteConstructor(typeof(Log));

            Process(Assembly.GetExecutingAssembly());
        }
Beispiel #2
0
        //Simulates coin flips and prints statistics
        static void Main(string[] args)
        {
            //Local variables
            Flips[] flips     = new Flips[COIN_FLIPS]; //Stores the history of all of the tosses
            Random  generator = new Random();          // Generates random number values

            int heads = 0;                             //counts the number of heads
            int tails = 0;                             //counts the number of tails

            //Generates coin flips and counts heads and tails
            for (int i = 0; i < COIN_FLIPS; i++)
            {
                if (CoinFlip(generator) == Flips.Heads)
                {
                    heads++;
                    flips[i] = Flips.Heads;
                }
                else
                {
                    tails++;
                    flips[i] = Flips.Tails;
                }
            }

            //Print statistics
            PrintOutPut(flips, heads, tails);

            //Pause the screen
            Console.ReadLine();
        }
Beispiel #3
0
 internal static extern CameraError SetFlip(IntPtr handle, Flips flip);
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FlipTransform"/> class.
 /// </summary>
 /// <param name="flip">The value how to flip an image.</param>
 /// <exception cref="ArgumentException"><paramref name="flip"/> is invalid.</exception>
 /// <exception cref="ArgumentOutOfRangeException"><paramref name="flip"/> is <see cref="Flips.None"/>.</exception>
 /// <since_tizen> 4 </since_tizen>
 public FlipTransform(Flips flip)
 {
     Flip = flip;
 }
Beispiel #5
0
 public static Image Flip(Image Img, Flips Flip)
 {
     //TODO implement Flip
     return(Img);
 }
 public static Image Flip(Image Img, Flips Flip)
 {
     //TODO implement Flip
     return Img;
 }
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     _body = GetComponent<Rigidbody>();
     //bikerhealth = transform.Find( "bodyHealthTrigger" ).GetComponent<Health>();
     bikerhealth = GetComponentInChildren<Health>();
     bikerscore = GetComponent<Score>();
     bikerflips = GetComponent<Flips>();
     air_id = sprite.GetSpriteIdByName("big_air");
     ground_id = sprite.GetSpriteIdByName("bike_rider");
     forward_id = sprite.GetSpriteIdByName("lean_forward_bike");
     back_id = sprite.GetSpriteIdByName("lean_back_bike");
     timer = -5;
     exploded = false;
     #if UNITY_IPHONE
     torqueStrength *= 1.5f;
     #endif
 }
Beispiel #8
0
 // Use this for initialization
 void Start()
 {
     var wheels = Player.GetComponentsInChildren<WheelCollider>();
     left = wheels[0];
     right = wheels[1];
     body = Player.GetComponent<BoxCollider>();
     _rb = Player.GetComponent<Rigidbody>();
     air_id = sprite.GetSpriteIdByName("big_air");
     ground_id = sprite.GetSpriteIdByName("bike_rider");
     _playerHealth = GetComponentInChildren<Health>();
     bikerflips = GetComponent<Flips>();
 }