Advertisement
Guest User

Untitled

a guest
Sep 18th, 2023
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 16.82 KB | None | 0 0
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using Godot;
  5.  
  6. using GlmSharp;
  7.  
  8. public enum PrimitiveType
  9. {
  10.     Quad
  11. }
  12.  
  13. public class GameObject
  14. {
  15.     public Transform transform;
  16.     public string name;
  17.     public object layer;
  18.    
  19.     public GameObject(string x="") => throw new NotImplementedException();
  20.     public GameObject Instantiate() => throw new NotImplementedException();
  21.  
  22.     public void DestroyImmediate() => throw new NotImplementedException();
  23.    
  24.     public T GetComponent<T>() => throw new NotImplementedException();
  25.     public T[] GetComponents<T>() => throw new NotImplementedException();
  26.     public T AddComponent<T>() => throw new NotImplementedException();
  27.     public object AddComponent(Type t) => throw new NotImplementedException();
  28.     public void SetActive(bool x) => throw new NotImplementedException();
  29.  
  30.     public static GameObject CreatePrimitive(PrimitiveType pt) => throw new NotImplementedException();
  31.     public static GameObject Player => throw new NotImplementedException();
  32.  
  33.     public static GameObject Find(string x) => throw new NotImplementedException();
  34.     public static IEnumerable<GameObject> IterateScene() => throw new NotImplementedException();
  35. }
  36.  
  37. public class MonoBehaviour
  38. {
  39.     public GameObject gameObject;
  40.  
  41.     public Transform transform => gameObject.transform;
  42.     public T GetComponent<T>() => throw new NotImplementedException();
  43.     public T AddComponent<T>() => throw new NotImplementedException();
  44.  
  45.     public static void StartCoroutine(IEnumerator x) => throw new NotImplementedException();
  46. }
  47.  
  48. public class Component
  49. {
  50.    
  51. }
  52.  
  53. public class Transform
  54. {
  55.     public vec3 position;
  56.     public vec3 localScale;
  57.     public vec3 localPosition;
  58.  
  59.     public Transform parent;
  60. }
  61.  
  62. public class Camera : GameObject
  63. {
  64.     public bool enabled;
  65.     public float depth;
  66.     public float orthographicSize;
  67.     public RenderTexture targetTexture;
  68.     public float aspect;
  69.     public Rect rect;
  70.     public Transform transform;
  71.     public bool orthographic;
  72.     public int cullingMask;
  73.  
  74.     public static Camera main => null;
  75.    
  76.     public void Render() => throw new NotImplementedException();
  77.  
  78.     public void CopyFrom(Camera c) => throw new NotImplementedException();
  79.  
  80.     public Ray ScreenPointToRay(vec2 p) => throw new NotImplementedException();
  81.     public vec3 ScreenToWorldPoint(vec3 x) => throw new NotImplementedException();
  82. }
  83.  
  84. public class Material : EngineObject
  85. {
  86.     public int renderQueue;
  87.     public Texture mainTexture;
  88.     public bool enableInstancing;
  89.     public string name;
  90.    
  91.     public Material(params object[] x) =>throw new NotImplementedException();
  92.    
  93.     public void SetTexture(string n, object t) => throw new NotImplementedException();
  94.     public void SetInt(string q, object i) => throw new NotImplementedException();
  95.     public void SetFloat(string q, object i) => throw new NotImplementedException();
  96.     public void SetVector(string q, object i) => throw new NotImplementedException();
  97.     public void SetBuffer(string q, object i) => throw new NotImplementedException();
  98.     public void SetColor(string q, object i) => throw new NotImplementedException();
  99.     public void SetColorArray(string q, object i) => throw new NotImplementedException();
  100.     public void SetFloatArray(string q, object i) => throw new NotImplementedException();
  101.     public bool HasProperty(string x) => throw new NotImplementedException();
  102.     public void EnableKeyword(string x) => throw new NotImplementedException();
  103. }
  104.  
  105. public class MeshRenderer
  106. {
  107.     public Material[] materials;
  108.     public Material material => materials[0];
  109.     public bool enabled;
  110. }
  111.  
  112. public class MeshCollider
  113. {
  114.     public bool enabled;
  115. }
  116.  
  117. public class MeshFilter
  118. {
  119.     public Mesh mesh;
  120. }
  121.  
  122. public static class Debug
  123. {
  124.     public static void Assert(bool v, string msg = "")
  125.     {
  126.         if (!v)
  127.             throw new ApplicationException("Assertion failed: " +msg);
  128.     }
  129.    
  130.     public static void AssertFormat(bool v, string fmt, params object[] args)
  131.     {
  132.         if (!v)
  133.             throw new ApplicationException("Assertion failed: " + String.Format(fmt,args));
  134.     }
  135.  
  136.     public static void Log(string msg) => GD.Print(msg);
  137.     public static void LogFormat(string fmt, params object[] args) => GD.Print(fmt,args);
  138.     public static void LogError(string msg) => GD.PrintErr(msg);
  139.     public static void LogWarning(string msg) => GD.PrintErr(msg);
  140.     public static void LogException(Exception e) => throw new NotImplementedException();
  141. }
  142.  
  143. public enum LogType
  144. {
  145.     Log=0,
  146.     Exception,
  147.     Assert
  148. }
  149.  
  150. public class GUIStyle
  151. {
  152.    
  153. }
  154.  
  155. public static class GUILayout
  156. {
  157.     public static void BeginArea(Rect r, string s = "", string q = "") => throw new NotImplementedException();
  158.     public static void EndArea() => throw new NotImplementedException();
  159.     public static void BeginHorizontal() => throw new NotImplementedException();
  160.     public static void BeginVertical() => throw new NotImplementedException();
  161.     public static void EndHorizontal() => throw new NotImplementedException();
  162.     public static void EndVertical() => throw new NotImplementedException();
  163.     public static vec2 BeginScrollView(vec2 p) => throw new NotImplementedException();
  164.     public static void EndScrollView() => throw new NotImplementedException();
  165.     public static void FlexibleSpace() => throw new NotImplementedException();
  166.     public static void Label(string s) => throw new NotImplementedException();
  167.     public static bool Button(object s) => throw new NotImplementedException();
  168.     public static string TextField(string s, GUIStyle style = null) => throw new NotImplementedException();
  169.     public static int SelectionGrid(params object[] args) => throw new NotImplementedException();
  170.     public static bool Toggle(params object[] args) => throw new NotImplementedException();
  171.     public static float HorizontalSlider(params object[] args) => throw new NotImplementedException();
  172. }
  173.  
  174. public class SerializeFieldAttribute : System.Attribute { }
  175. public class ReadOnlyAttribute : System.Attribute{}
  176. public class WriteOnlyAttribute : System.Attribute{}
  177.  
  178. public static class Job
  179. {
  180.     public static void Schedule(IJobParallelFor job, int len, int chunkSize) => throw new NotImplementedException();
  181.     public static void Schedule(IJob job) => throw new NotImplementedException();
  182. }
  183.  
  184. public interface IJobParallelFor
  185. {
  186.     void Execute(int index);
  187. }
  188.  
  189. public interface IJob
  190. {
  191.     void Execute();
  192. }
  193.  
  194. public static class PlayerPrefs
  195. {
  196.     public static int GetInt(string s, int v) => throw new NotImplementedException();
  197.     public static void SetInt(string s, int v) => throw new NotImplementedException();
  198. }
  199.  
  200. namespace UnityEngine
  201. {
  202.     namespace Profiling
  203.     {
  204.         public static class Profiler
  205.         {
  206.             public static void BeginSample(string s) => throw new NotImplementedException();
  207.             public static void EndSample() => throw new NotImplementedException();
  208.         }
  209.     }
  210. }
  211.  
  212. public struct ProfilerMarker
  213. {
  214.     public ProfilerMarker(string s) { }
  215.     public void Begin() => throw new NotImplementedException();
  216.     public void End() => throw new NotImplementedException();
  217. }
  218.  
  219. public struct Color32
  220. {
  221.     public byte r;
  222.     public byte g;
  223.     public byte b;
  224.     public byte a;
  225.  
  226.     public Color32(byte R, byte G, byte B, byte A)
  227.     {
  228.         r = R;
  229.         g = G;
  230.         b = B;
  231.         a = A;
  232.     }
  233.    
  234.     public static implicit operator Color(Color32 x) => throw new NotImplementedException();
  235.     public static implicit operator Color32(Color x) => throw new NotImplementedException();
  236. }
  237.  
  238. public static class Application
  239. {
  240.     public static string dataPath => ProjectSettings.GlobalizePath("res://");
  241.     public static string streamingAssetsPath => ProjectSettings.GlobalizePath("res://") + "/assets/json";
  242.     public static string temporaryCachePath => ProjectSettings.GlobalizePath("tmp://");
  243.  
  244.     //public delegate Messenger.OnLightmapChangedDelegate()
  245.     public delegate void HandleLogDelegate(string logString, string stackTrace, LogType type);
  246.     public static HandleLogDelegate logMessageReceived;
  247. }
  248.  
  249. public static class math
  250. {
  251.     public static T min<T>(T lhs, T rhs) => throw new NotImplementedException();
  252.     public static T max<T>(T lhs, T rhs) => throw new NotImplementedException();
  253.     public static T abs<T>(T v) => throw new NotImplementedException();
  254.     public static T clamp<T>(T v, T e0, T e1) => throw new NotImplementedException();
  255.    
  256.     public static ivec2 clamp(ivec2 v, int e0, int e1) => throw new NotImplementedException();
  257.    
  258.     public static float length<T>(T lhs) => throw new NotImplementedException();
  259.     public static float lengthsq<T>(T lhs) => throw new NotImplementedException();
  260.  
  261.     public static float log2(float v) => throw new NotImplementedException();
  262.    
  263.     public static float dot<T>(T v, T q) => throw new NotImplementedException();
  264.     public static int dot(ivec2 v, ivec2 q) => throw new NotImplementedException();
  265.  
  266.     public static bool any(object x) => throw new NotImplementedException();
  267.    
  268.     public static float smoothstep(float a, float b, float c) => throw new NotImplementedException();
  269.     public static vec3 normalize(vec3 x) => throw new NotImplementedException();
  270.     public static vec2 normalize(vec2 x) => throw new NotImplementedException();
  271.     public static vec2 normalize(ivec2 x) => throw new NotImplementedException();
  272.     public static dvec2 normalize(dvec2 x) => throw new NotImplementedException();
  273.     public static T lerp<T,U>(T a, T b, U y) => throw new NotImplementedException();
  274.     public static vec2 normalizesafe(ivec2 x) => throw new NotImplementedException();
  275.     public static vec2 normalizesafe(vec2 x) => throw new NotImplementedException();
  276.    
  277.     public static float sqrt(object x) => throw new NotImplementedException();
  278.     public static bool all(object x) => throw new NotImplementedException();
  279.    
  280.     public static float floor(object x) => throw new NotImplementedException();
  281.     public static float round(object x) => throw new NotImplementedException();
  282.     public static T frac<T>(T x) => throw new NotImplementedException();
  283.     public static float clamp01(float x) => throw new NotImplementedException();
  284.     public static T sign<T>(T x) => throw new NotImplementedException();
  285.    
  286.     public static vec2 round(vec2 x) => throw new NotImplementedException();
  287. }
  288.  
  289. public interface ISerializationCallbackReceiver
  290. {
  291.     void OnBeforeSerialize();
  292.     void OnAfterDeserialize();
  293. }
  294.  
  295. public class Singleton<T> where T: new()
  296. {
  297.     static Singleton()
  298.     {
  299.         Instance = new();
  300.     }
  301.    
  302.     public static T Instance;
  303. }
  304.  
  305. public static class Screen
  306. {
  307.     public static int width;
  308.     public static int height;
  309. }
  310.  
  311. public static class Time
  312. {
  313.     public static float time;
  314.     public static float deltaTime;
  315.     public static int frameCount;
  316. }
  317.  
  318. public static class Extensions
  319. {
  320.     public static float grayscale(this Color c) => throw new NotImplementedException();
  321. }
  322.  
  323. public static class JsonUtility
  324. {
  325.     public static string ToJson(object x, bool q = true) => throw new NotImplementedException();
  326.     public static object FromJson(string x) => throw new NotImplementedException();
  327.    
  328.     public static string ToJson<T>(T x, bool q = true) => throw new NotImplementedException();
  329.     public static T FromJson<T>(string x) => throw new NotImplementedException();
  330. }
  331.  
  332. public enum FilterMode
  333. {
  334.     Point=0,
  335.     Bilinear,
  336.     Trilinear
  337. }
  338.  
  339. public enum TextureWrapMode
  340. {
  341.     Clamp=0,
  342.     Repeat
  343. }
  344.  
  345. public enum TextureFormat
  346. {
  347.     RGBA32,
  348.     ARGB32,
  349.     R8,
  350.     RFloat,
  351.     BC4,
  352.     BC7,
  353.     BGRA32,
  354.     R16
  355. }
  356.  
  357. public enum RenderTextureFormat
  358. {
  359.     RGBA32,
  360.     ARGB32,
  361.     R8,
  362.     RFloat
  363. }
  364.  
  365. public enum RenderTextureReadWrite
  366. {
  367.     Linear
  368. }
  369.  
  370. public class Texture : EngineObject
  371. {
  372.     public TextureFormat format;
  373.     public FilterMode filterMode;
  374.     public TextureWrapMode wrapMode;
  375.     public int width;
  376.     public int height;
  377.    
  378.     public void Apply(params object[] args) => throw new NotImplementedException();
  379.     public void SetPixelData(params object[] args) => throw new NotImplementedException();
  380. }
  381.  
  382. public class Texture2D : Texture
  383. {
  384.     public byte[] GetRawTextureData() => throw new NotImplementedException();
  385.     public T[] GetRawTextureData<T>() => throw new NotImplementedException();
  386.     public void LoadRawTextureData<T>(T[] v) => throw new NotImplementedException();
  387.     public void ReadPixels(params object[] args) => throw new NotImplementedException();
  388.     public byte[] EncodeToPNG() => throw new NotImplementedException();
  389.     public bool LoadImage(byte[] x) => throw new NotImplementedException();
  390.  
  391.     public Texture2D(params object[] args) => throw new NotImplementedException();
  392. }
  393.  
  394. public class Texture2DArray : Texture
  395. {
  396.     public int depth;
  397.    
  398.     public Texture2DArray(params object[] args) => throw new NotImplementedException();
  399.  
  400.     public T[] GetPixelData<T>(int mipLevel, int sliceIdx) => throw new NotImplementedException();
  401. }
  402.  
  403. public class RenderTexture
  404. {
  405.     public int width;
  406.     public int height;
  407.     public static RenderTexture active;
  408.     public RenderTexture(params object[] args) => throw new NotImplementedException();
  409.    
  410.     public void CopyTo(Texture tgt) => throw new NotImplementedException();
  411. }
  412.  
  413. public class Rect
  414. {
  415.     public Rect(params object[] args) => throw new NotImplementedException();
  416. }
  417.  
  418. public class ComputeBuffer
  419. {
  420.     public void SetData(params object[] args) => throw new NotImplementedException();
  421.     public ComputeBuffer(params object[] args) => throw new NotImplementedException();
  422.  
  423.     public void Release() => throw new NotImplementedException();
  424. }
  425.  
  426. public static class Input
  427. {
  428.     public static vec2 mousePosition;
  429.     public static bool GetKeyDown(object x) => throw new NotImplementedException();
  430.     public static bool GetKey(object x) => throw new NotImplementedException();
  431.     public static bool GetMouseButtonDown(object x) => throw new NotImplementedException();
  432.     public static bool GetMouseButton(object x) => throw new NotImplementedException();
  433.     public static int GetAxis(string axis) =>  throw new NotImplementedException();
  434. }
  435.  
  436. public enum KeyCode
  437. {
  438.     A, B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,Escape,LeftControl,LeftAlt, LeftArrow, RightArrow, Return,Tab, Alpha1, Alpha2, Alpha3, Alpha4, Alpha5, Alpha6, Alpha7, Alpha8, Alpha9,
  439.     LeftShift, RightShift, None,
  440. }
  441.  
  442. public class AudioSource
  443. {
  444.     public AudioClip clip;
  445.     public float pitch;
  446.     public float volume;
  447.     public bool loop;
  448.     public void Play() => throw new NotImplementedException();
  449.     public void PlayOneShot(AudioClip clip, float volume) => throw new NotImplementedException();
  450.     public void Stop() => throw new NotImplementedException();
  451. }
  452.  
  453. public class Shader : EngineObject
  454. {
  455.     public static Shader Find(string x) => throw new NotImplementedException();
  456. }
  457.  
  458. public class LayerMask
  459. {
  460.     public static int NameToLayer(string x) => throw new NotImplementedException();
  461. }
  462.  
  463. public class EngineObject
  464. {
  465.     public static void Destroy(object x)  => throw new NotImplementedException();
  466.     public static void DestroyImmediately(object x)  => throw new NotImplementedException();
  467. }
  468.  
  469. public static class Graphics
  470. {
  471.     public static void DrawMeshInstancedIndirect(params object[] args) => throw new NotImplementedException();
  472. }
  473.  
  474. public enum ComputeBufferType
  475. {
  476.     Default,
  477.     IndirectArguments
  478. }
  479.  
  480. public class AudioClip : EngineObject
  481. {
  482.     public string name;
  483. }
  484.  
  485. public class AudioMixer : EngineObject
  486. {
  487. }
  488.  
  489. public class Font { }
  490.  
  491. public static class Event
  492. {
  493.     public static KeyCode keyCode;
  494. }
  495.  
  496. public class WaitForSeconds
  497. {
  498.     public WaitForSeconds(params object[] args) => throw new NotImplementedException();
  499. }
  500.  
  501. public static class ScreenCapture
  502. {
  503.     public static void CaptureScreenshot(string fname, int magTimes) => throw new NotImplementedException();
  504. }
  505.  
  506. public static class NativeExtras
  507. {
  508.     public static T[] SubArray<T>(T[] ar, int i, int num) => throw new NotImplementedException();
  509. }
  510.  
  511. public static class SystemInfo
  512. {
  513.     public static bool SupportsRenderTextureFormat(RenderTextureFormat rtf) => throw new NotImplementedException();
  514.     public static bool SupportsTextureFormat(TextureFormat tf) => throw new NotImplementedException();
  515.     public static bool supportsComputeShaders;
  516. }
  517.  
  518. public class RaycastHit
  519. {
  520.     public vec2 textureCoord;
  521.     public vec3 point;
  522. }
  523.  
  524. public class Ray
  525. {
  526.    
  527. }
  528.  
  529. public static class Physics
  530. {
  531.     public static bool Raycast(Ray ray, out RaycastHit rh) => throw new NotImplementedException();
  532. }
  533.  
  534. public static class PerlinNoise
  535. {
  536.     public static float Calc2D(float x, float y) => throw new NotImplementedException();
  537. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement