Esempio n. 1
0
 public void LoadPentagrams(char[][] letterSets, int[] wordsCount)
 {
     _pentagrams = new Pentagram[letterSets.Length];
     for (int i = 0; i < _pentagrams.Length; i++)
     {
         _pentagrams[i] = new Pentagram(letterSets[i], wordsCount[i]);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Gets a five-pointed star with the specified size and center.
 /// </summary>
 public static XPoint[] GetPentagram(double size, XPoint center)
 {
     XPoint[] points = Pentagram.Clone() as XPoint[];
     for (int idx = 0; idx < 5; idx++)
     {
         points[idx].X = points[idx].X * size + center.X;
         points[idx].Y = points[idx].Y * size + center.Y;
     }
     return(points);
 }
    void Start() {
        Screen.orientation = ScreenOrientation.LandscapeLeft;

        Score = 0;
        penta = GameObject.Find( "Symbol" ).GetComponent<Pentagram>();
        pentaRenderer = GameObject.Find( "Symbol" ).GetComponent<SpriteRenderer>();        


        OnBadCash += Controller_OnBadCash;
    }
Esempio n. 4
0
        /// <summary>
        /// Gets a five-pointed star with the specified size and center.
        /// </summary>
        protected static XPoint[] GetPentagram(double size, XPoint center)
        {
            var points = (XPoint[])Pentagram.Clone();

            for (var idx = 0; idx < 5; idx++)
            {
                points[idx].X = points[idx].X * size + center.X;
                points[idx].Y = points[idx].Y * size + center.Y;
            }
            return(points);
        }
Esempio n. 5
0
    IEnumerator Burn(float seconds, Pentagram pentagram)
    {
        animator.SetTrigger("Burn");
        pentagram.LightPentagram();

        yield return(new WaitForSeconds(seconds));

        GameManager.manager.OpenDoors(doors);
        GameManager.manager.DecayCorpses(corpses);
        Destroy(gameObject);
    }
    private void Initialize() {
        if ( list == null ) {
            mTarget = target as Pentagram;
            values = mTarget.Qu;

            list = new ReorderableList( values, typeof( PentaInfo ), true, true, true, true );
            list.elementHeight *= 2;
            list.onAddCallback = new ReorderableList.AddCallbackDelegate( OnAdd );
            list.onRemoveCallback = new ReorderableList.RemoveCallbackDelegate( OnRemove );
            list.drawElementCallback = new ReorderableList.ElementCallbackDelegate( OnDrawElement );

        }
    }
Esempio n. 7
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        Pentagram pentagram = collision.GetComponent <Pentagram>();

        if (collision.GetComponent <Pentagram>() && !destroyed)
        {
            destroyed = true;
            Burn(collision.GetComponent <Pentagram>());
        }
        else if (collision.tag == "Level" && freeFall)
        {
            animator.SetTrigger("Land");
            freeFall = false;
        }
    }
Esempio n. 8
0
 public void TestMethod1()
 {
     Pentagram pentagram = new Pentagram();
     pentagram.VisitVertices();
 }
Esempio n. 9
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            #region ISWIDESCREEN
            if (!GraphicsAdapter.DefaultAdapter.IsWideScreen)
            {
                if (graphics.GraphicsDevice.DisplayMode.AspectRatio == 1.25f)
                {
                    ASPECTHD          = 16.0f / 9.0f;
                    ASPECTSD          = 5f / 4f;
                    ASPECTWIDTHRATIO  = 1280f / 1280f;
                    ASPECTHEIGHTRATIO = 1024f / 720f;
                    ASPECTRATIO       = ASPECTSD / ASPECTHD;
                    VIEWPORTHEIGHT    = 720f;
                    VIEWPORTWIDTH     = 1280f;
                }
                else
                {
                    ASPECTHD          = 16.0f / 9.0f;
                    ASPECTSD          = 4f / 3f;
                    ASPECTWIDTHRATIO  = 1024f / 1280f;
                    ASPECTHEIGHTRATIO = 1024f / 720f;
                    ASPECTRATIO       = ASPECTSD / ASPECTHD;
                    VIEWPORTHEIGHT    = 720f;
                    VIEWPORTWIDTH     = 1280;
                }
            }
            #endregion

            #region BACKGROUND
            tileMap          = Content.Load <Texture2D>(@"Barrier\" + nameTileMap);
            backgoundManager = new BackgroundPixelManager(this, ref tileMap, screen);
            Components.Add(backgoundManager);
            #endregion

            #region TANK
            tank   = Content.Load <Texture2D>(@"Tank\" + nameTank);
            player = new Tank(this, ref tank, screen);
            Components.Add(player);
            player.PutinStartPosition();
            #endregion

            #region INVASOR
            invasor         = Content.Load <Texture2D>(@"Invasors\" + nameInvasor);
            invasorsManager = new InvasorsManager(this, ref invasor, difficult.normal.ToString());
            Components.Add(invasorsManager);
            #endregion

            #region UFO
            ufo_t = Content.Load <Texture2D>(@"Ufo\" + "ufo_sheet");
            ufo   = new Ufo(this, ref ufo_t);
            Components.Add(ufo);
            ufo.PutinStartPosition();
            #endregion

            #region PENTAGRAM
            pentagam_sheet = Content.Load <Texture2D>(@"Pentagram\pentagram_sheet");
            pentagramP1    = new Pentagram(this, ref pentagam_sheet, Vector2.Zero);
            pentagramP2    = new Pentagram(this, ref pentagam_sheet, new Vector2(1280 - 120, 0));
            Components.Add(pentagramP1);
            Components.Add(pentagramP2);
            #endregion

            base.Initialize();
        }
Esempio n. 10
0
        public void TestMethod1()
        {
            Pentagram pentagram = new Pentagram();

            pentagram.VisitVertices();
        }
Esempio n. 11
0
 void Burn(Pentagram pentagram)
 {
     StartCoroutine(Burn(0.8f, pentagram));
 }