Ejemplo n.º 1
0
 private void OnEnable()
 {
     tower      = this.gameObject.GetComponent <Tower>();
     obsticles  = gameObject.GetComponentInChildren <Obsticles>();
     hp         = 1;
     initDamage = damage;
 }
Ejemplo n.º 2
0
        // private static void RotatePixel(Pixel center, Pixel pixel, ConsoleKeyInfo key)
        // {
        //     switch (key.Key)
        //     {
        //         case ConsoleKey.LeftArrow:
        //             pixel.RotateAround(center, -20);
        //             break;
        //         case ConsoleKey.RightArrow:
        //             pixel.RotateAround(center, 20);
        //             break;
        //     }
        // }
        private static void RotateObsticle(Pixel center, Obsticles obsticle, ConsoleKeyInfo key)
        {
            switch (key.Key)
            {
            case ConsoleKey.LeftArrow:
                obsticle.RotateAround(center, key, -10);
                break;

            case ConsoleKey.RightArrow:
                obsticle.RotateAround(center, key, 10);
                break;
            }
        }