예제 #1
0
 public void UnloadCanvas(CanvasTypes canvasType)
 {
     if (canvasType == CanvasTypes.StartMenu)
     {
         UnloadStartMenuCanvas();
     }
     else if (canvasType == CanvasTypes.CheckQuit)
     {
         UnloadCheckQuitCanvas();
     }
 }
예제 #2
0
 private void ChangeCanvasTo(CanvasTypes ct)
 {
     for (int i = 0; i < canvasList.Count; i++)
     {
         if (canvasList[i].GetCanvasType != ct && canvasList[i].enabled)
         {
             StartCoroutine(DeactivateWithDelay(canvasList[i].gameObject));
         }
         else
         {
             canvasList[i].gameObject.SetActive(true);
         }
     }
 }
예제 #3
0
 /// <summary>
 /// Returns WebGLRenderingContext drawing context on the canvas, or null if the context ID is not supported.
 /// A drawing context lets you draw on the canvas. This context is only available on browsers that implement
 /// WebGL (OpenGL ES 2.0).
 /// </summary>
 /// <param name="contextId">The context's id</param>
 /// <returns>A WebGLRenderingContext drawing context object.</returns>
 public virtual IWebGLRenderingContext GetContext(CanvasTypes.CanvasContextWebGLType contextId)
 {
     return null;
 }
예제 #4
0
 /// <summary>
 /// Returns CanvasRenderingContext2D drawing context on the canvas, or null if the context ID is not supported.
 /// A drawing context lets you draw on the canvas.
 /// </summary>
 /// <param name="contextId">The context's id</param>
 /// <returns>A CanvasRenderingContext2D drawing context object.</returns>
 public virtual CanvasRenderingContext2D GetContext(CanvasTypes.CanvasContext2DType contextId)
 {
     return null;
 }
예제 #5
0
 /// <summary>
 /// Reports whether or not the specified point is contained in the current path.
 /// </summary>
 /// <param name="path">A Path2D path to use.</param>
 /// <param name="x">The X coordinate of the point to check.</param>
 /// <param name="y">The Y coordinate of the point to check.</param>
 /// <param name="fillRule">
 /// The algorithm by which to determine if a point is inside a path or outside a path.
 /// </param>
 /// <returns>
 /// A Boolean, which is true if the specified point is contained in the current or specfied path,
 /// otherwise false.
 /// </returns>
 public virtual bool IsPointInPath(Path2D path, Any<uint, int, double> x, Any<uint, int, double> y,
                                   CanvasTypes.CanvasFillRule? fillRule)
 {
     return false;
 }
예제 #6
0
 /// <summary>
 /// Fills the specified path with the specified fill rule.
 /// </summary>
 /// <param name="path">A Path2D path to fill.</param>
 /// <param name="fillRule">
 /// The algorithm by which to determine if a point is inside a path or outside a path.
 /// </param>
 public virtual void Fill(Path2D path, CanvasTypes.CanvasFillRule fillRule)
 {
     return;
 }
예제 #7
0
 /// <summary>
 /// Fills the subpaths with the specified fill rule.
 /// </summary>
 /// <param name="fillRule">
 /// The algorithm by which to determine if a point is inside a path or outside a path.
 /// </param>
 public virtual void Fill(CanvasTypes.CanvasFillRule fillRule)
 {
     return;
 }
예제 #8
0
 /// <summary>
 /// Creates a pattern using the specified image (a CanvasImageSource). It repeats the source in the
 /// directions specified by the repetition argument. This method returns a CanvasPattern.
 /// </summary>
 /// <param name="image">
 /// A CanvasImageSource to be used as image to repeat. It can either be a:
 /// • HTMLImageElement (&lt;img>),
 /// • HTMLVideoElement (&lt;video>),
 /// • HTMLCanvasElement (&lt;canvas>),
 /// • CanvasRenderingContext2D,
 /// • ImageBitmap (c# object for now),
 /// • ImageData, or a
 /// • Blob.
 /// </param>
 /// <param name="repetition"></param>
 /// <returns>An opaque CanvasPattern object describing a pattern.</returns>
 /// <remarks>
 /// At the time of implementation, ImageBitmap had no documentation and Bridge.NET did not have
 /// it defined inside.
 /// </remarks>
 public virtual CanvasPattern CreatePattern(
     Any<ImageElement, VideoElement, CanvasElement, CanvasRenderingContext2D, object, ImageData, Blob> image,
     CanvasTypes.CanvasRepetitionTypes repetition)
 {
     return null;
 }
예제 #9
0
 /// <summary>
 /// Reports whether or not the specified point is contained in the current path.
 /// </summary>
 /// <param name="path">A Path2D path to use.</param>
 /// <param name="x">The X coordinate of the point to check.</param>
 /// <param name="y">The Y coordinate of the point to check.</param>
 /// <param name="fillRule">
 /// The algorithm by which to determine if a point is inside a path or outside a path.
 /// </param>
 /// <returns>
 /// A Boolean, which is true if the specified point is contained in the current or specfied path,
 /// otherwise false.
 /// </returns>
 public virtual extern bool IsPointInPath(Path2D path, Any<uint, int, double> x, Any<uint, int, double> y,
                                   CanvasTypes.CanvasFillRule? fillRule);
예제 #10
0
 public void SwitchOrientation(CanvasTypes type, bool overRide)
 {
     GameObject.FindGameObjectWithTag ("Player").GetComponent<PlayerMovement> ().SetRects ();
     if(overRide){
         switch (type) {
         case CanvasTypes.Port:
             VloadCanvas.enabled = true;
             VpreGameCanvas.enabled = true;
             VpostGameCanvas.enabled = true;
             HloadCanvas.enabled = false;
             HpreGameCanvas.enabled = false;
             HpostGameCanvas.enabled = false;
             SwitchMenu(currentMenu);
             Camera.main.fieldOfView = 60f;
             gameStats.SwitchCanvas(CanvasTypes.Port);
             break;
         case CanvasTypes.Land:
             VloadCanvas.enabled = false;
             VpreGameCanvas.enabled = false;
             VpostGameCanvas.enabled = false;
             HloadCanvas.enabled = true;
             HpreGameCanvas.enabled = true;
             HpostGameCanvas.enabled = true;
             SwitchMenu(currentMenu);
             Camera.main.fieldOfView = 50f;
             gameStats.SwitchCanvas(CanvasTypes.Land);
             break;
         }
     }
     else if (currentCanvasType != type){
         currentCanvasType = type;
         switch (type) {
         case CanvasTypes.Port:
             VloadCanvas.enabled = true;
             VpreGameCanvas.enabled = true;
             VpostGameCanvas.enabled = true;
             HloadCanvas.enabled = false;
             HpreGameCanvas.enabled = false;
             HpostGameCanvas.enabled = false;
             SwitchMenu(currentMenu);
             Camera.main.fieldOfView = 60f;
             gameStats.SwitchCanvas(CanvasTypes.Port);
             break;
         case CanvasTypes.Land:
             VloadCanvas.enabled = false;
             VpreGameCanvas.enabled = false;
             VpostGameCanvas.enabled = false;
             HloadCanvas.enabled = true;
             HpreGameCanvas.enabled = true;
             HpostGameCanvas.enabled = true;
             SwitchMenu(currentMenu);
             Camera.main.fieldOfView = 50f;
             gameStats.SwitchCanvas(CanvasTypes.Land);
             break;
         }
     }
     else Debug.Log("Shits F****d bruh");
 }
예제 #11
0
    public void SwitchOrientation(CanvasTypes type, bool overRide)
    {
        GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement> ().SetRects();
        if (overRide)
        {
            switch (type)
            {
            case CanvasTypes.Port:
                VloadCanvas.enabled     = true;
                VpreGameCanvas.enabled  = true;
                VpostGameCanvas.enabled = true;
                HloadCanvas.enabled     = false;
                HpreGameCanvas.enabled  = false;
                HpostGameCanvas.enabled = false;
                SwitchMenu(currentMenu);
                Camera.main.fieldOfView = 60f;
                gameStats.SwitchCanvas(CanvasTypes.Port);
                break;

            case CanvasTypes.Land:
                VloadCanvas.enabled     = false;
                VpreGameCanvas.enabled  = false;
                VpostGameCanvas.enabled = false;
                HloadCanvas.enabled     = true;
                HpreGameCanvas.enabled  = true;
                HpostGameCanvas.enabled = true;
                SwitchMenu(currentMenu);
                Camera.main.fieldOfView = 50f;
                gameStats.SwitchCanvas(CanvasTypes.Land);
                break;
            }
        }
        else if (currentCanvasType != type)
        {
            currentCanvasType = type;
            switch (type)
            {
            case CanvasTypes.Port:
                VloadCanvas.enabled     = true;
                VpreGameCanvas.enabled  = true;
                VpostGameCanvas.enabled = true;
                HloadCanvas.enabled     = false;
                HpreGameCanvas.enabled  = false;
                HpostGameCanvas.enabled = false;
                SwitchMenu(currentMenu);
                Camera.main.fieldOfView = 60f;
                gameStats.SwitchCanvas(CanvasTypes.Port);
                break;

            case CanvasTypes.Land:
                VloadCanvas.enabled     = false;
                VpreGameCanvas.enabled  = false;
                VpostGameCanvas.enabled = false;
                HloadCanvas.enabled     = true;
                HpreGameCanvas.enabled  = true;
                HpostGameCanvas.enabled = true;
                SwitchMenu(currentMenu);
                Camera.main.fieldOfView = 50f;
                gameStats.SwitchCanvas(CanvasTypes.Land);
                break;
            }
        }
        else
        {
            Debug.Log("Shits F****d bruh");
        }
    }