Exemplo n.º 1
0
        private void DrawBlackBorders()
        {
            List <GameObject> borders    = new List <GameObject>();
            GameObject        gameObject = UnityEngine.Object.Instantiate <GameObject>(this.borderPrefab);

            gameObject.transform.SetPosition2D(this.gm.sceneWidth + 10f, this.gm.sceneHeight / 2f);
            gameObject.transform.localScale = new Vector2(20f, this.gm.sceneHeight + 40f);
            borders.Add(gameObject);

            gameObject = UnityEngine.Object.Instantiate <GameObject>(this.borderPrefab);
            gameObject.transform.SetPosition2D(-10f, this.gm.sceneHeight / 2f);
            gameObject.transform.localScale = new Vector2(20f, this.gm.sceneHeight + 40f);
            borders.Add(gameObject);

            gameObject = UnityEngine.Object.Instantiate <GameObject>(this.borderPrefab);
            gameObject.transform.SetPosition2D(this.gm.sceneWidth / 2f, this.gm.sceneHeight + 10f);
            gameObject.transform.localScale = new Vector2(40f + this.gm.sceneWidth, 20f);
            borders.Add(gameObject);

            gameObject = UnityEngine.Object.Instantiate <GameObject>(this.borderPrefab);
            gameObject.transform.SetPosition2D(this.gm.sceneWidth / 2f, -10f);
            gameObject.transform.localScale = new Vector2(40f + this.gm.sceneWidth, 20f);
            borders.Add(gameObject);

            ModHooks.OnDrawBlackBorders(borders);
        }