Ejemplo n.º 1
0
    // Initialization Event
    void Start()
    {
        // Components
        prim = new DrawPrim(screen_width, screen_height);
        util = new DrawUtil(prim);
        util.drawFill(Color.clear);
        screen_tex = prim.texture;
        GameObject img_obj = createImage(screen_tex);

        img_obj.name = "Screen";
        img          = img_obj.GetComponent <RawImage>();
        img.GetComponent <RectTransform>().localScale = new Vector3(screen_scale, screen_scale, 1f);

        // Variables
        camera_position = Vector2.zero;

        player_ship = gameObject.AddComponent <ShipBehaviour>();
    }
Ejemplo n.º 2
0
 // Instantiate DrawUtil
 public DrawUtil(DrawPrim new_draw_prim)
 {
     draw_prim = new_draw_prim;
 }