diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 466a5f430727a58bc2955da3a735d14257500961..0000000000000000000000000000000000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,12 +0,0 @@ -before_script: - - echo "Restoring NuGet Packages..." - - C:\nuget.exe restore "CLEditor.sln" - -stages: - - build - -build: - stage: build - script: - - echo "Release build..." - - C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe /maxcpucount /nologo /property:Configuration=Debug "CLEditor.sln" diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index f6ee896f54a5be06481e859c289488ec79db930f..0000000000000000000000000000000000000000 --- a/.gitmodules +++ /dev/null @@ -1,35 +0,0 @@ -[submodule "ThirdParty/Physics"] - path = ThirdParty/Physics - url = https://gitee.com/Esstudio/VelcroPhysics.git -[submodule "ThirdParty/Extended"] - path = ThirdParty/Extended - url = https://gitee.com/Esstudio/MonoGame.Extended.git - branch = develop -[submodule "ThirdParty/ServerCompiler"] - path = ThirdParty/ServerCompiler - url = https://gitee.com/Esstudio/ServerCompiler.git -[submodule "ThirdParty/Server"] - path = ThirdParty/Server - url = https://gitee.com/Esstudio/Server.git -[submodule "ThirdParty/MonoGame"] - path = ThirdParty/MonoGame - url = https://github.com/MonoGame/MonoGame.git - branch = develop -[submodule "ThirdParty/NLua"] - path = ThirdParty/NLua - url = https://gitee.com/Esstudio/NLua.git -[submodule "ThirdParty/VelcroPhysics"] - path = ThirdParty/VelcroPhysics - url = https://gitee.com/Esstudio/VelcroPhysics.git -[submodule "ThirdParty/Light"] - path = ThirdParty/Light - url = https://gitee.com/Esstudio/LightingEngine.git -[submodule "ThirdParty/WpfInterop"] - path = ThirdParty/WpfInterop - url = https://gitee.com/Esstudio/MonoGame.Framework.WpfInterop.git -[submodule "ThirdParty/Nez"] - path = ThirdParty/Nez - url = https://github.com/prime31/Nez.git -[submodule "ThirdParty/Steropes"] - path = ThirdParty/Steropes - url = https://github.com/RabbitStewDio/Steropes.UI.git diff --git a/CLEditor/App.config b/CLEditor/App.config index 45231c07c0ef562a6a709bd33aae3367651b58bb..de6b7504b146d60f0b44fa01fb6b5adf06e1b480 100644 --- a/CLEditor/App.config +++ b/CLEditor/App.config @@ -44,7 +44,7 @@ True - .jpg|.png|.jpeg|.gif|.bmp|.txt|.scene|.sln|.ini|.cs|.state|.mp3|.wav|.fnt|.lua + .jpg|.png|.jpeg|.gif|.bmp|.txt|.scene|.sln|.ini|.cs|.state|.mp3|.wav|.fnt|.lua|.visual diff --git a/CLEditor/App.xaml b/CLEditor/App.xaml index 924328099b8ddc10e4f1dcbed683efff8aa94a60..b882e62523f227171e397e974ab2b700891d7e56 100644 --- a/CLEditor/App.xaml +++ b/CLEditor/App.xaml @@ -8,7 +8,7 @@ - + diff --git a/CLEditor/App.xaml.cs b/CLEditor/App.xaml.cs index 8089a3be8e23d7286dd8bcfa8f1cf3ba0abbb22f..06d56c0cf355de6790eacab6f73b716e88b95c0c 100644 --- a/CLEditor/App.xaml.cs +++ b/CLEditor/App.xaml.cs @@ -2,6 +2,7 @@ using System.Windows.Forms; using System.Windows.Threading; using CLEngine.Core; +using Enterwell.Clients.Wpf.Notifications; namespace CLEngine.Editor { @@ -10,7 +11,9 @@ namespace CLEngine.Editor /// public partial class App { - protected override async void OnStartup(StartupEventArgs e) + public static NotificationMessageManager Manager = new NotificationMessageManager(); + + protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); diff --git a/CLEditor/CLEngine.Editor.csproj b/CLEditor/CLEngine.Editor.csproj index 0f23bea746ac22787b018aee7fd51102899f9d69..32d58d302ec4a03632ef4bb6124e2008032a8c3b 100644 --- a/CLEditor/CLEngine.Editor.csproj +++ b/CLEditor/CLEngine.Editor.csproj @@ -67,6 +67,12 @@ ..\packages\CommonServiceLocator.2.0.2\lib\net47\CommonServiceLocator.dll + + ..\packages\DynamicData.6.9.1.2588\lib\net46\DynamicData.dll + + + ..\packages\Enterwell.Clients.Wpf.Notifications.1.4.2\lib\net451\Enterwell.Clients.Wpf.Notifications.dll + True @@ -82,15 +88,14 @@ ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll - - False - .\ICSharpCode.AvalonEdit.dll + + ..\packages\AvalonEdit.5.0.4\lib\Net40\ICSharpCode.AvalonEdit.dll ..\packages\Lidgren.Network.1.0.2\lib\net451\Lidgren.Network.dll - - ..\packages\log4net.2.0.3\lib\net40-full\log4net.dll + + ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll @@ -104,8 +109,23 @@ ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + + ..\packages\NodeNetwork.4.0.0\lib\net47\NodeNetwork.dll + + + ..\packages\NodeNetworkToolkit.4.0.0\lib\net47\NodeNetworkToolkit.dll + + + ..\packages\ReactiveUI.9.13.1\lib\net461\ReactiveUI.dll + + + ..\packages\ReactiveUI.Events.WPF.9.12.1\lib\net461\ReactiveUI.Events.WPF.dll + + + ..\packages\ReactiveUI.WPF.9.13.1\lib\net461\ReactiveUI.WPF.dll + ..\packages\SharpDX.4.0.1\lib\net45\SharpDX.dll @@ -133,14 +153,59 @@ ..\packages\SharpDX.XInput.4.0.1\lib\net45\SharpDX.XInput.dll + + ..\packages\Splat.7.0.8\lib\net461\Splat.dll + + + ..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll + + + ..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll + True + True + + + ..\packages\System.Reactive.4.0.0\lib\net46\System.Reactive.dll + + + ..\packages\System.Reactive.Core.4.0.0\lib\net46\System.Reactive.Core.dll + + + ..\packages\System.Reactive.Experimental.4.0.0\lib\net46\System.Reactive.Experimental.dll + + + ..\packages\System.Reactive.Interfaces.4.0.0\lib\net46\System.Reactive.Interfaces.dll + + + ..\packages\System.Reactive.Linq.4.0.0\lib\net46\System.Reactive.Linq.dll + + + ..\packages\System.Reactive.PlatformServices.4.0.0\lib\net46\System.Reactive.PlatformServices.dll + + + ..\packages\System.Reactive.Providers.4.0.0\lib\net46\System.Reactive.Providers.dll + + + ..\packages\System.Reactive.Runtime.Remoting.4.0.0\lib\net46\System.Reactive.Runtime.Remoting.dll + + + ..\packages\System.Reactive.Windows.Forms.4.0.0\lib\net46\System.Reactive.Windows.Forms.dll + + + ..\packages\System.Reactive.Windows.Threading.4.0.0\lib\net46\System.Reactive.Windows.Threading.dll + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + + @@ -188,7 +253,6 @@ VisualScriptingNode.xaml - @@ -364,6 +428,9 @@ PreserveNewest + + NodeScriptWindow.xaml + @@ -377,6 +444,9 @@ CreateMapWindow.xaml + + DataBaseWindow.xaml + DeploymentWindow.xaml @@ -452,6 +522,10 @@ MainWindow.xaml Code + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -484,6 +558,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -585,6 +663,7 @@ PreserveNewest + PreserveNewest diff --git a/CLEditor/MainWindow.xaml b/CLEditor/MainWindow.xaml index 86a26d1395b1233502b155a7ee1408a7e870ac8b..dc87de26e1651fb9fd2b7eb79ad83dc83eb96edf 100644 --- a/CLEditor/MainWindow.xaml +++ b/CLEditor/MainWindow.xaml @@ -2,13 +2,11 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:core="clr-namespace:CLEngine.Editor.core" xmlns:controls="clr-namespace:CLEngine.Editor.controls" xmlns:windows="clr-namespace:CLEngine.Editor.windows" - xmlns:graphicsDevice="clr-namespace:CLEngine.Editor.graphics_device" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:local="clr-namespace:CLEngine.Editor.core" xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" + xmlns:controls1="clr-namespace:Enterwell.Clients.Wpf.Notifications.Controls;assembly=Enterwell.Clients.Wpf.Notifications" Icon="/CLEngine.Editor;component/content/logo_modern.png" mc:Ignorable="d" WindowStyle="None" ResizeMode="CanResize" Loaded="Window_Loaded_1" KeyDown="Window_KeyDown_1" Closing="Window_Closing_1" @@ -96,419 +94,419 @@ + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + - + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - + + + + + + + + diff --git a/CLEditor/MainWindow.xaml.cs b/CLEditor/MainWindow.xaml.cs index 81405916e3dc4e021fabea8313cba912b21456b5..35051b97b6652ed4ed0517299f5e6d4d07121070 100644 --- a/CLEditor/MainWindow.xaml.cs +++ b/CLEditor/MainWindow.xaml.cs @@ -19,6 +19,7 @@ using CLEngine.Editor.model; using CLEngine.Editor.windows; using CLEngine.Core; using CLEngine.Core.components; +using Enterwell.Clients.Wpf.Notifications; using Microsoft.Xna.Framework; using DragDropEffects = System.Windows.DragDropEffects; using DragEventArgs = System.Windows.DragEventArgs; @@ -92,6 +93,24 @@ namespace CLEngine.Editor sceneViewGameControl.DragEnter += SceneViewGameControlOnDragEnter; sceneViewGameControl.DragOver += SceneViewGameControlOnDragOver; + App.Manager.CreateMessage() + .Accent("#1751C3") + .Animates(true) + .AnimationInDuration(0.75) + .AnimationOutDuration(2) + .Background("#333") + .HasBadge("提示") + .HasMessage("欢迎使用CL游戏引擎.") + .Dismiss().WithButton("检查更新", button => + { + // TODO: 检查更新 + }) + .Dismiss().WithButton("更新日志", button => + { + // TODO: 更新日志 + }) + .Dismiss().WithDelay(TimeSpan.FromSeconds(5)) + .Queue(); } private void SceneViewGameControlOnDragOver(object sender, DragEventArgs e) diff --git a/CLEditor/Project Templates/CLEngine.Core.xml b/CLEditor/Project Templates/CLEngine.Core.xml index 659546042bb9c1f1b7fc3565b77d1c061fed2f13..b28817e30669c9e82d26a0de53ee1f68dd824348 100644 --- a/CLEditor/Project Templates/CLEngine.Core.xml +++ b/CLEditor/Project Templates/CLEngine.Core.xml @@ -4,6 +4,210 @@ CLEngine.Core + + + Representation of your world for the pathfinding algorithm. + Use SetCellCost to change the cost of traversing a cell. + Use BlockCell to make a cell completely intraversable. + + + + + Creates a grid + + The x-dimension of your world + The y-dimesion of your world + The default cost every cell is initialized with + + + + X-dimension of the grid + + + + + Y-dimension of the grid + + + + + Sets the cost for traversing a cell + + A position inside the grid + The cost of traversing the cell, cannot be less than one + + + + Makes the cell intraversable + + A position inside the grid + + + + Makes the cell traversable, gives it the default traversal cost as provided in the constructor + + A position inside the grid + + + + Looks-up the cost for traversing a given cell, if a cell is blocked () + +infinity is returned + + A position inside the grid + The cost + + + + Looks-up the cost for traversing a given cell, does not check + if the position is inside the grid + + A position inside the grid + The cost + + + + Computes the lowest-cost path from start to end inside the grid for an agent that can + move both diagonal and lateral + + The start position + The end position + Positions along the shortest path from start to end, or an empty array if no path could be found + + + + Computes the lowest-cost path from start to end inside the grid for an agent with a custom + movement pattern + + The start position + The end position + The movement pattern of the agent, for several built-in options + Positions along the shortest path from start to end, or an empty array if no path could be found + + + + Computes the lowest-cost path from start to end inside the grid for an agent with a custom + movement pattern. Instructs the path finder to give up if the path is not found after a number of iterations. + + The start position + The end position + The movement pattern of the agent, for several built-in options + Maximum number of nodes to check before the path finder gives up + Positions along the shortest path from start to end, or an empty array if no path could be found + + + + Converts a 2d index to a 1d index and performs bounds checking + + + + + Converts a 2d index to a 1d index without any bounds checking + + + + + Heap which keeps the node with the minimal expected path cost on the head position + + + + + If the heap has a next element + + + + + Pushes a node onto the heap + + + + + Pops a node from the heap, this node is always the node + with the cheapest expected path cost + + + + + Node in a heap + + + + + Predefined ranges of motions for your agent. + + + + + Both diagonal and lateral movement (west, north-west, north, north-east, south-east, south, south-west). + The path planning algorithm's heuristic is best suited for this movement pattern. + + + + + Lateral movement only (west, north, easth, south) + + + + + Diagonal movement only (north-west, north-east, south-east, south-west) + + + + + A 2D offset structure. You can use an array of offsets to represent the movement pattern + of your agent, for example an offset of (-1, 0) means your character is able + to move a single cell to the left for some predefined + options. + + + + + Constructor + + x-movement offset + y-movement offset + + + + X-position + + + + + Y-position + + + + + Relative cost of adding this offset to a position, either 1 for lateral movement, or sqrt(2) for diagonal movement + + + + + Computes a path in a grid according to the A* algorithm + + + + + A 2D position structure + + + + + Constructor + + the x-position + the y-position + + + + X-position + + + + + Y-position + + 物体的线性阻尼 @@ -230,6 +434,95 @@ + + + 相机对象 + + + + + 当前的Camera.tion矩阵 + + + + + 相机的位置 + + + + + 相机的缩放倍数 + + + + + 相机的旋转角度 + + + + + + + + + + 绘制 + + + + + 将着色器应用于相机表面 + + + + + 计算相机的变换矩阵 + + + + + + 计算给定游戏对象的摄像机的变换矩阵 + + 对象 + 变换矩阵 + + + + 转为屏幕坐标 + + 世界坐标 + 屏幕坐标 + + + + 转为世界坐标 + + 屏幕坐标 + 世界坐标 + + + + 对象转屏幕坐标 + + 对象 + 世界坐标 + + + + + 对象转世界坐标 + + 对象 + 世界坐标 + + + + + 转字符串 + + Camera名称 + 切换枚举 @@ -314,6 +607,78 @@ Initializes the body + + + 核心游戏类 + + + + + 游戏更新逻辑 + + + + + + 安排一次性或重复计时器,调用传入的Action + + 时间以秒为单位. + + + + + + + 安排一次性或重复计时器,调用传入的Action + + + + + + + + + 安排一次性或重复计时器,调用传入的Action + + + + + + + + + 安排一次性或重复计时器,调用传入的Action + + + + + + + + + + + + + + + 基本的CoroutineManager。 协同程序可以执行以下操作: + - yield return null + - yield return Coroutine.waitForSeconds(3) + - yield return Coroutine.waitForSeconds(5.5f) + - yield return startCoroutine(another()) + + + + + CoroutineManager用来隐藏Coroutine所需数据的内部类 + + + + + 无论何时产生延迟,都会将其添加到跟踪延迟的waitTimer中 + + Determines if the active tileset is going to be highlighted in the editor @@ -416,6 +781,11 @@ The stream Loaded font file + + + 事件阵营 + + 自身 @@ -436,150 +806,363 @@ 中立 - + - 事件的阵营 + 移动事件参数 - + - 需要使用的动画 + 移动方向 - + - + 是否正在移动 - + - + 哪个键按下 + 0: 无按键 + 1: 左键 + 2:右键 - + + + + - + - + 事件对象 + 记录事件的一系列数据 - + - 粒子保持活动的最短时间 + 目标移动坐标 - + - 粒子保持活动的最长时间 + 下一步移动坐标 - + - 粒子的初始尺度(最小范围) + 事件的阵营 - + - 粒子的初始尺度(最小范围) + 附加属性 - + - 粒子的初始尺度(最小范围) + 事件的血量 - + - 粒子的初始尺度(最小范围) + 事件的蓝量 - + - + 事件的经验 - + - + 事件的下一级升级所需经验 - + - + 事件是否有自己的碰撞器 - + - + 事件等级 - + - + 事件死亡 - + - - + 事件升级 + - + - + 事件移动 - + - + 初始化 - + - + 事件移动到指定坐标 + + + - + - + 更新 + - + - + 寻找一个离坐标点最近且无障碍的点 + - + - + 绘制 + + - + - + 适用于大部分RPG地图/传奇类地图 - + - + 地图文件的相对路径 - + - + 地图图块宽度 - + - + 地图图块高度 - The gametime - + - + 碰撞格子区域 + + + + + 透明区块 + + + + + 是否显示障碍 + + + + + 是否显示透明区域 + + + + + 是否给地图边缘自动添加边界碰撞 + + + + + + + + + + 事件对象集合 + + + + + + + + + + + + 根据世界坐标获取地图块位置 + + + + + + + + 根据地图块获取世界坐标 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 粒子保持活动的最短时间 + + + + + 粒子保持活动的最长时间 + + + + + 粒子的初始尺度(最小范围) + + + + + 粒子的初始尺度(最小范围) + + + + + 粒子的初始尺度(最小范围) + + + + + 粒子的初始尺度(最小范围) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The gametime + + + + The gametime The spriteBatch @@ -589,6 +1172,11 @@ + + + 图片对象 + + 显示模式 @@ -746,6 +1334,17 @@ The key you want to test + + + 游戏对象 + 该类可用于表示游戏中的对象。 您可以将组件附加到它 + + + + + 是否禁用 + + 对象的属性 @@ -786,6 +1385,17 @@ 是否独立旋转 + + + + + + + + + + + 对象的刚体组件 每个物体仅有一个刚体组件 @@ -800,7 +1410,7 @@ 设置父对象 - 父对象的transform + 父对象的transform @@ -827,6 +1437,19 @@ 移除自身 + + + 更新 + + + + + + 绘制 + + + + 获取自身的所有的组件 @@ -861,11 +1484,44 @@ 当鼠标与游戏对象发生碰撞时抛出的事件 + + + 鼠标未在对象上时抛出的事件 + + + + + 鼠标未在对象上时抛出的事件 + + + + + 当鼠标单击碰撞时抛出事件 + + + + + + 当鼠标按下碰撞时抛出事件 + + + + + + 当鼠标移动碰撞时抛出事件 + + 初始化此对象 + + + 测量尺寸 + + + 保存组件值 @@ -885,6 +1541,12 @@ 组件 是否成功 + + + 复制 + + 对象 + 按名称删除活动场景中的游戏对象 @@ -892,37 +1554,118 @@ - - - 初始化游戏场景。 - 此场景的图层,游戏对象和组件也已初始化 - + + + 根据标签寻找对象 + + 标签名 + 对象 - + - 创建一个新的INI文件来存储或加载数据 + 转字符串 + 对象名称 - + - 将数据写入INI文件 + 销毁 - - Section name - - Key Name - - Value Name - + - 从Ini文件中读取数据值 + 复制 - + 对象 + + + + 在没有与其他对象发生碰撞的框架中抛出的事件 + + + + + 当另一个对象与此冲突时抛出的事件 + + 另一个对象 + + + + 游戏场景 + + + + + 初始化游戏场景。 + 此场景的图层,游戏对象和组件也已初始化 + + + + + startCoroutine返回的接口,它提供了在中途停止协同程序的能力 + + + + + 停止Coroutine + + + + + 设置Coroutine是否应使用deltaTime或unscaledDeltaTime进行计时 + + The use unscaled delta time. + If set to true use unscaled delta time. + + + + causes a Coroutine to pause for the specified duration. Yield on Coroutine.waitForSeconds in a coroutine to use. + + The for seconds. + Seconds. + + + + 创建一个新的INI文件来存储或加载数据 + + + + + 将数据写入INI文件 + + + Section name + + Key Name + + Value Name + + + + 从Ini文件中读取数据值 + + + + + 调用停止以停止再次运行此计时器。 这对非重复计时器没有影响。 + + + + + 将计时器的经过时间重置为0 + + + + + 为方便起见,返回转换为T的上下文 + + The context. + 第一类参数. + 获取或设置输出超时。 默认值:1000 = 1秒 @@ -1126,6 +1869,43 @@ The amount + + + 将float放到x下面最接近的int值。 请注意,这仅适用于短范围内的值 + + + + + + + 此类表示一个对象组件 + + + + + 确定组件是否已禁用 + + + + + 组件对象的引用变换 + + + + + 组件的名称 + + + + + 编辑属性面板内是否允许展开 + + + + + 组件所在的对象 + + 从游戏对象中删除脚本时调用此方法 @@ -1136,6 +1916,19 @@ 在没有与其他对象发生碰撞的框架中抛出的事件 + + + 绘制 + + + + + + + 更新 + + + 鼠标未在对象上时抛出的事件 @@ -1174,6 +1967,56 @@ + + + 转字符串 + + + + + + 复制 + + 组件 + + + + 初始化 + + + + + warms up the cache filling it with a max of cacheCount objects + + new cache count + + + + trims the cache down to cacheCount items + + Cache count. + + + + clears out the cache + + + + + pops an item off the stack if available creating a new item as necessary + + + + + pushes an item back on the stack + + Object. + + + + Resets the object for reuse. Object references should be nulled and fields may be set to default values + + 用于更改旋转矩形的X和Y位置 @@ -1286,20865 +2129,22111 @@ 保存为历史路径 是否加载成功 - + - 凸多边形上的最大顶点数 + 脚本引擎 - + - 此类负责管理纹理加载。 - 将纹理加载到内存中以便快速使用,如果加载相同的纹理两次,它将在内存中使用相同的空间以保留资源。 - 如果要在运行时清除缓存,请执行TextureLoader.Clear() 方法。 + 脚本引擎 - + - 获取表示绝对变换的反转的矩阵 + 凸多边形上的最大顶点数 - + - 获取表示绝对变换的矩阵 + 一个简单的事件通知器 - + - 获取绝对比例 + - + - 获取绝对旋转 + 添加事件监听 + 事件类型 + 执行函数 - + - 根节点的属性 + 是否拥有该事件 + 事件类型 + - + - 对象的相对位置。 - 如果对象没有父对象,则返回世界位置 + 移除事件监听 + 事件类型 + 事件函数 - + - 跟随某个点 + 执行函数 - 坐标点 + 事件类型 - + - 根据名称寻找对象的属性 + 此类负责管理纹理加载。 + 将纹理加载到内存中以便快速使用,如果加载相同的纹理两次,它将在内存中使用相同的空间以保留资源。 + 如果要在运行时清除缓存,请执行TextureLoader.Clear() 方法。 - 名称 - 属性 - + - 对象的世界位置 + 时间类 - + - 移动对象 + 游戏运行的总时间 - 移动方向及速度 - + - 移动对象 + 从前一帧到当前的增量时间,由timeScale缩放 - x轴的方向及速度 - y轴的方向及速度 - + - 转到本地坐标 + deltaTime的非缩放版本。 不受timeScale的影响 - 相对值 - 本地值 - + - 转到绝对坐标 + 辅助deltaTime,用于在需要同时缩放两个不同的增量时使用 - 本地值 - 相对值 - - + - Audio decoding context. + 加载场景后的总时间 - + - Creates a new instance. + deltaTime的时间尺度 - The audio stream. - + - The underlying . + altDeltaTime的时间尺度 - + - The underlying . + 已通过的总帧数 - + - Gets the number of channels of the audio stream. + 允许检查间隔。 只应与deltaTime以上的区间值一起使用, + 否则它将始终返回true - + - Gets the sample rate of the audio stream, in Hz. + 将对象引用置零,以便GC可以根据需要进行拾取 - + - Gets the sample size (in bytes) of the audio stream. + 安排一次性或重复计时器,调用传入的Action + 时间以秒为单位. + If set to true repeats. + Context. + On time. - + - Returns a suitable audio resample context according to sample format, number of channels, and sample rate. - The context returned will be cached until this function is called again with different arguments. + 变换类 - Sample format of the output. - Number of channels of the output. - Sample rate of the output (Hz). - Cached or created resample context. - - + - The coordinator and core of decoding management. + 根节点的属性 - + - Creates a new instance. + - The URL of the video source. If a file system path is provided, make sure it is an absolute path. - Decoding options. - + - Raises when video playback is ended. + - - This event MUST be raised asynchronously. - The reason is that subscribers (i.e. ) may raise their events synchrously. - The call flow can go to , where is called. - Inside , it calls on , - which waits for the decoding thread that raises the initial event infinitely. - So you see, there will be a dead lock if is raised synchronously. - + + - + - The underlying . + + + + - + - The associated with this . - May be if there is no video stream. + 父变换 - + - The associated with this . - May be if there is no audio stream. + 所依附的对象 - + - The index of the video stream finally selected in the . - May be -1 if there is no video stream. + 子对象列表 - + - The index of the audio stream finally selected in the . - May be -1 if there is no audio stream. + 对象的相对位置。 + 如果对象没有父对象,则返回世界位置 - + - Fetches the latest decoded video frame. - Remember to lock when you use the fetched frame. + 当前缩放 - The latest decoded video frame. - + - Name of the video codec. - May be if there is no video stream. + 当前旋转 - + - Name of the audio codec. - May be if there is no audio stream. + 子对象数量 - + - The index of the video stream user selected. - May be -1 for auto selection. + 设置父变换 + 变换 - + - The index of the audio stream user selected. - May be -1 for auto selection. + 看向某个点 + 坐标点 + 是否立即改变 - + - Gets the number of all types of streams in the media file. + 根据名称寻找对象的属性 - Number of all type of streams. + 名称 + 属性 - + - Gets the number of video streams in the media file. + 对象的世界位置 - Number of video streams. - + - Gets the number of audio streams in the media file. + 移动对象 - Number of audio streams. + 移动方向及速度 - + - Selects a video stream by index. - This method is only valid before initialization. + 移动对象 - The index of video streams. + x轴的方向及速度 + y轴的方向及速度 - + - Selects an audio stream by index. - This method is only valid before initialization. + 深度复制 - The index of audio streams. + 是否复制对象 + 复制对象的属性 - + - Forces initializing before it is automatically initialized by calling specific methods. + 转字符串 + - + - Reset the state of this for restarting playback. + 复制 + - + - Seek to the specified time. If the time is out of video range, it calls . + 默认构造函数 - - + - Gets the duration of the video file, in seconds. + 在输入位置绘制一个像素 - The duration of the video file, in seconds. + spritebatch + 位置 X + 位置 Y + 颜色 - + - Reads video packets and decode them into video frames, until presentation time of the frame decoded is after specified time. + 在输入位置绘制一个框 - Current playback time, in seconds. + spritebatch + 目标矩形 + 颜色 + 边框宽度 - + - Reads audio packets, decode them into audio frames and send the data to an , until presentation time of the frame decoded is after specified time. + 在输入位置绘制一个框 - The to play audio data. - Current playback time, in seconds. + spritebatch + 左上角位置 + 右下位置 + 颜色 - + - The lock object used to avoid unwanted frame data overwrites. + 在输入位置绘制一个填充框 + spritebatch + 位置 X + 位置 Y + 宽度 + 高度 + 颜色 - + - Tries to get the next video packet. + 在输入位置绘制一个填充框 - The packet got, or an empty packet if the operation fails. - if the operation succeeds, otherwise . + spritebatch + 左上角位置 + 右下位置 + 颜色 - + - Tries to get the next audio packet. + 在输入位置绘制一个填充框 - The packet got, or an empty packet if the operation fails. - if the operation succeeds, otherwise . + spritebatch + 目标矩形 + 颜色 - + - Tries to fill a until the number of queued packets reaches expected count. + 在输入位置画一条线 - The packet queue to fill. - Expected count. - if the queue has at least expected number of items when the function returns, otherwise . + spritebatch + 位置 X1 + 位置 Y1 + 位置 X2 + 位置 Y2 + 颜色 + 行宽 - + - Tries to decode and fetch some video frames, and store them in the videoframe queue. + 在输入位置画一条线 - Expected count. - if the video frame queue has at least one frame when the function returns, otherwise . + spritebatch + 开始的位置 + 结束位置 + 颜色 + 行宽 - + - Tries to decode and fetch an audio frame and fill the data in given . + 绘制圆形 - The frame which stores the data. - if the operation succeeds, otherwise . + 目标绘图表面 + 圆的中心 + 圆的半径 + 要生成的边数 + 圆的颜色 - + - Reads the next packet, and enqueue it to corresponding packet queue. + - The animation player is used to play the animation data and manage the animation states. - if the operation succeeds, otherwise . - - When this function returns , it doesn't mean that a packet is enqueued. - Since the only holds at most one video stream and one audio stream, - packets from any other streams are ignored. So you should always use an "ensure" function to make sure - a packet is enqueued. - - - + + + DragonBones 3.0 + en_US - The time of latest decoded video frame, in seconds. - See for its usage. + - 动画播放器用来播放动画数据和管理动画状态。 + + + DragonBones 3.0 + zh_CN - + - Whether is raised. + - The play speed of all animations. [0: Stop, (0~1): Slow, 1: Normal, (1~N): Fast] - - + 1.0 + DragonBones 3.0 + en_US - Start time of the first frame in the video stream, in video stream's time base. + - 所有动画的播放速度。 [0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] + 1.0 + DragonBones 3.0 + zh_CN - - - Start time of the first frame in the audio stream, in audio stream's time base. - + + - - - Does the data from the last audio packet still have remains to fill into another audio frame? - + + + - - - The video frame pool. - + + + - + - Decoded video frames. For each entry, the key is the presentation timestamp (PTS) and the value is pointer to the decoded frame (). + - Clear all animations states. - - The frames are managed by the video frame pool. You should not dispose frames retrived from this list. - - - + + DragonBones 4.5 + en_US - video/audio decoding options. + - 清除所有的动画状态。 + + DragonBones 4.5 + zh_CN - + - Creates a new instance. + - Pause a specific animation state. - The capacity of video packet queue. - The capacity of audio packet queue. - The minimum size of the video packet queue. - The minimum size of the audio packet queue. - The method to scale a video frame. - /// Extra buffering time of audio data, in milliseconds. - - + - The name of animation state. (If not set, it will pause all animations) + + DragonBones 3.0 + en_US - The capacity of video packet queue. + - 暂停指定动画状态的播放。 + - 动画状态名称。 (如果未设置,则暂停所有动画) + + DragonBones 3.0 + zh_CN - + - The capacity of audio packet queue. + - Play animation with a specific animation config. + The API is still in the experimental phase and may encounter bugs or stability or compatibility issues when used. - - + - The animation config. + The playing animation state. + + + DragonBones 5.0 + en_US - The minimum size of the video packet queue. + - 通过指定的动画配置来播放动画。 + 该 API 仍在实验阶段,使用时可能遭遇 bug 或稳定性或兼容性问题。 + - 动画配置。 + 播放的动画状态。 + + + DragonBones 5.0 + zh_CN - + - The minimum size of the audio packet queue. + - Play a specific animation. - - + - The name of animation data. (If not set, The default animation will be played, or resume the animation playing from pause status, or replay the last playing animation) + - Playing repeat times. [-1: Use default value of the animation data, 0: No end loop playing, [1~N]: Repeat N times] (default: -1) + The playing animation state. + + TypeScript style, for reference only. +
+                armature.animation.play("walk");
+            
+
+ DragonBones 3.0 + en_US - The method to scale a video frame. + - 播放指定动画。 + - 动画数据名称。 (如果未设置,则播放默认动画,或将暂停状态切换为播放状态,或重新播放之前播放的动画) + - 循环播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + 播放的动画状态。 + + TypeScript 风格,仅供参考。 +
+                armature.animation.play("walk");
+            
+
+ DragonBones 3.0 + zh_CN
- + - Delay of audio data, in milliseconds. + - Fade in a specific animation. - - + - The name of animation data. + - The fade in time. [-1: Use the default value of animation data, [0~N]: The fade in time (In seconds)] (Default: -1) + - playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) + - The blending layer, the animation states in high level layer will get the blending weights with high priority, when the total blending weights are more than 1.0, there will be no more weights can be allocated to the other animation states. (Default: 0) + - The blending group name, it is typically used to specify the substitution of multiple animation states blending. (Default: null) + - The fade out mode, which is typically used to specify alternate mode of multiple animation states blending. (Default: AnimationFadeOutMode.SameLayerAndGroup) + The playing animation state. + + TypeScript style, for reference only. +
+                armature.animation.fadeIn("walk", 0.3, 0, 0, "normalGroup").resetToPose = false;
+                armature.animation.fadeIn("attack", 0.3, 1, 0, "attackGroup").resetToPose = false;
+            
+
+ DragonBones 4.5 + en_US - Default decoding options. + - 淡入播放指定的动画。 + - 动画数据名称。 + - 淡入时间。 [-1: 使用动画数据默认值, [0~N]: 淡入时间 (以秒为单位)] (默认: -1) + - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + - 混合图层,图层高的动画状态会优先获取混合权重,当混合权重分配总和超过 1.0 时,剩余的动画状态将不能再获得权重分配。 (默认: 0) + - 混合组名称,该属性通常用来指定多个动画状态混合时的相互替换关系。 (默认: null) + - 淡出模式,该属性通常用来指定多个动画状态混合时的相互替换模式。 (默认: AnimationFadeOutMode.SameLayerAndGroup) + 播放的动画状态。 + + TypeScript 风格,仅供参考。 +
+                armature.animation.fadeIn("walk", 0.3, 0, 0, "normalGroup").resetToPose = false;
+                armature.animation.fadeIn("attack", 0.3, 1, 0, "attackGroup").resetToPose = false;
+            
+
+ DragonBones 4.5 + zh_CN
- + - This static class contains extension methods for to provide a queue-like API (enqueue, dequeue). + - Play a specific animation from the specific time. - - + - The name of animation data. + - The start time point of playing. (In seconds) + - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) + The played animation state. + DragonBones 4.5 + en_US - Enqueue a value to the according to its key. + - 从指定时间开始播放指定的动画。 - Type of the keys in this . - Type of the values in this . - The to enqueue. - The key of the value to be enqueued. - The value to be enqueued. + - 动画数据名称。 + - 播放开始的时间。 (以秒为单位) + - 循环播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + 播放的动画状态。 + DragonBones 4.5 + zh_CN - + - Dequeues a value from the and returns the value. + - Play a specific animation from the specific frame. - Type of the keys in this . - Type of the values in this . - The to dequeue. - Dequeued value. - - + - The name of animation data. + - The start frame of playing. + - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) + The played animation state. + DragonBones 4.5 + en_US - Peeks the key of the first value in the . + - 从指定帧开始播放指定的动画。 - Type of the keys in this / - Type of the values in this . - The to peek. - The key of the first value in this . + - 动画数据名称。 + - 播放开始的帧数。 + - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + 播放的动画状态。 + DragonBones 4.5 + zh_CN - + - Provides service to initialize FFmpeg binaries its static context. + - Play a specific animation from the specific progress. - - + - The name of animation data. + - The start progress value of playing. + - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) + The played animation state. + DragonBones 4.5 + en_US - Initialize the FFmpeg binaries, and its static context if the previous step succeeds. + - 从指定进度开始播放指定的动画。 - The path to 32-bit FFmpeg binaries. - The path to 64-bit FFmpeg binaries. + - 动画数据名称。 + - 开始播放的进度。 + - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + 播放的动画状态。 + DragonBones 4.5 + zh_CN - - + - Represents an exception caused by FFmpeg functions. + - Stop a specific animation at the specific time. - - - + - The name of animation data. + - The stop time. (In seconds) + The played animation state. + DragonBones 4.5 + en_US - Creates a new instance. + - 在指定时间停止指定动画播放 + - 动画数据名称。 + - 停止的时间。 (以秒为单位) + 播放的动画状态。 + DragonBones 4.5 + zh_CN - - + - Creates a new instance and sets the error message. + - Stop a specific animation at the specific frame. - The error message. - - + - The name of animation data. + - The stop frame. + The played animation state. + DragonBones 4.5 + en_US - Provides some helper functions for FFmpeg decoding. + - 在指定帧停止指定动画的播放 + - 动画数据名称。 + - 停止的帧数。 + 播放的动画状态。 + DragonBones 4.5 + zh_CN - + - Required output format for (). - This value correspond to the default texture surface format () in MonoGame. + - Stop a specific animation at the specific progress. - - - + - The name of animation data. + - The stop progress value. + The played animation state. + DragonBones 4.5 + en_US - Required output format for (). - This sample format fits . + - 在指定的进度停止指定的动画播放。 + - 动画数据名称。 + - 停止进度。 + 播放的动画状态。 + DragonBones 4.5 + zh_CN - + - Required number of channels of the output for . - This channel count fits . + - Get a specific animation state. - - + - The name of animation state. + + TypeScript style, for reference only. +
+                armature.animation.play("walk");
+                let walkState = armature.animation.getState("walk");
+                walkState.timeScale = 0.5;
+            
+
+ DragonBones 3.0 + en_US - Required sample rate for , in Hz. - It can be other frequencies, such as 22050, 32000, 48000, 96000, etc. - Considering that most of the devices support 44100 Hz output and the quality is reasonale, the sample rate is chosen as 44100 Hz. + - 获取指定的动画状态 + - 动画状态名称。 + + TypeScript 风格,仅供参考。 +
+                armature.animation.play("walk");
+                let walkState = armature.animation.getState("walk");
+                walkState.timeScale = 0.5;
+            
+
+ DragonBones 3.0 + zh_CN
- + - Required number of channels, using enum. + - Check whether a specific animation data is included. - - - + - The name of animation data. + + DragonBones 3.0 + en_US - Verifies the error code returned by FFmpeg functions. - If an error occurs, this method throws a . + - 检查是否包含指定的动画数据 - The error code. + - 动画数据名称。 + + DragonBones 3.0 + zh_CN - + - Verifies the error code returned by FFmpeg functions. - If an error occurs, this method calls a user-specified clean-up method, then throws a . + - Get all the animation states. - The error code. - The clean-up method. Ignored if set to . - - + DragonBones 5.1 + en_US - Retrieves the duration information included in , in seconds. + - 获取所有的动画状态 - The , representing a media file. - Duration, in seconds. - - Not all containers (what represents) contain duration information. - The best practice is use to get the duration of a stream, because some media files has multiple streams with different lengths (e.g. director's cut and theater's cut in one .mkv). - That method is accurate but requires user interaction to select the stream they want, also that situation is not so common. So here we still use to get the duration. - + DragonBones 5.1 + zh_CN - + - Calculates the corresponding value of a PTS (presentation timestamp) in seconds, based on given 's time base. + - Check whether there is an animation state is playing - The whose time base is going to be the calculation standard. - Value of the presentation timestamp. - - - + + DragonBones 3.0 + en_US - Converts given time in seconds to stream timestamp, based on given 's time base. + - 检查是否有动画状态正在播放 - The whose time base is going to be the calculation standard. - Time, in seconds. - + + DragonBones 3.0 + zh_CN - + - Converts given time in seconds to stream timestamp, based on FFmpeg's default time base (). + - Check whether all the animation states' playing were finished. - Time, in seconds. - - - + + DragonBones 3.0 + en_US - Converts given time in seconds to stream timestamp, based on FFmpeg's default time base (), with an extra PTS offset. + - 检查是否所有的动画状态均已播放完毕。 - Time, in seconds. - Extra starting PTS. For example, the video starting PTS. - + + DragonBones 3.0 + zh_CN - + - Gets a null-ended string from its pointer. - Similar to , but this function lets you choose a custom encoding. + - The name of the last playing animation state. - The pointer to the string. - The encoding of the string. - The string, in . - - + + DragonBones 3.0 + en_US - Transmit data from current video frame of a to a using an auto allocated data buffer. - The texture's surface format must be . + - 上一个播放的动画状态名称 - The - The to transmit to. - if all successful, otherwise . - + + DragonBones 3.0 + zh_CN - + - Transmit data from current video frame of a to a using a custom data buffer. - The buffer must have enough capacity to hold all the data of the texture. - The texture's surface format must be . + - The name of all animation data - The - The to transmit to. - The data buffer. - if all successful, otherwise . - - - + DragonBones 4.5 + en_US - Transmit data from current video frame of a to a buffer. - The buffer holds data for a . It must have enough capacity to hold the data from a buffer with specified width and height, and format . + - 所有动画数据的名称 - The - Width of the texture. - Height of the texture. - The data buffer. - if all successful, otherwise . - + DragonBones 4.5 + zh_CN - + - Transmits the given audio frame to an auto allocated buffer. Returns whether the operation is success, and the buffer when it succeeds. + - All animation data. - The containing decoding information. - The containing decoded audio data. - An auto allocated buffer. If the function succeeds, it contains audio data of required format. The data is NOT planar. - if all operation succeeds, otherwise . - - - - - + DragonBones 4.5 + en_US - Helper class for . Internal use only. + - 所有的动画数据。 + DragonBones 4.5 + zh_CN - + - Gets the running instance. It depends on the property name and lifecycle of . + - An AnimationConfig instance that can be used quickly. - The game instance. - - + + DragonBones 5.0 + en_US - Represents a subtitle renderer interface. + - 一个可以快速使用的动画配置实例。 + + DragonBones 5.0 + zh_CN - + - Gets or sets whether this renderer is enabled. + - The last playing animation state - - + + DragonBones 3.0 + en_US - Gets or sets the dimensions (expected width and height) of this renderer. + - 上一个播放的动画状态 + + DragonBones 3.0 + zh_CN - + - Renders the subtitle to the specified texture. + - The animation state is generated when the animation data is played. - The time when the corresponding subtitle should be rendered. - The texture to render to. - - - - + + + DragonBones 3.0 + en_US - A base implementation of + - 动画状态由播放动画数据时产生。 + + + DragonBones 3.0 + zh_CN - - - - - + + - - + + - - + - Provides access to video file information. + - Whether the animation state has control over the display object properties of the slots. + Sometimes blend a animation state does not want it to control the display object properties of the slots, + especially if other animation state are controlling the display object properties of the slots. - - + true + DragonBones 5.0 + en_US - Creates a new instance. + - 动画状态是否对插槽的显示对象属性有控制权。 + 有时混合一个动画状态并不希望其控制插槽的显示对象属性, + 尤其是其他动画状态正在控制这些插槽的显示对象属性时。 - video source URL. May be a file system path. - Decoding options. + true + DragonBones 5.0 + zh_CN - + - Raises when the playback of this video is ended (normally or exceptionally). + - Whether to reset the objects without animation to the armature pose when the animation state is start to play. + This property should usually be set to false when blend multiple animation states. - - + true + DragonBones 5.1 + en_US - Duration of this video. + - 开始播放动画状态时是否将没有动画的对象重置为骨架初始值。 + 通常在混合多个动画状态时应该将该属性设置为 false。 + true + DragonBones 5.1 + zh_CN - + - Number of frames per second (FPS) of this video. + - The play times. [0: Loop play, [1~N]: Play N times] - - + DragonBones 3.0 + en_US - Height of this video, in pixels. + - 播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] + DragonBones 3.0 + zh_CN - + - video soundtrack type. + - The blend layer. + High layer animation state will get the blend weight first. + When the blend weight is assigned more than 1, the remaining animation states will no longer get the weight assigned. - In this implementation, the value is always . - - + + DragonBones 5.0 + en_US - Width of this video, in pixels. + - 混合图层。 + 图层高的动画状态会优先获取混合权重。 + 当混合权重分配超过 1 时,剩余的动画状态将不再获得权重分配。 + + DragonBones 5.0 + zh_CN - + - (Non-standard extension) The decoding options used to create this video. + - The play speed. + The value is an overlay relationship with {@link dragonBones.Animation#timeScale}. + [(-N~0): Reverse play, 0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] - - + 1.0 + DragonBones 3.0 + en_US - (Non-standard extension) Gets the number of video streams in the media file. + - 播放速度。 + 该值与 {@link dragonBones.Animation#timeScale} 是叠加关系。 + [(-N~0): 倒转播放, 0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] - Number of video streams. + 1.0 + DragonBones 3.0 + zh_CN - + - (Non-standard extension) Gets the number of audio streams in the media file. + - The blend weight. - Number of audio streams. - - + 1.0 + DragonBones 5.0 + en_US - (Non-standard extension) Selects a video stream by index. - This method is only valid before initialization. + - 混合权重。 - The index of video streams. + 1.0 + DragonBones 5.0 + zh_CN - + - (Non-standard extension) Selects an audio stream by index. - This method is only valid before initialization. + - The auto fade out time when the animation state play completed. + [-1: Do not fade out automatically, [0~N]: The fade out time] (In seconds) - The index of video streams. - - + -1.0 + DragonBones 5.0 + en_US - (Non-standard extension) The index of the video stream user selected. - May be -1 for auto selection. + - 动画状态播放完成后的自动淡出时间。 + [-1: 不自动淡出, [0~N]: 淡出时间] (以秒为单位) + -1.0 + DragonBones 5.0 + zh_CN - - - (Non-standard extension) The index of the audio stream user selected. - May be -1 for auto selection. - + + - + - The decode context of this video. + - The name of the animation state. (Can be different from the name of the animation data) - - + + DragonBones 5.0 + en_US - Forces initializing the . + - 动画状态名称。 (可以不同于动画数据) + + DragonBones 5.0 + zh_CN - + - Retrieves latest decoded video frame in internal and transmits its data to a . - Returns whether the operation is successful. + - The blend group name of the animation state. + This property is typically used to specify the substitution of multiple animation states blend. - The serving as the data buffer. - if the operation is successful, otherwise . - If the operation fails, you should not use the data inside that . - - - + + DragonBones 5.0 + en_US - Provides video playing service. + - 混合组名称。 + 该属性通常用来指定多个动画状态混合时的相互替换关系。 + + DragonBones 5.0 + zh_CN - - + - Creates a new instance. + - xx: Play Enabled, Fade Play Enabled + + - - + - Creates a new instance using specified and default player options.. + -1: Fade in, 0: Fade complete, 1: Fade out; - The graphics device to use. + + - + - Creates a new instance using specified and . + -1: Fade start, 0: Fading, 1: Fade complete; - The graphics device to use. - Player options. + + - - - Sets whether video playbacks are looped. - - - This implementation provides simulated looping. - Note that supports looping naturally. - Looping via carefully managing packet buffers ("real looping") may be implemented in the future. - + + + - - - Gets/sets whether video playbacks are muted. - + + + - - - Gets/sets current playback position. - Note: the setter is a non-standard extension. - + + + - - - Gets the playback state. - + + + - - - Gets the playing video, if there is any. - + + + - - - Gets/sets playback volume. - + + + - - - Gets a containing data of current video frame. - Do NOT dispose the obtained texture. - - Current video frame represented by a . - Thrown if no video is loaded. + + + - - - Pauses the playback. - + + + - - - Plays a from the beginning. - - The video to play. + + - - - Resumes playback. - + + + - - - Stops playback. - + + + - + - (Non-standard extension) Equivalent for then the same video file. + - Continue play. - Thrown when no video is loaded. - - + DragonBones 3.0 + en_US - (Non-standard extension) Gets or sets the subtitle renderer. + - 继续播放。 - Thrown if setting subtitle renderer when playback is not stopped. + DragonBones 3.0 + zh_CN - + - (Non-standard extension) Required texture format (). + - Stop play. - - - + DragonBones 3.0 + en_US - Loads a video. + - 暂停播放。 - The video to load. + DragonBones 3.0 + zh_CN - + - Retrieves the data of current video frame and writes it into specified buffer. - The must use surface format . - This method avoids recreating textures every time to achieve a better performance. + - Fade out the animation state. - The texture that receives the data of current video frame. - if the operation succeeds, otherwise . - - + - The fade out time. (In seconds) + - Whether to pause the animation playing when fade out. + DragonBones 3.0 + en_US - The decoding thread of a . + - 淡出动画状态。 + - 淡出时间。 (以秒为单位) + - 淡出时是否暂停播放。 + DragonBones 3.0 + zh_CN - + - Creates a new instance. + - Check if a specific bone mask is included. - The parent . - Player options. - - + - The bone name. + DragonBones 3.0 + en_US - Starts the underlying . + - 检查是否包含特定骨骼遮罩。 + - 骨骼名称。 + DragonBones 3.0 + zh_CN - + - Sends a termination signal to the underlying , and waits for it to exit. + - Add a specific bone mask. - - + - The bone name. + - Whether or not to add a mask to the bone's sub-bone. + DragonBones 3.0 + en_US - The underlying . + - 添加特定的骨骼遮罩。 + - 骨骼名称。 + - 是否为该骨骼的子骨骼添加遮罩。 + DragonBones 3.0 + zh_CN - + - Returns if the thread is still running, if the thread exited abnormally, - and if the thread exited normally. + - Remove the mask of a specific bone. - - + - The bone name. + - Whether to remove the bone's sub-bone mask. + DragonBones 3.0 + en_US - Worker thread procedure. + - 删除特定骨骼的遮罩。 + - 骨骼名称。 + - 是否删除该骨骼的子骨骼遮罩。 + DragonBones 3.0 + zh_CN - - + - An object pool implementation. + - Remove all bone masks. - Type of objects in the pool. - - + DragonBones 3.0 + en_US - Creates a new instance. + - 删除所有骨骼遮罩。 - Threshold when calling . - Allocation function. - Deallocation function. + DragonBones 3.0 + zh_CN - + - Acquires an object. If there is no object available, it will call to create one. + - Whether the animation state is fading in. - Acquired or allocated object. - - + DragonBones 5.1 + en_US - Allocates a new object and returns it. + - 是否正在淡入。 - Allocated object. + DragonBones 5.1 + zh_CN - + - Releases an object. + - Whether the animation state is fading out. - The object to release. If this value is , the method does nothing. - - + DragonBones 5.1 + en_US - Releases and deallocates an object. + - 是否正在淡出。 - The object to destroy. If this value is , the method does nothing. - if the object is found in the pool and successfully destroyed, otherwise . + DragonBones 5.1 + zh_CN - + - Deallocates all unused objects. - If number of objects in this pool is smaller than the threshold set when creating the pool, this method does nothing. + - Whether the animation state is fade completed. - - + DragonBones 5.1 + en_US - Destroys all objects in this pool. Used for preparing restarting playback. + - 是否淡入或淡出完毕。 + DragonBones 5.1 + zh_CN - + - Number of objects in this pool. + - Whether the animation state is playing. - - + DragonBones 3.0 + en_US - Number of objects in use. + - 是否正在播放。 + DragonBones 3.0 + zh_CN - - + - A simple packet queue for s. - The packet order satisfies that: 1. the packet with smaller primary key stays in the front; - 2. if two primary keys are equal, secondary keys apply; 3. otherwise, first-in-first-out (FIFO). + - Whether the animation state is play completed. - - - + DragonBones 3.0 + en_US - Creates a new instance using the default comparing method and default initial capacity. + - 是否播放完毕。 + DragonBones 3.0 + zh_CN - + - Creates a new instance using specified comparing method and default initial capacity. + - The times has been played. - Comparing method. - - + DragonBones 3.0 + en_US - Creates a new instance using the default comparing method and specified initial capacity. + - 已经循环播放的次数。 - Initial capacity. + DragonBones 3.0 + zh_CN - + - Creates a new instance using the specified comparing method and initial capacity. + - The total time. (In seconds) - Comparing method. - Initial capacity. - - + DragonBones 3.0 + en_US - Default comparing method. + - 总播放时间。 (以秒为单位) + DragonBones 3.0 + zh_CN - + - Enqueues an . + - The time is currently playing. (In seconds) - The packet to enqueue. - - + DragonBones 3.0 + en_US - Dequeues an and returns it. + - 当前播放的时间。 (以秒为单位) - The packet dequeued. + DragonBones 3.0 + zh_CN - - - Clears the . - + + + - - - Gets the number of packets in the . - + + + - + - The comparing method of this . + -1: First blending, 0: No blending, 1: Blending. - - - Comparing methods for . - + + + - - - Compare by DTS. If values are equal, compare by PTS. - + + + - - - Compare by PTS. If values are equal, compare by DTS. - + + + - - - Picture frame scaling methods. - + + + - - - Use the default method. - + + + - - - Use fast bilinear interpolation. - + + + - + - Use bilinear interpolation. + - Play animation interface. (Both Armature and Wordclock implement the interface) + Any instance that implements the interface can be added to the Worldclock instance and advance time by Worldclock instance uniformly. - - + + + DragonBones 3.0 + en_US - Use bicubic interpolation. + - 播放动画接口。 (Armature 和 WordClock 都实现了该接口) + 任何实现了此接口的实例都可以添加到 WorldClock 实例中,由 WorldClock 实例统一更新时间。 + + + DragonBones 3.0 + zh_CN - + - Use experimental algorithm. - The meaning is taken from https://ffmpeg.org/ffmpeg-scaler.html. + - Advance time. - - + - Passed time. (In seconds) + DragonBones 3.0 + en_US - Use neighbor approximation. + - 更新时间。 + - 前进的时间。 (以秒为单位) + DragonBones 3.0 + zh_CN - - - Use area averaging. - + + + - - - Use bicubic interpolation for luma and bilinear for chroma. - + + + - - - Use Gaussian rescaling. - + + + - - - Use sinc rescaling. - + + + - - - Use Lanczos filter for rescaling. - + + + - - - Use natural bicubic spline interpolation. - + + + - - - - video decoding context. - + + + - - - Creates a new instance. - - The video stream. - Decoding options. + + + - - - The underlying . - + + + - - - The underlying . - + + + - + - Returns a suitable audio rescale context according to output width and height. - The context returned will be cached until this function is called again with different arguments. + - Worldclock provides clock support for animations, advance time for each IAnimatable object added to the instance. - Output width, in pixels. - Output height, in pixels. - Cached or created rescale context. - - + + + DragonBones 3.0 + en_US - Gets the number of average frames per second (FPS) of the video stream. + - WorldClock 对动画提供时钟支持,为每个加入到该实例的 IAnimatable 对象更新时间。 - Average FPS of the video stream. + + + DragonBones 3.0 + zh_CN - + - Gets the width of the video stream, in pixels. + - Current time. (In seconds) - The width of the video stream. - - + DragonBones 3.0 + en_US - Gets the height of the video stream, in pixels. + - 当前的时间。 (以秒为单位) - The height of the video stream. + DragonBones 3.0 + zh_CN - + - video helper class. + - The play speed, used to control animation speed-shift play. + [0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] - - - - Loads a video from file system using default decoding options. - - The path of the video file. - Loaded video. - - + 1.0 + DragonBones 3.0 + en_US - Loads a video from file system using specified decoding options. + - 播放速度,用于控制动画变速播放。 + [0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] - The path of the video file. - The decoding options to use. - Loaded video. + 1.0 + DragonBones 3.0 + zh_CN - + - Loads a video from a URL using default decoding options. + - Creating a Worldclock instance. Typically, you do not need to create Worldclock instance. + When multiple Worldclock instances are running at different speeds, can achieving some specific animation effects, such as bullet time. - The URL of the video source. - Loaded video. - - + DragonBones 3.0 + en_US - Loads a video from a URL using specified decoding options. + - 创建一个 WorldClock 实例。通常并不需要创建 WorldClock 实例。 + 当多个 WorldClock 实例使用不同的速度运行时,可以实现一些特殊的动画效果,比如子弹时间等。 - The URL of the video source. - The decoding options to use. - Loaded video. + DragonBones 3.0 + zh_CN - + - Options for . + - Advance time for all IAnimatable instances. - - + - Passed time. [-1: Automatically calculates the time difference between the current frame and the previous frame, [0~N): Passed time] (In seconds) + DragonBones 3.0 + en_US - Creates a new instance. + - 为所有的 IAnimatable 实例更新时间。 - The sleeping interval of decoding thread, in milliseconds. - Minimum number of audio buffers. + - 前进的时间。 [-1: 自动计算当前帧与上一帧的时间差, [0~N): 前进的时间] (以秒为单位) + DragonBones 3.0 + zh_CN - + - The sleeping interval of decoding thread, in milliseconds. + - Check whether contains a specific instance of IAnimatable. - - + - The IAnimatable instance. + DragonBones 3.0 + en_US - Minimum number of audio buffers. + - 检查是否包含特定的 IAnimatable 实例。 + - IAnimatable 实例。 + DragonBones 3.0 + zh_CN - + - Default video player options. + - Add IAnimatable instance. - - + - The IAnimatable instance. + DragonBones 3.0 + en_US - + - 添加 IAnimatable 实例。 + - IAnimatable 实例。 + DragonBones 3.0 + zh_CN - + - + - Removes a specified IAnimatable instance. - - + - The IAnimatable instance. + DragonBones 3.0 + en_US - + - 移除特定的 IAnimatable 实例。 + - IAnimatable 实例。 + DragonBones 3.0 + zh_CN - + - + - Clear all IAnimatable instances. - - + DragonBones 3.0 + en_US - + - 清除所有的 IAnimatable 实例。 + DragonBones 3.0 + zh_CN - + - + - Deprecated, please refer to {@link dragonBones.BaseFactory#clock}. - - + en_US - + - 已废弃,请参考 {@link dragonBones.BaseFactory#clock}。 + zh_CN - + - + - Armature is the core of the skeleton animation system. - - + + + + + DragonBones 3.0 + en_US - + - 骨架是骨骼动画系统的核心。 + + + + + DragonBones 3.0 + zh_CN - + - + - Whether to inherit the animation control of the parent armature. + True to try to have the child armature play an animation with the same name when the parent armature play the animation. - - + true + DragonBones 4.5 + en_US - + - 是否继承父骨架的动画控制。 + 如果该值为 true,当父骨架播放动画时,会尝试让子骨架播放同名动画。 + true + DragonBones 4.5 + zh_CN - - - - + + - - - - + + + - - - - + + + - - - - + + + - - - - - + + + - - - - - - + + + - - - - - + + + - - - - + + - - - - + + + - - - - + + + - - - - - - - + + + - - - - + + + - - - - - + + + - + - + - Dispose the armature. (Return to the object pool) - - - - + + TypeScript style, for reference only. +
+                removeChild(armature.display);
+                armature.dispose();
+            
+
+ DragonBones 3.0 + en_US - + - 释放骨架。 (回收到对象池) - - + + TypeScript 风格,仅供参考。 +
+                removeChild(armature.display);
+                armature.dispose();
+            
+
+ DragonBones 3.0 + zh_CN
- - - - - - + + + - - - - - + + - + - + - Forces a specific bone or its owning slot to update the transform or display property in the next frame. - - - - + - The bone name. (If not set, all bones will be update) + - Whether to update the bone's slots. (Default: false) + + + DragonBones 3.0 + en_US - + - 强制特定骨骼或其拥有的插槽在下一帧更新变换或显示属性。 - + - 骨骼名称。 (如果未设置,将更新所有骨骼) + - 是否更新骨骼的插槽。 (默认: false) + + + DragonBones 3.0 + zh_CN - + - - - - - - - + - Check whether a specific point is inside a custom bounding box in a slot. + The coordinate system of the point is the inner coordinate system of the armature. + Custom bounding boxes need to be customized in Dragonbones Pro. - - - - + - The horizontal coordinate of the point. + - The vertical coordinate of the point. + DragonBones 5.0 + en_US - + - 检查特定点是否在某个插槽的自定义边界框内。 + 点的坐标系为骨架内坐标系。 + 自定义边界框需要在 DragonBones Pro 中自定义。 - - + - 点的水平坐标。 + - 点的垂直坐标。 + DragonBones 5.0 + zh_CN - + - + - Check whether a specific segment intersects a custom bounding box for a slot in the armature. + The coordinate system of the segment and intersection is the inner coordinate system of the armature. + Custom bounding boxes need to be customized in Dragonbones Pro. - - - - + - The horizontal coordinate of the beginning of the segment. + - The vertical coordinate of the beginning of the segment. + - The horizontal coordinate of the end point of the segment. + - The vertical coordinate of the end point of the segment. + - The first intersection at which a line segment intersects the bounding box from the beginning to the end. (If not set, the intersection point will not calculated) + - The first intersection at which a line segment intersects the bounding box from the end to the beginning. (If not set, the intersection point will not calculated) + - The normal radians of the tangent of the intersection boundary box. [x: Normal radian of the first intersection tangent, y: Normal radian of the second intersection tangent] (If not set, the normal will not calculated) + The slot of the first custom bounding box where the segment intersects from the start point to the end point. + DragonBones 5.0 + en_US - + - 检查特定线段是否与骨架的某个插槽的自定义边界框相交。 + 线段和交点的坐标系均为骨架内坐标系。 + 自定义边界框需要在 DragonBones Pro 中自定义。 + - 线段起点的水平坐标。 + - 线段起点的垂直坐标。 + - 线段终点的水平坐标。 + - 线段终点的垂直坐标。 + - 线段从起点到终点与边界框相交的第一个交点。 (如果未设置,则不计算交点) + - 线段从终点到起点与边界框相交的第一个交点。 (如果未设置,则不计算交点) + - 交点边界框切线的法线弧度。 [x: 第一个交点切线的法线弧度, y: 第二个交点切线的法线弧度] (如果未设置,则不计算法线) + 线段从起点到终点相交的第一个自定义边界框的插槽。 + DragonBones 5.0 + zh_CN - + - + - Get a specific bone. - - - + - The bone name. + + DragonBones 3.0 + en_US - + - 获取特定的骨骼。 - - + - 骨骼名称。 + + DragonBones 3.0 + zh_CN - + - + - Get a specific bone by the display. - - - - + - The display object. + + DragonBones 3.0 + en_US - + - 通过显示对象获取特定的骨骼。 - - + - 显示对象。 + + DragonBones 3.0 + zh_CN - + - + - Get a specific slot. - - - + - The slot name. + + DragonBones 3.0 + en_US - + - 获取特定的插槽。 - - + - 插槽名称。 + + DragonBones 3.0 + zh_CN - + - + - Get a specific slot by the display. - - - + - The display object. + + DragonBones 3.0 + en_US - + - 通过显示对象获取特定的插槽。 - + - 显示对象。 + + DragonBones 3.0 + zh_CN - + - + - Get all bones. - - - - + + DragonBones 3.0 + en_US - + - 获取所有的骨骼。 - - + + DragonBones 3.0 + zh_CN - + - + - Get all slots. - - + + DragonBones 3.0 + en_US - + - 获取所有的插槽。 + + DragonBones 3.0 + zh_CN - + - + - Whether to flip the armature horizontally. - - + DragonBones 5.5 + en_US - + - 是否将骨架水平翻转。 - + DragonBones 5.5 + zh_CN - + - + - Whether to flip the armature vertically. - - + DragonBones 5.5 + en_US - + - 是否将骨架垂直翻转。 + DragonBones 5.5 + zh_CN - + - + - The animation cache frame rate, which turns on the animation cache when the set value is greater than 0. + There is a certain amount of memory overhead to improve performance by caching animation data in memory. + The frame rate should not be set too high, usually with the frame rate of the animation is similar and lower than the program running frame rate. + When the animation cache is turned on, some features will fail, such as the offset property of bone. - - + + TypeScript style, for reference only. +
+                armature.cacheFrameRate = 24;
+            
+
+ + + DragonBones 4.5 + en_US - + - 动画缓存帧率,当设置的值大于 0 的时,将会开启动画缓存。 + 通过将动画数据缓存在内存中来提高运行性能,会有一定的内存开销。 + 帧率不宜设置的过高,通常跟动画的帧率相当且低于程序运行的帧率。 + 开启动画缓存后,某些功能将会失效,比如骨骼的 offset 属性等。 + + TypeScript 风格,仅供参考。 +
+                armature.cacheFrameRate = 24;
+            
+
+ + + DragonBones 4.5 + zh_CN
- + - + - The armature name. - - + DragonBones 3.0 + en_US - + - 骨架名称。 + DragonBones 3.0 + zh_CN - + - + - The armature data. - - + + DragonBones 4.5 + en_US - + - 骨架数据。 + + DragonBones 4.5 + zh_CN - + - + - The animation player. - - + + DragonBones 3.0 + en_US - + - 动画播放器。 + + DragonBones 3.0 + zh_CN - - - - + + - + - + - The EventDispatcher instance of the armature. - - + DragonBones 4.5 + en_US - + - 该骨架的 EventDispatcher 实例。 + DragonBones 4.5 + zh_CN - + - + - The display container. + The display of the slot is displayed as the parent. + Depending on the rendering engine, the type will be different, usually the DisplayObjectContainer type. - - + DragonBones 3.0 + en_US - + - 显示容器实例。 + 插槽的显示对象都会以此显示容器为父级。 + 根据渲染引擎的不同,类型会不同,通常是 DisplayObjectContainer 类型。 + DragonBones 3.0 + zh_CN - - - The dafault constructor - + + - - - Draw a pixel at the input location - - The spritebatch - Position X - Position Y - Color + + - + - Draw a box at the input location + - Get the parent slot which the armature belongs to. - The spritebatch - Destination rectangle - Color - Border Width - - + + DragonBones 4.5 + en_US - Draw a box at the input location + - 该骨架所属的父插槽。 - The spritebatch - Upper left position - Lower right position - Color + + DragonBones 4.5 + zh_CN - + - Draw a filled box at the input location + - Bone is one of the most important logical units in the armature animation system, + and is responsible for the realization of translate, rotation, scaling in the animations. + A armature can contain multiple bones. - The spritebatch - Position X - Position Y - Width - Height - Color - - + + + + DragonBones 3.0 + en_US - Draw a filled box at the input location + - 骨骼在骨骼动画体系中是最重要的逻辑单元之一,负责动画中的平移、旋转、缩放的实现。 + 一个骨架中可以包含多个骨骼。 - The spritebatch - Upper left position - Lower right position - Color + + + + DragonBones 3.0 + zh_CN - + - Draw a filled box at the input location + - The offset mode. - The spritebatch - Destination rectangle - Color - - + + DragonBones 5.5 + en_US - Draw a line at the input location + - 偏移模式。 - The spritebatch - Position X1 - Position Y1 - Position X2 - Position Y2 - Color - Line Width + + DragonBones 5.5 + zh_CN - - - Draw a line at the input location - - The spritebatch - Start position - End position - Color - Line Width + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - The animation player is used to play the animation data and manage the animation states. + - Forces the bone to update the transform in the next frame. + When the bone is not animated or its animation state is finished, the bone will not continue to update, + and when the skeleton must be updated for some reason, the method needs to be called explicitly. - - + + TypeScript style, for reference only. +
+                let bone = armature.getBone("arm");
+                bone.offset.scaleX = 2.0;
+                bone.invalidUpdate();
+            
+
DragonBones 3.0 en_US - - 动画播放器用来播放动画数据和管理动画状态。 + - 强制骨骼在下一帧更新变换。 + 当该骨骼没有动画状态或其动画状态播放完成时,骨骼将不在继续更新,而此时由于某些原因必须更新骨骼时,则需要显式调用该方法。 - - + + TypeScript 风格,仅供参考。 +
+                let bone = armature.getBone("arm");
+                bone.offset.scaleX = 2.0;
+                bone.invalidUpdate();
+            
+
DragonBones 3.0 zh_CN
- + - - The play speed of all animations. [0: Stop, (0~1): Slow, 1: Normal, (1~N): Fast] + - Check whether the bone contains a specific bone or slot. - 1.0 + + DragonBones 3.0 en_US - - 所有动画的播放速度。 [0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] + - 检查该骨骼是否包含特定的骨骼或插槽。 - 1.0 + + DragonBones 3.0 zh_CN - - - - - - - - - - - - + - - Clear all animations states. + - The bone data. - DragonBones 4.5 en_US - - 清除所有的动画状态。 + - 骨骼数据。 - DragonBones 4.5 zh_CN - + - - Pause a specific animation state. + - The visible of all slots in the bone. - - The name of animation state. (If not set, it will pause all animations) - + true + DragonBones 3.0 en_US - - 暂停指定动画状态的播放。 + - 此骨骼所有插槽的可见。 - - 动画状态名称。 (如果未设置,则暂停所有动画) - + true + DragonBones 3.0 zh_CN - + - - Play animation with a specific animation config. - The API is still in the experimental phase and may encounter bugs or stability or compatibility issues when used. + - The bone name. - - The animation config. - The playing animation state. - - - DragonBones 5.0 + DragonBones 3.0 en_US - - 通过指定的动画配置来播放动画。 - 该 API 仍在实验阶段,使用时可能遭遇 bug 或稳定性或兼容性问题。 + - 骨骼名称。 - - 动画配置。 - 播放的动画状态。 - - - DragonBones 5.0 + DragonBones 3.0 zh_CN - + - - Play a specific animation. + - The parent bone to which it belongs. - - The name of animation data. (If not set, The default animation will be played, or resume the animation playing from pause status, or replay the last playing animation) - - Playing repeat times. [-1: Use default value of the animation data, 0: No end loop playing, [1~N]: Repeat N times] (default: -1) - The playing animation state. - - TypeScript style, for reference only. -
-                armature.animation.play("walk");
-            
-
DragonBones 3.0 en_US - - 播放指定动画。 + - 所属的父骨骼。 - - 动画数据名称。 (如果未设置,则播放默认动画,或将暂停状态切换为播放状态,或重新播放之前播放的动画) - - 循环播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - 播放的动画状态。 - - TypeScript 风格,仅供参考。 -
-                armature.animation.play("walk");
-            
-
DragonBones 3.0 zh_CN
- + - - Fade in a specific animation. + - Deprecated, please refer to {@link dragonBones.Armature#getSlot()}. - - The name of animation data. - - The fade in time. [-1: Use the default value of animation data, [0~N]: The fade in time (In seconds)] (Default: -1) - - playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) - - The blending layer, the animation states in high level layer will get the blending weights with high priority, when the total blending weights are more than 1.0, there will be no more weights can be allocated to the other animation states. (Default: 0) - - The blending group name, it is typically used to specify the substitution of multiple animation states blending. (Default: null) - - The fade out mode, which is typically used to specify alternate mode of multiple animation states blending. (Default: AnimationFadeOutMode.SameLayerAndGroup) - The playing animation state. - - TypeScript style, for reference only. -
-                armature.animation.fadeIn("walk", 0.3, 0, 0, "normalGroup").resetToPose = false;
-                armature.animation.fadeIn("attack", 0.3, 1, 0, "attackGroup").resetToPose = false;
-            
-
- DragonBones 4.5 en_US - - 淡入播放指定的动画。 + - 已废弃,请参考 {@link dragonBones.Armature#getSlot()}。 - - 动画数据名称。 - - 淡入时间。 [-1: 使用动画数据默认值, [0~N]: 淡入时间 (以秒为单位)] (默认: -1) - - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - - 混合图层,图层高的动画状态会优先获取混合权重,当混合权重分配总和超过 1.0 时,剩余的动画状态将不能再获得权重分配。 (默认: 0) - - 混合组名称,该属性通常用来指定多个动画状态混合时的相互替换关系。 (默认: null) - - 淡出模式,该属性通常用来指定多个动画状态混合时的相互替换模式。 (默认: AnimationFadeOutMode.SameLayerAndGroup) - 播放的动画状态。 - - TypeScript 风格,仅供参考。 -
-                armature.animation.fadeIn("walk", 0.3, 0, 0, "normalGroup").resetToPose = false;
-                armature.animation.fadeIn("attack", 0.3, 1, 0, "attackGroup").resetToPose = false;
-            
-
- DragonBones 4.5 zh_CN
- - - - Play a specific animation from the specific time. - - - The name of animation data. - - The start time point of playing. (In seconds) - - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) - The played animation state. - DragonBones 4.5 - en_US - - - 从指定时间开始播放指定的动画。 - - - 动画数据名称。 - - 播放开始的时间。 (以秒为单位) - - 循环播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - 播放的动画状态。 - DragonBones 4.5 - zh_CN + + + - - - - Play a specific animation from the specific frame. - - - The name of animation data. - - The start frame of playing. - - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) - The played animation state. - DragonBones 4.5 - en_US + - - 从指定帧开始播放指定的动画。 + - For timeline state. - - 动画数据名称。 - - 播放开始的帧数。 - - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - 播放的动画状态。 - DragonBones 4.5 - zh_CN + - - - - Play a specific animation from the specific progress. - - - The name of animation data. - - The start progress value of playing. - - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) - The played animation state. - DragonBones 4.5 - en_US + - - 从指定进度开始播放指定的动画。 + - For sort bones. - - 动画数据名称。 - - 开始播放的进度。 - - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - 播放的动画状态。 - DragonBones 4.5 - zh_CN + - - - - Stop a specific animation at the specific time. - - - The name of animation data. - - The stop time. (In seconds) - The played animation state. - DragonBones 4.5 - en_US + - - 在指定时间停止指定动画播放 + - For sort bones. - - 动画数据名称。 - - 停止的时间。 (以秒为单位) - 播放的动画状态。 - DragonBones 4.5 - zh_CN + - + + + + + - - Stop a specific animation at the specific frame. + - For timeline state. - - The name of animation data. - - The stop frame. - The played animation state. - DragonBones 4.5 - en_US + + + - - 在指定帧停止指定动画的播放 + - For timeline state. - - 动画数据名称。 - - 停止的帧数。 - 播放的动画状态。 - DragonBones 4.5 - zh_CN + - + + + + - - Stop a specific animation at the specific progress. + - The armature proxy interface, the docking engine needs to implement it concretely. - - The name of animation data. - - The stop progress value. - The played animation state. - DragonBones 4.5 + + DragonBones 5.0 en_US - - 在指定的进度停止指定的动画播放。 + - 骨架代理接口,对接的引擎需要对其进行具体实现。 - - 动画数据名称。 - - 停止进度。 - 播放的动画状态。 - DragonBones 4.5 + + DragonBones 5.0 zh_CN - + + + + + + + + + + + + + - - Get a specific animation state. + - Dispose the instance and the Armature instance. (The Armature instance will return to the object pool) - - The name of animation state. TypeScript style, for reference only.
-                armature.animation.play("walk");
-                let walkState = armature.animation.getState("walk");
-                walkState.timeScale = 0.5;
+                removeChild(armatureDisplay);
+                armatureDisplay.dispose();
             
- DragonBones 3.0 + DragonBones 4.5 en_US - - 获取指定的动画状态 + - 释放该实例和骨架。 (骨架会回收到对象池) - - 动画状态名称。 TypeScript 风格,仅供参考。
-                armature.animation.play("walk");
-                let walkState = armature.animation.getState("walk");
-                walkState.timeScale = 0.5;
+                removeChild(armatureDisplay);
+                armatureDisplay.dispose();
             
- DragonBones 3.0 - zh_CN -
- - - - Check whether a specific animation data is included. - - - The name of animation data. - - DragonBones 3.0 - en_US - - - 检查是否包含指定的动画数据 - - - 动画数据名称。 - - DragonBones 3.0 - zh_CN - - - - - Get all the animation states. - - DragonBones 5.1 - en_US - - - 获取所有的动画状态 - - DragonBones 5.1 + DragonBones 4.5 zh_CN - + - - Check whether there is an animation state is playing + - The armature. - - DragonBones 3.0 + DragonBones 4.5 en_US - - 检查是否有动画状态正在播放 + - 骨架。 - - DragonBones 3.0 + DragonBones 4.5 zh_CN - + - - Check whether all the animation states' playing were finished. + - The animation player. - DragonBones 3.0 en_US - - 检查是否所有的动画状态均已播放完毕。 + - 动画播放器。 - DragonBones 3.0 zh_CN - + - - The name of the last playing animation state. + - The slot attached to the armature, controls the display status and properties of the display object. + A bone can contain multiple slots. + A slot can contain multiple display objects, displaying only one of the display objects at a time, + but you can toggle the display object into frame animation while the animation is playing. + The display object can be a normal texture, or it can be a display of a child armature, a grid display object, + and a custom other display object. - + + + DragonBones 3.0 en_US - - 上一个播放的动画状态名称 + - 插槽附着在骨骼上,控制显示对象的显示状态和属性。 + 一个骨骼上可以包含多个插槽。 + 一个插槽中可以包含多个显示对象,同一时间只能显示其中的一个显示对象,但可以在动画播放的过程中切换显示对象实现帧动画。 + 显示对象可以是普通的图片纹理,也可以是子骨架的显示容器,网格显示对象,还可以是自定义的其他显示对象。 - + + + DragonBones 3.0 zh_CN - + - - The name of all animation data + - Displays the animated state or mixed group name controlled by the object, set to null to be controlled by all animation states. + null + + + DragonBones 4.5 en_US - - 所有动画数据的名称 + - 显示对象受到控制的动画状态或混合组名称,设置为 null 则表示受所有的动画状态控制。 + null + + + DragonBones 4.5 zh_CN - - - - All animation data. - - DragonBones 4.5 - en_US - - - 所有的动画数据。 - - DragonBones 4.5 - zh_CN - - - - - An AnimationConfig instance that can be used quickly. - - - DragonBones 5.0 - en_US - - - 一个可以快速使用的动画配置实例。 - - - DragonBones 5.0 - zh_CN - - - - - The last playing animation state - - - DragonBones 3.0 - en_US - - - 上一个播放的动画状态 - - - DragonBones 3.0 - zh_CN - - - - - The animation state is generated when the animation data is played. - - - - DragonBones 3.0 - en_US - - - 动画状态由播放动画数据时产生。 - - - - DragonBones 3.0 - zh_CN - - + - + - - - - Whether the animation state has control over the display object properties of the slots. - Sometimes blend a animation state does not want it to control the display object properties of the slots, - especially if other animation state are controlling the display object properties of the slots. - - true - DragonBones 5.0 - en_US - - - 动画状态是否对插槽的显示对象属性有控制权。 - 有时混合一个动画状态并不希望其控制插槽的显示对象属性, - 尤其是其他动画状态正在控制这些插槽的显示对象属性时。 - - true - DragonBones 5.0 - zh_CN + + - - - - Whether to reset the objects without animation to the armature pose when the animation state is start to play. - This property should usually be set to false when blend multiple animation states. - - true - DragonBones 5.1 - en_US - - - 开始播放动画状态时是否将没有动画的对象重置为骨架初始值。 - 通常在混合多个动画状态时应该将该属性设置为 false。 - - true - DragonBones 5.1 - zh_CN + + - - - - The play times. [0: Loop play, [1~N]: Play N times] - - DragonBones 3.0 - en_US - - - 播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] - - DragonBones 3.0 - zh_CN + + + - - - - The blend layer. - High layer animation state will get the blend weight first. - When the blend weight is assigned more than 1, the remaining animation states will no longer get the weight assigned. - - - DragonBones 5.0 - en_US - - - 混合图层。 - 图层高的动画状态会优先获取混合权重。 - 当混合权重分配超过 1 时,剩余的动画状态将不再获得权重分配。 - - - DragonBones 5.0 - zh_CN + + - - - - The play speed. - The value is an overlay relationship with {@link dragonBones.Animation#timeScale}. - [(-N~0): Reverse play, 0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] - - 1.0 - DragonBones 3.0 - en_US - - - 播放速度。 - 该值与 {@link dragonBones.Animation#timeScale} 是叠加关系。 - [(-N~0): 倒转播放, 0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] - - 1.0 - DragonBones 3.0 - zh_CN + + - - - - The blend weight. - - 1.0 - DragonBones 5.0 - en_US - - - 混合权重。 - - 1.0 - DragonBones 5.0 - zh_CN + + - - - - The auto fade out time when the animation state play completed. - [-1: Do not fade out automatically, [0~N]: The fade out time] (In seconds) - - -1.0 - DragonBones 5.0 - en_US - - - 动画状态播放完成后的自动淡出时间。 - [-1: 不自动淡出, [0~N]: 淡出时间] (以秒为单位) - - -1.0 - DragonBones 5.0 - zh_CN + + - + - - - - The name of the animation state. (Can be different from the name of the animation data) - - - DragonBones 5.0 - en_US - - - 动画状态名称。 (可以不同于动画数据) - - - DragonBones 5.0 - zh_CN + + + - - - - The blend group name of the animation state. - This property is typically used to specify the substitution of multiple animation states blend. - - - DragonBones 5.0 - en_US - - - 混合组名称。 - 该属性通常用来指定多个动画状态混合时的相互替换关系。 - - - DragonBones 5.0 - zh_CN + + - - - - xx: Play Enabled, Fade Play Enabled - + - - - -1: Fade in, 0: Fade complete, 1: Fade out; - + - - - -1: Fade start, 0: Fading, 1: Fade complete; - - + - + - - + - - + - + - - + - + - - + - + + + + + + - + - - + - - + - - - - Continue play. - - DragonBones 3.0 - en_US + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - 继续播放。 + - Support default skin data. - DragonBones 3.0 - zh_CN + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - Stop play. + - Check whether a specific point is inside a custom bounding box in the slot. + The coordinate system of the point is the inner coordinate system of the armature. + Custom bounding boxes need to be customized in Dragonbones Pro. - DragonBones 3.0 + - The horizontal coordinate of the point. + - The vertical coordinate of the point. + DragonBones 5.0 en_US - - 暂停播放。 + - 检查特定点是否在插槽的自定义边界框内。 + 点的坐标系为骨架内坐标系。 + 自定义边界框需要在 DragonBones Pro 中自定义。 - DragonBones 3.0 + - 点的水平坐标。 + - 点的垂直坐标。 + DragonBones 5.0 zh_CN - + - - Fade out the animation state. + - Check whether a specific segment intersects a custom bounding box for the slot. + The coordinate system of the segment and intersection is the inner coordinate system of the armature. + Custom bounding boxes need to be customized in Dragonbones Pro. - - The fade out time. (In seconds) - - Whether to pause the animation playing when fade out. - DragonBones 3.0 + - The horizontal coordinate of the beginning of the segment. + - The vertical coordinate of the beginning of the segment. + - The horizontal coordinate of the end point of the segment. + - The vertical coordinate of the end point of the segment. + - The first intersection at which a line segment intersects the bounding box from the beginning to the end. (If not set, the intersection point will not calculated) + - The first intersection at which a line segment intersects the bounding box from the end to the beginning. (If not set, the intersection point will not calculated) + - The normal radians of the tangent of the intersection boundary box. [x: Normal radian of the first intersection tangent, y: Normal radian of the second intersection tangent] (If not set, the normal will not calculated) + Intersection situation. [1: Disjoint and segments within the bounding box, 0: Disjoint, 1: Intersecting and having a nodal point and ending in the bounding box, 2: Intersecting and having a nodal point and starting at the bounding box, 3: Intersecting and having two intersections, N: Intersecting and having N intersections] + DragonBones 5.0 en_US - - 淡出动画状态。 + - 检查特定线段是否与插槽的自定义边界框相交。 + 线段和交点的坐标系均为骨架内坐标系。 + 自定义边界框需要在 DragonBones Pro 中自定义。 - - 淡出时间。 (以秒为单位) - - 淡出时是否暂停播放。 - DragonBones 3.0 + - 线段起点的水平坐标。 + - 线段起点的垂直坐标。 + - 线段终点的水平坐标。 + - 线段终点的垂直坐标。 + - 线段从起点到终点与边界框相交的第一个交点。 (如果未设置,则不计算交点) + - 线段从终点到起点与边界框相交的第一个交点。 (如果未设置,则不计算交点) + - 交点边界框切线的法线弧度。 [x: 第一个交点切线的法线弧度, y: 第二个交点切线的法线弧度] (如果未设置,则不计算法线) + 相交的情况。 [-1: 不相交且线段在包围盒内, 0: 不相交, 1: 相交且有一个交点且终点在包围盒内, 2: 相交且有一个交点且起点在包围盒内, 3: 相交且有两个交点, N: 相交且有 N 个交点] + DragonBones 5.0 zh_CN - + - - Check if a specific bone mask is included. + - Forces the slot to update the state of the display object in the next frame. - - The bone name. - DragonBones 3.0 + DragonBones 4.5 en_US - - 检查是否包含特定骨骼遮罩。 + - 强制插槽在下一帧更新显示对象的状态。 - - 骨骼名称。 - DragonBones 3.0 + DragonBones 4.5 zh_CN - + - - Add a specific bone mask. + - The visible of slot's display object. - - The bone name. - - Whether or not to add a mask to the bone's sub-bone. - DragonBones 3.0 + true + DragonBones 5.6 en_US - - 添加特定的骨骼遮罩。 + - 插槽的显示对象的可见。 - - 骨骼名称。 - - 是否为该骨骼的子骨骼添加遮罩。 - DragonBones 3.0 + true + DragonBones 5.6 zh_CN - + - - Remove the mask of a specific bone. + - The index of the display object displayed in the display list. - - The bone name. - - Whether to remove the bone's sub-bone mask. - DragonBones 3.0 + + TypeScript style, for reference only. +
+                let slot = armature.getSlot("weapon");
+                slot.displayIndex = 3;
+                slot.displayController = "none";
+            
+
+ DragonBones 4.5 en_US - - 删除特定骨骼的遮罩。 + - 此时显示的显示对象在显示列表中的索引。 - - 骨骼名称。 - - 是否删除该骨骼的子骨骼遮罩。 - DragonBones 3.0 + + TypeScript 风格,仅供参考。 +
+                let slot = armature.getSlot("weapon");
+                slot.displayIndex = 3;
+                slot.displayController = "none";
+            
+
+ DragonBones 4.5 zh_CN
- + - - Remove all bone masks. + - The slot name. + DragonBones 3.0 en_US - - 删除所有骨骼遮罩。 + - 插槽名称。 + DragonBones 3.0 zh_CN - + - - Whether the animation state is fading in. + - Contains a display list of display objects or child armatures. - DragonBones 5.1 + DragonBones 3.0 en_US - - 是否正在淡入。 + - 包含显示对象或子骨架的显示列表。 - DragonBones 5.1 + DragonBones 3.0 zh_CN - + - - Whether the animation state is fading out. + - The slot data. - DragonBones 5.1 + + DragonBones 4.5 en_US - - 是否正在淡出。 + - 插槽数据。 - DragonBones 5.1 + + DragonBones 4.5 zh_CN - + + + + - - Whether the animation state is fade completed. + - The custom bounding box data for the slot at current time. - DragonBones 5.1 + DragonBones 5.0 en_US - - 是否淡入或淡出完毕。 + - 插槽此时的自定义包围盒数据。 - DragonBones 5.1 + DragonBones 5.0 zh_CN - - - - Whether the animation state is playing. - - DragonBones 3.0 - en_US - - - 是否正在播放。 - - DragonBones 3.0 - zh_CN + + - + + + + - - Whether the animation state is play completed. + - The display object that the slot displays at this time. + + TypeScript style, for reference only. +
+                let slot = armature.getSlot("text");
+                slot.display = new yourEngine.TextField();
+            
+
DragonBones 3.0 en_US - - 是否播放完毕。 + - 插槽此时显示的显示对象。 + + TypeScript 风格,仅供参考。 +
+                let slot = armature.getSlot("text");
+                slot.display = new yourEngine.TextField();
+            
+
DragonBones 3.0 zh_CN
- + - - The times has been played. + - The child armature that the slot displayed at current time. + + TypeScript style, for reference only. +
+                let slot = armature.getSlot("weapon");
+            let prevChildArmature = slot.childArmature;
+            if (prevChildArmature) {
+            prevChildArmature.dispose();
+                }
+                slot.childArmature = factory.buildArmature("weapon_blabla", "weapon_blabla_project");
+            
+
DragonBones 3.0 en_US - - 已经循环播放的次数。 + - 插槽此时显示的子骨架。 + 注意,被替换的对象并不会被回收,根据语言和引擎的不同,需要额外处理。 + + TypeScript 风格,仅供参考。 +
+                let slot = armature.getSlot("weapon");
+            let prevChildArmature = slot.childArmature;
+            if (prevChildArmature) {
+            prevChildArmature.dispose();
+                }
+                slot.childArmature = factory.buildArmature("weapon_blabla", "weapon_blabla_project");
+            
+
DragonBones 3.0 zh_CN
- + - - The total time. (In seconds) + - The parent bone to which it belongs. DragonBones 3.0 en_US - - 总播放时间。 (以秒为单位) + - 所属的父骨骼。 DragonBones 3.0 zh_CN - + - - The time is currently playing. (In seconds) + - The base class of the transform object. - DragonBones 3.0 + + DragonBones 4.5 en_US - - 当前播放的时间。 (以秒为单位) + - 变换对象的基类。 - DragonBones 3.0 + + DragonBones 4.5 zh_CN - - - - - - - - - - - -1: First blending, 0: No blending, 1: Blending. - - - - - - - - - - - - - - - - + - - + - - + - + - - Play animation interface. (Both Armature and Wordclock implement the interface) - Any instance that implements the interface can be added to the Worldclock instance and advance time by Worldclock instance uniformly. + - A matrix relative to the armature coordinate system. - - DragonBones 3.0 en_US - - 播放动画接口。 (Armature 和 WordClock 都实现了该接口) - 任何实现了此接口的实例都可以添加到 WorldClock 实例中,由 WorldClock 实例统一更新时间。 + - 相对于骨架坐标系的矩阵。 - - DragonBones 3.0 zh_CN - + - - Advance time. + - A transform relative to the armature coordinate system. - - Passed time. (In seconds) + DragonBones 3.0 en_US - - 更新时间。 + - 相对于骨架坐标系的变换。 - - 前进的时间。 (以秒为单位) + DragonBones 3.0 zh_CN - - - - - - - - - - - - - - - - - - - + + + - The offset transform relative to the armature or the parent bone coordinate system. + + + DragonBones 3.0 + en_US + + - 相对于骨架或父骨骼坐标系的偏移变换。 + + + DragonBones 3.0 + zh_CN - - + - - + - - + - + - - + - + - - Worldclock provides clock support for animations, advance time for each IAnimatable object added to the instance. + - For performance considerations, rotation or scale in the {@link #global} attribute of the bone or slot is not always properly accessible, + some engines do not rely on these attributes to update rendering, such as Egret. + The use of this method ensures that the access to the {@link #global} property is correctly rotation or scale. - - + + TypeScript style, for reference only. +
+                bone.updateGlobalTransform();
+                let rotation = bone.global.rotation;
+            
+
DragonBones 3.0 en_US - - WorldClock 对动画提供时钟支持,为每个加入到该实例的 IAnimatable 对象更新时间。 + - 出于性能的考虑,骨骼或插槽的 {@link #global} 属性中的旋转或缩放并不总是正确可访问的,有些引擎并不依赖这些属性更新渲染,比如 Egret。 + 使用此方法可以保证访问到 {@link #global} 属性中正确的旋转或缩放。 - - + + TypeScript 风格,仅供参考。 +
+                bone.updateGlobalTransform();
+                let rotation = bone.global.rotation;
+            
+
DragonBones 3.0 zh_CN
- + - - Current time. (In seconds) + - The armature to which it belongs. DragonBones 3.0 en_US - - 当前的时间。 (以秒为单位) + - 所属的骨架。 DragonBones 3.0 zh_CN - + - - The play speed, used to control animation speed-shift play. - [0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] + - The BaseObject is the base class for all objects in the DragonBones framework. + All BaseObject instances are cached to the object pool to reduce the performance consumption of frequent requests for memory or memory recovery. - 1.0 - DragonBones 3.0 + DragonBones 4.5 en_US - - 播放速度,用于控制动画变速播放。 - [0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] + - 基础对象,通常 DragonBones 的对象都继承自该类。 + 所有基础对象的实例都会缓存到对象池,以减少频繁申请内存或内存回收的性能消耗。 - 1.0 - DragonBones 3.0 + DragonBones 4.5 zh_CN - + - - Creating a Worldclock instance. Typically, you do not need to create Worldclock instance. - When multiple Worldclock instances are running at different speeds, can achieving some specific animation effects, such as bullet time. + - Set the maximum cache count of the specify object pool. - DragonBones 3.0 + - The specify class. (Set all object pools max cache count if not set) + - Max count. + DragonBones 4.5 en_US - - 创建一个 WorldClock 实例。通常并不需要创建 WorldClock 实例。 - 当多个 WorldClock 实例使用不同的速度运行时,可以实现一些特殊的动画效果,比如子弹时间等。 + - 设置特定对象池的最大缓存数量。 - DragonBones 3.0 + - 特定的类。 (不设置则设置所有对象池的最大缓存数量) + - 最大缓存数量。 + DragonBones 4.5 zh_CN - + - - Advance time for all IAnimatable instances. + - Clear the cached instances of a specify object pool. - - Passed time. [-1: Automatically calculates the time difference between the current frame and the previous frame, [0~N): Passed time] (In seconds) - DragonBones 3.0 + - Specify class. (Clear all cached instances if not set) + DragonBones 4.5 en_US - - 为所有的 IAnimatable 实例更新时间。 - - - 前进的时间。 [-1: 自动计算当前帧与上一帧的时间差, [0~N): 前进的时间] (以秒为单位) - DragonBones 3.0 - zh_CN - - - - - Check whether contains a specific instance of IAnimatable. - - - The IAnimatable instance. - DragonBones 3.0 - en_US - - - 检查是否包含特定的 IAnimatable 实例。 - - - IAnimatable 实例。 - DragonBones 3.0 - zh_CN - - - - - Add IAnimatable instance. - - - The IAnimatable instance. - DragonBones 3.0 - en_US - - - 添加 IAnimatable 实例。 - - - IAnimatable 实例。 - DragonBones 3.0 - zh_CN - - - - - Removes a specified IAnimatable instance. - - - The IAnimatable instance. - DragonBones 3.0 - en_US - - - 移除特定的 IAnimatable 实例。 + - 清除特定对象池的缓存实例。 - - IAnimatable 实例。 - DragonBones 3.0 + - 特定的类。 (不设置则清除所有缓存的实例) + DragonBones 4.5 zh_CN - + - - Clear all IAnimatable instances. + - Get an instance of the specify class from object pool. - DragonBones 3.0 + - The specify class. + DragonBones 4.5 en_US - - 清除所有的 IAnimatable 实例。 + - 从对象池中获取特定类的实例。 - DragonBones 3.0 + - 特定的类。 + DragonBones 4.5 zh_CN - + - - Deprecated, please refer to {@link dragonBones.BaseFactory#clock}. + - A unique identification number assigned to the object. + DragonBones 4.5 en_US - - 已废弃,请参考 {@link dragonBones.BaseFactory#clock}。 + - 分配给此实例的唯一标识号。 + DragonBones 4.5 zh_CN - - - - Armature is the core of the skeleton animation system. - - - - - - DragonBones 3.0 - en_US - - - 骨架是骨骼动画系统的核心。 - - - - - - DragonBones 3.0 - zh_CN + + - + - - Whether to inherit the animation control of the parent armature. - True to try to have the child armature play an animation with the same name when the parent armature play the animation. + - Clear the object and return it back to object pool。 - true DragonBones 4.5 en_US - - 是否继承父骨架的动画控制。 - 如果该值为 true,当父骨架播放动画时,会尝试让子骨架播放同名动画。 + - 清除该实例的所有数据并将其返还对象池。 - true DragonBones 4.5 zh_CN - - - - - - - - - - - - - - - - - - - - + - + - + - - - + + + - Bounding box type. + + DragonBones 5.0 + en_US + + - 边界框类型。 + + DragonBones 5.0 + zh_CN - + - + - + - + - + - - Dispose the armature. (Return to the object pool) + - Offset mode. - - TypeScript style, for reference only. -
-                removeChild(armature.display);
-                armature.dispose();
-            
-
- DragonBones 3.0 + DragonBones 5.5 en_US - - 释放骨架。 (回收到对象池) + - 偏移模式。 - - TypeScript 风格,仅供参考。 -
-                removeChild(armature.display);
-                armature.dispose();
-            
-
- DragonBones 3.0 + DragonBones 5.5 zh_CN
- - - - - - - - + - - Forces a specific bone or its owning slot to update the transform or display property in the next frame. + - Animation fade out mode. - - The bone name. (If not set, all bones will be update) - - Whether to update the bone's slots. (Default: false) - - - DragonBones 3.0 + DragonBones 4.5 en_US - - 强制特定骨骼或其拥有的插槽在下一帧更新变换或显示属性。 + - 动画淡出模式。 - - 骨骼名称。 (如果未设置,将更新所有骨骼) - - 是否更新骨骼的插槽。 (默认: false) - - - DragonBones 3.0 + DragonBones 4.5 zh_CN - + - - Check whether a specific point is inside a custom bounding box in a slot. - The coordinate system of the point is the inner coordinate system of the armature. - Custom bounding boxes need to be customized in Dragonbones Pro. + - Do not fade out of any animation states. - - The horizontal coordinate of the point. - - The vertical coordinate of the point. - DragonBones 5.0 en_US - - 检查特定点是否在某个插槽的自定义边界框内。 - 点的坐标系为骨架内坐标系。 - 自定义边界框需要在 DragonBones Pro 中自定义。 + - 不淡出任何的动画状态。 - - 点的水平坐标。 - - 点的垂直坐标。 - DragonBones 5.0 zh_CN - + - - Check whether a specific segment intersects a custom bounding box for a slot in the armature. - The coordinate system of the segment and intersection is the inner coordinate system of the armature. - Custom bounding boxes need to be customized in Dragonbones Pro. + - Fade out the animation states of the same layer. - - The horizontal coordinate of the beginning of the segment. - - The vertical coordinate of the beginning of the segment. - - The horizontal coordinate of the end point of the segment. - - The vertical coordinate of the end point of the segment. - - The first intersection at which a line segment intersects the bounding box from the beginning to the end. (If not set, the intersection point will not calculated) - - The first intersection at which a line segment intersects the bounding box from the end to the beginning. (If not set, the intersection point will not calculated) - - The normal radians of the tangent of the intersection boundary box. [x: Normal radian of the first intersection tangent, y: Normal radian of the second intersection tangent] (If not set, the normal will not calculated) - The slot of the first custom bounding box where the segment intersects from the start point to the end point. - DragonBones 5.0 en_US - - 检查特定线段是否与骨架的某个插槽的自定义边界框相交。 - 线段和交点的坐标系均为骨架内坐标系。 - 自定义边界框需要在 DragonBones Pro 中自定义。 + - 淡出同层的动画状态。 - - 线段起点的水平坐标。 - - 线段起点的垂直坐标。 - - 线段终点的水平坐标。 - - 线段终点的垂直坐标。 - - 线段从起点到终点与边界框相交的第一个交点。 (如果未设置,则不计算交点) - - 线段从终点到起点与边界框相交的第一个交点。 (如果未设置,则不计算交点) - - 交点边界框切线的法线弧度。 [x: 第一个交点切线的法线弧度, y: 第二个交点切线的法线弧度] (如果未设置,则不计算法线) - 线段从起点到终点相交的第一个自定义边界框的插槽。 - DragonBones 5.0 zh_CN - + - - Get a specific bone. + - Fade out the animation states of the same group. - - The bone name. - - DragonBones 3.0 en_US - - 获取特定的骨骼。 + - 淡出同组的动画状态。 - - 骨骼名称。 - - DragonBones 3.0 zh_CN - + - - Get a specific bone by the display. + - Fade out the animation states of the same layer and group. - - The display object. - - DragonBones 3.0 en_US - - 通过显示对象获取特定的骨骼。 + - 淡出同层并且同组的动画状态。 - - 显示对象。 - - DragonBones 3.0 zh_CN - + - - Get a specific slot. + - Fade out of all animation states. - - The slot name. - - DragonBones 3.0 en_US - - 获取特定的插槽。 + - 淡出所有的动画状态。 - - 插槽名称。 - - DragonBones 3.0 zh_CN - + - - Get a specific slot by the display. + - Does not replace the animation state with the same name. - - The display object. - - DragonBones 3.0 en_US - - 通过显示对象获取特定的插槽。 + - 不替换同名的动画状态。 - - 显示对象。 - - DragonBones 3.0 zh_CN - + + + + - - Get all bones. + - The properties of the object carry basic information about an event, + which are passed as parameter or parameter's parameter to event listeners when an event occurs. - - DragonBones 3.0 + DragonBones 4.5 en_US - - 获取所有的骨骼。 + - 事件对象,包含有关事件的基本信息,当发生事件时,该实例将作为参数或参数的参数传递给事件侦听器。 - - DragonBones 3.0 + DragonBones 4.5 zh_CN - + - - Get all slots. + - Animation start play. - - DragonBones 3.0 + DragonBones 4.5 en_US - - 获取所有的插槽。 + - 动画开始播放。 - - DragonBones 3.0 + DragonBones 4.5 zh_CN - + - - Whether to flip the armature horizontally. + - Animation loop play complete once. - DragonBones 5.5 + DragonBones 4.5 en_US - - 是否将骨架水平翻转。 + - 动画循环播放完成一次。 - DragonBones 5.5 + DragonBones 4.5 zh_CN - + - - Whether to flip the armature vertically. + - Animation play complete. - DragonBones 5.5 + DragonBones 4.5 en_US - - 是否将骨架垂直翻转。 + - 动画播放完成。 - DragonBones 5.5 + DragonBones 4.5 zh_CN - + - - The animation cache frame rate, which turns on the animation cache when the set value is greater than 0. - There is a certain amount of memory overhead to improve performance by caching animation data in memory. - The frame rate should not be set too high, usually with the frame rate of the animation is similar and lower than the program running frame rate. - When the animation cache is turned on, some features will fail, such as the offset property of bone. + - Animation fade in start. - - TypeScript style, for reference only. -
-                armature.cacheFrameRate = 24;
-            
-
- - DragonBones 4.5 en_US - - 动画缓存帧率,当设置的值大于 0 的时,将会开启动画缓存。 - 通过将动画数据缓存在内存中来提高运行性能,会有一定的内存开销。 - 帧率不宜设置的过高,通常跟动画的帧率相当且低于程序运行的帧率。 - 开启动画缓存后,某些功能将会失效,比如骨骼的 offset 属性等。 + - 动画淡入开始。 - - TypeScript 风格,仅供参考。 -
-                armature.cacheFrameRate = 24;
-            
-
- - DragonBones 4.5 zh_CN
- + - - The armature name. + - Animation fade in complete. - DragonBones 3.0 + DragonBones 4.5 en_US - - 骨架名称。 + - 动画淡入完成。 - DragonBones 3.0 + DragonBones 4.5 zh_CN - + - - The armature data. + - Animation fade out start. - DragonBones 4.5 en_US - - 骨架数据。 + - 动画淡出开始。 - DragonBones 4.5 zh_CN - + - - The animation player. + - Animation fade out complete. - - DragonBones 3.0 + DragonBones 4.5 en_US - - 动画播放器。 + - 动画淡出完成。 - - DragonBones 3.0 + DragonBones 4.5 zh_CN - - - - + - - The EventDispatcher instance of the armature. + - Animation frame event. DragonBones 4.5 en_US - - 该骨架的 EventDispatcher 实例。 + - 动画帧事件。 DragonBones 4.5 zh_CN - + - - The display container. - The display of the slot is displayed as the parent. - Depending on the rendering engine, the type will be different, usually the DisplayObjectContainer type. + - Animation frame sound event. - DragonBones 3.0 + DragonBones 4.5 en_US - - 显示容器实例。 - 插槽的显示对象都会以此显示容器为父级。 - 根据渲染引擎的不同,类型会不同,通常是 DisplayObjectContainer 类型。 + - 动画帧声音事件。 - DragonBones 3.0 + DragonBones 4.5 zh_CN - + + - - - - - - - Get the parent slot which the armature belongs to. + - The armature that dispatch the event. - + DragonBones 4.5 en_US - - 该骨架所属的父插槽。 + - 发出该事件的骨架。 - + DragonBones 4.5 zh_CN - - - - Bone is one of the most important logical units in the armature animation system, - and is responsible for the realization of translate, rotation, scaling in the animations. - A armature can contain multiple bones. + - The custom data. - - - - DragonBones 3.0 + + + DragonBones 5.0 en_US - - 骨骼在骨骼动画体系中是最重要的逻辑单元之一,负责动画中的平移、旋转、缩放的实现。 - 一个骨架中可以包含多个骨骼。 + - 自定义数据。 - - - - DragonBones 3.0 + + + DragonBones 5.0 zh_CN - + - - The offset mode. + - If is a frame event, the value is used to describe the time that the event was in the animation timeline. (In seconds) - - DragonBones 5.5 + DragonBones 4.5 en_US - - 偏移模式。 + - 如果是帧事件,此值用来描述该事件在动画时间轴中所处的时间。(以秒为单位) - - DragonBones 5.5 + DragonBones 4.5 zh_CN - - - + + + - The event type。 + + DragonBones 4.5 + en_US + + - 事件类型。 + + DragonBones 4.5 + zh_CN - - - + + + - The event name. (The frame event name or the frame sound name) + + DragonBones 4.5 + en_US + + - 事件名称。 (帧事件的名称或帧声音的名称) + + DragonBones 4.5 + zh_CN - - - + + + - The bone that dispatch the event. + + + DragonBones 4.5 + en_US + + - 发出该事件的骨骼。 + + + DragonBones 4.5 + zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - Forces the bone to update the transform in the next frame. - When the bone is not animated or its animation state is finished, the bone will not continue to update, - and when the skeleton must be updated for some reason, the method needs to be called explicitly. + - The slot that dispatch the event. - - TypeScript style, for reference only. -
-                let bone = armature.getBone("arm");
-                bone.offset.scaleX = 2.0;
-                bone.invalidUpdate();
-            
-
- DragonBones 3.0 + + DragonBones 4.5 en_US - - 强制骨骼在下一帧更新变换。 - 当该骨骼没有动画状态或其动画状态播放完成时,骨骼将不在继续更新,而此时由于某些原因必须更新骨骼时,则需要显式调用该方法。 + - 发出该事件的插槽。 - - TypeScript 风格,仅供参考。 -
-                let bone = armature.getBone("arm");
-                bone.offset.scaleX = 2.0;
-                bone.invalidUpdate();
-            
-
- DragonBones 3.0 + + DragonBones 4.5 zh_CN
- + - - Check whether the bone contains a specific bone or slot. + - The animation state that dispatch the event. - - - DragonBones 3.0 + + DragonBones 4.5 en_US - - 检查该骨骼是否包含特定的骨骼或插槽。 + - 发出该事件的动画状态。 - - - DragonBones 3.0 + + DragonBones 4.5 zh_CN - + + + + + + + - - The bone data. + - The event dispatcher interface. + Dragonbones event dispatch usually relies on docking engine to implement, which defines the event method to be implemented when docking the engine. DragonBones 4.5 en_US - - 骨骼数据。 + - 事件派发接口。 + DragonBones 的事件派发通常依赖于对接的引擎来实现,该接口定义了对接引擎时需要实现的事件方法。 DragonBones 4.5 zh_CN - + - - The visible of all slots in the bone. + - Checks whether the object has any listeners registered for a specific type of event。 - true - - DragonBones 3.0 + - Event type. + DragonBones 4.5 en_US - - 此骨骼所有插槽的可见。 + - 检查是否为特定的事件类型注册了任何侦听器。 - true - - DragonBones 3.0 + - 事件类型。 + DragonBones 4.5 zh_CN - + - - The bone name. + - Dispatches an event into the event flow. - DragonBones 3.0 + - Event type. + - Event object. + + DragonBones 4.5 en_US - - 骨骼名称。 + - 分派特定的事件到事件流中。 - DragonBones 3.0 + - 事件类型。 + - 事件数据。 + + DragonBones 4.5 zh_CN - + - - The parent bone to which it belongs. + - Add an event listener object so that the listener receives notification of an event. - DragonBones 3.0 + - Event type. + - Event listener. + - The listener function's "this". + DragonBones 4.5 en_US - - 所属的父骨骼。 + - 添加特定事件类型的事件侦听器,以使侦听器能够接收事件通知。 - DragonBones 3.0 + - 事件类型。 + - 事件侦听器。 + - 侦听函数绑定的 this 对象。 + DragonBones 4.5 zh_CN - + - - Deprecated, please refer to {@link dragonBones.Armature#getSlot()}. + - Removes a listener from the object. + - Event type. + - Event listener. + - The listener function's "this". + DragonBones 4.5 en_US - - 已废弃,请参考 {@link dragonBones.Armature#getSlot()}。 + - 删除特定事件类型的侦听器。 + - 事件类型。 + - 事件侦听器。 + - 侦听函数绑定的 this 对象。 + DragonBones 4.5 zh_CN - + - + - - For timeline state. + - Base class for the factory that create the armatures. (Typically only one global factory instance is required) + The factory instance create armatures by parsed and added DragonBonesData instances and TextureAtlasData instances. + Once the data has been parsed, it has been cached in the factory instance and does not need to be parsed again until it is cleared by the factory instance. - - - + + + + + DragonBones 3.0 + en_US - - For sort bones. + - 创建骨架的工厂基类。 (通常只需要一个全局工厂实例) + 工厂通过解析并添加的 DragonBonesData 实例和 TextureAtlasData 实例来创建骨架。 + 当数据被解析过之后,已经添加到工厂中,在没有被工厂清理之前,不需要再次解析。 - + + + + + DragonBones 3.0 + zh_CN - - - - For sort bones. - - + + - - + - - - - For timeline state. - - + + - - - - For timeline state. - - + + - - + + - + + + + + + + - - The armature proxy interface, the docking engine needs to implement it concretely. + - Create a factory instance. (typically only one global factory instance is required) - - DragonBones 5.0 + DragonBones 3.0 en_US - - 骨架代理接口,对接的引擎需要对其进行具体实现。 + - 创建一个工厂实例。 (通常只需要一个全局工厂实例) - - DragonBones 5.0 + DragonBones 3.0 zh_CN - - + - - + - - + - - - - Dispose the instance and the Armature instance. (The Armature instance will return to the object pool) - - - TypeScript style, for reference only. -
-                removeChild(armatureDisplay);
-                armatureDisplay.dispose();
-            
-
- DragonBones 4.5 - en_US - - - 释放该实例和骨架。 (骨架会回收到对象池) + + + + + + + + + + + + + + + + + + + + + + + + + + + - Parse the raw data to a DragonBonesData instance and cache it to the factory. - - TypeScript 风格,仅供参考。 -
-                removeChild(armatureDisplay);
-                armatureDisplay.dispose();
-            
-
+ - The raw data. + - Specify a cache name for the instance so that the instance can be obtained through this name. (If not set, use the instance name instead) + - Specify a scaling value for all armatures. (Default: 1.0) + DragonBonesData instance + + + + + DragonBones 4.5 + en_US + + - 将原始数据解析为 DragonBonesData 实例,并缓存到工厂中。 + + - 原始数据。 + - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) + - 为所有的骨架指定一个缩放值。 (默认: 1.0) + DragonBonesData 实例 + + + + DragonBones 4.5 zh_CN
- + - - The armature. + - Parse the raw texture atlas data and the texture atlas object to a TextureAtlasData instance and cache it to the factory. + - The raw texture atlas data. + - The texture atlas object. + - Specify a cache name for the instance so that the instance can be obtained through this name. (If not set, use the instance name instead) + - Specify a scaling value for the map set. (Default: 1.0) + TextureAtlasData instance + + + + DragonBones 4.5 en_US - - 骨架。 + - 将原始贴图集数据和贴图集对象解析为 TextureAtlasData 实例,并缓存到工厂中。 + - 原始贴图集数据。 + - 贴图集对象。 + - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) + - 为贴图集指定一个缩放值。 (默认: 1.0) + TextureAtlasData 实例 + + + + DragonBones 4.5 zh_CN - + + + + - - The animation player. + - Get a specific DragonBonesData instance. + - The DragonBonesData instance cache name. + DragonBonesData instance + + + + DragonBones 3.0 en_US - - 动画播放器。 + - 获取特定的 DragonBonesData 实例。 + - DragonBonesData 实例的缓存名称。 + DragonBonesData 实例 + + + + DragonBones 3.0 zh_CN - + - - The slot attached to the armature, controls the display status and properties of the display object. - A bone can contain multiple slots. - A slot can contain multiple display objects, displaying only one of the display objects at a time, - but you can toggle the display object into frame animation while the animation is playing. - The display object can be a normal texture, or it can be a display of a child armature, a grid display object, - and a custom other display object. + - Cache a DragonBonesData instance to the factory. - - - + - The DragonBonesData instance. + - Specify a cache name for the instance so that the instance can be obtained through this name. (if not set, use the instance name instead) + + + + DragonBones 3.0 en_US - - 插槽附着在骨骼上,控制显示对象的显示状态和属性。 - 一个骨骼上可以包含多个插槽。 - 一个插槽中可以包含多个显示对象,同一时间只能显示其中的一个显示对象,但可以在动画播放的过程中切换显示对象实现帧动画。 - 显示对象可以是普通的图片纹理,也可以是子骨架的显示容器,网格显示对象,还可以是自定义的其他显示对象。 + - 将 DragonBonesData 实例缓存到工厂中。 - - - + - DragonBonesData 实例。 + - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) + + + + DragonBones 3.0 zh_CN - + - - Displays the animated state or mixed group name controlled by the object, set to null to be controlled by all animation states. + - Remove a DragonBonesData instance. - null - - - - DragonBones 4.5 + - The DragonBonesData instance cache name. + - Whether to dispose data. (Default: true) + + + + + DragonBones 3.0 en_US - - 显示对象受到控制的动画状态或混合组名称,设置为 null 则表示受所有的动画状态控制。 + - 移除 DragonBonesData 实例。 - null - - - - DragonBones 4.5 + - DragonBonesData 实例缓存名称。 + - 是否释放数据。 (默认: true) + + + + + DragonBones 3.0 zh_CN - - + + + - Get a list of specific TextureAtlasData instances. + + - The TextureAtlasData cahce name. + + + + + DragonBones 3.0 + en_US + + - 获取特定的 TextureAtlasData 实例列表。 + + - TextureAtlasData 实例缓存名称。 + + + + + DragonBones 3.0 + zh_CN - - + + + - Cache a TextureAtlasData instance to the factory. + + - The TextureAtlasData instance. + - Specify a cache name for the instance so that the instance can be obtained through this name. (if not set, use the instance name instead) + + + + + DragonBones 3.0 + en_US + + - 将 TextureAtlasData 实例缓存到工厂中。 + + - TextureAtlasData 实例。 + - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) + + + + + DragonBones 3.0 + zh_CN - - + + + - Remove a TextureAtlasData instance. + + - The TextureAtlasData instance cache name. + - Whether to dispose data. + + + + + DragonBones 3.0 + en_US + + - 移除 TextureAtlasData 实例。 + + - TextureAtlasData 实例的缓存名称。 + - 是否释放数据。 + + + + + DragonBones 3.0 + zh_CN - - + + + - Get a specific armature data. + + - The armature data name. + - The cached name for DragonbonesData instance. + + DragonBones 5.1 + en_US + + - 获取特定的骨架数据。 + + - 骨架数据名称。 + - DragonBonesData 实例的缓存名称。 + + DragonBones 5.1 + zh_CN - + + + - Clear all cached DragonBonesData instances and TextureAtlasData instances. + + - Whether to dispose data. + DragonBones 4.5 + en_US + + - 清除缓存的所有 DragonBonesData 实例和 TextureAtlasData 实例。 + + - 是否释放数据。 + DragonBones 4.5 + zh_CN + + + + - Create a armature from cached DragonBonesData instances and TextureAtlasData instances. + Note that when the created armature that is no longer in use, you need to explicitly dispose {@link #dragonBones.Armature#dispose()}. + + - The armature data name. + - The cached name of the DragonBonesData instance. (If not set, all DragonBonesData instances are retrieved, and when multiple DragonBonesData instances contain a the same name armature data, it may not be possible to accurately create a specific armature) + - The skin name, you can set a different ArmatureData name to share it's skin data. (If not set, use the default skin data) + The armature. + + TypeScript style, for reference only. +
+                let armature = factory.buildArmature("armatureName", "dragonBonesName");
+                armature.clock = factory.clock;
+            
+
+ + + DragonBones 3.0 + en_US + + - 通过缓存的 DragonBonesData 实例和 TextureAtlasData 实例创建一个骨架。 + 注意,创建的骨架不再使用时,需要显式释放 {@link #dragonBones.Armature#dispose()}。 + + - 骨架数据名称。 + - DragonBonesData 实例的缓存名称。 (如果未设置,将检索所有的 DragonBonesData 实例,当多个 DragonBonesData 实例中包含同名的骨架数据时,可能无法准确的创建出特定的骨架) + - 皮肤名称,可以设置一个其他骨架数据名称来共享其皮肤数据。(如果未设置,则使用默认的皮肤数据) + 骨架。 + + TypeScript 风格,仅供参考。 +
+                let armature = factory.buildArmature("armatureName", "dragonBonesName");
+                armature.clock = factory.clock;
+            
+
+ + + DragonBones 3.0 + zh_CN +
+ + + + + + - Replaces the current display data for a particular slot with a specific display data. + Specify display data with "dragonBonesName/armatureName/slotName/displayName". + + - The DragonBonesData instance cache name. + - The armature data name. + - The slot data name. + - The display data name. + - The slot. + - The index of the display data that is replaced. (If it is not set, replaces the current display data) + + TypeScript style, for reference only. +
+                let slot = armature.getSlot("weapon");
+                factory.replaceSlotDisplay("dragonBonesName", "armatureName", "slotName", "displayName", slot);
+            
+
+ DragonBones 4.5 + en_US + + - 用特定的显示对象数据替换特定插槽当前的显示对象数据。 + 用 "dragonBonesName/armatureName/slotName/displayName" 指定显示对象数据。 + + - DragonBonesData 实例的缓存名称。 + - 骨架数据名称。 + - 插槽数据名称。 + - 显示对象数据名称。 + - 插槽。 + - 被替换的显示对象数据的索引。 (如果未设置,则替换当前的显示对象数据) + + TypeScript 风格,仅供参考。 +
+                let slot = armature.getSlot("weapon");
+                factory.replaceSlotDisplay("dragonBonesName", "armatureName", "slotName", "displayName", slot);
+            
+
+ DragonBones 4.5 + zh_CN +
+ + + + + + + - Replaces the existing animation data for a specific armature with the animation data for the specific armature data. + This enables you to make a armature template so that other armature without animations can share it's animations. + + - The armtaure. + - The armature data. + - Whether to completely overwrite the original animation. (Default: false) + + TypeScript style, for reference only. +
+                let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
+                let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
+                if (armatureDataB) {
+                factory.replaceAnimation(armatureA, armatureDataB);
+                }
+            
+
+ + + DragonBones 5.6 + en_US + + - 用特定骨架数据的动画数据替换特定骨架现有的动画数据。 + 这样就能实现制作一个骨架动画模板,让其他没有制作动画的骨架共享该动画。 + + - 骨架。 + - 骨架数据。 + - 是否完全覆盖原来的动画。(默认: false) + + TypeScript 风格,仅供参考。 +
+                let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
+                let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
+                if (armatureDataB) {
+                factory.replaceAnimation(armatureA, armatureDataB);
+                }
+            
+
+ + + DragonBones 5.6 + zh_CN +
+ + + + + + + + + - An Worldclock instance updated by engine. + + DragonBones 5.7 + en_US + + - 由引擎驱动的 WorldClock 实例。 + + DragonBones 5.7 + zh_CN + + + + - Deprecated, please refer to {@link #replaceSkin}. + + en_US + + - 已废弃,请参考 {@link #replaceSkin}。 + + zh_CN + + + + + + + + - 2D Transform matrix. + + DragonBones 3.0 + en_US + + - 2D 转换矩阵。 + + DragonBones 3.0 + zh_CN + + + + - The value that affects the positioning of pixels along the x axis when scaling or rotating an image. + + 1.0 + DragonBones 3.0 + en_US + + - 缩放或旋转图像时影响像素沿 x 轴定位的值。 + + 1.0 + DragonBones 3.0 + zh_CN + + + + - The value that affects the positioning of pixels along the y axis when rotating or skewing an image. + + 0.0 + DragonBones 3.0 + en_US + + - 旋转或倾斜图像时影响像素沿 y 轴定位的值。 + + 0.0 + DragonBones 3.0 + zh_CN + + + + - The value that affects the positioning of pixels along the x axis when rotating or skewing an image. + + 0.0 + DragonBones 3.0 + en_US + + - 旋转或倾斜图像时影响像素沿 x 轴定位的值。 + + 0.0 + DragonBones 3.0 + zh_CN + + + + - The value that affects the positioning of pixels along the y axis when scaling or rotating an image. + + 1.0 + DragonBones 3.0 + en_US + + - 缩放或旋转图像时影响像素沿 y 轴定位的值。 + + 1.0 + DragonBones 3.0 + zh_CN + + + + - The distance by which to translate each point along the x axis. + + 0.0 + DragonBones 3.0 + en_US + + - 沿 x 轴平移每个点的距离。 + + 0.0 + DragonBones 3.0 + zh_CN + + + + - The distance by which to translate each point along the y axis. + + 0.0 + DragonBones 3.0 + en_US + + - 沿 y 轴平移每个点的距离。 + + 0.0 + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + - Convert to unit matrix. + The resulting matrix has the following properties: a=1, b=0, c=0, d=1, tx=0, ty=0. + + DragonBones 3.0 + en_US + + - 转换为单位矩阵。 + 该矩阵具有以下属性:a=1、b=0、c=0、d=1、tx=0、ty=0。 + + DragonBones 3.0 + zh_CN + + + + - Multiplies the current matrix with another matrix. + + - The matrix that needs to be multiplied. + DragonBones 3.0 + en_US + + - 将当前矩阵与另一个矩阵相乘。 + + - 需要相乘的矩阵。 + DragonBones 3.0 + zh_CN + + + + - Convert to inverse matrix. + + DragonBones 3.0 + en_US + + - 转换为逆矩阵。 + + DragonBones 3.0 + zh_CN + + + + - Apply a matrix transformation to a specific point. + + - X coordinate. + - Y coordinate. + - The point after the transformation is applied. + - Whether to ignore tx, ty's conversion to point. + DragonBones 3.0 + en_US + + - 将矩阵转换应用于特定点。 + + - 横坐标。 + - 纵坐标。 + - 应用转换之后的点。 + - 是否忽略 tx,ty 对点的转换。 + DragonBones 3.0 + zh_CN + + + + + + + - The Point object represents a location in a two-dimensional coordinate system. + + DragonBones 3.0 + en_US + + - Point 对象表示二维坐标系统中的某个位置。 + + DragonBones 3.0 + zh_CN + + + + - The horizontal coordinate. + + 0.0 + DragonBones 3.0 + en_US + + - 该点的水平坐标。 + + 0.0 + DragonBones 3.0 + zh_CN + + + + - The vertical coordinate. + + 0.0 + DragonBones 3.0 + en_US + + - 该点的垂直坐标。 + + 0.0 + DragonBones 3.0 + zh_CN + + + + - Creates a new point. If you pass no parameters to this method, a point is created at (0,0). + + - The horizontal coordinate. + - The vertical coordinate. + DragonBones 3.0 + en_US + + - 创建一个 egret.Point 对象.若不传入任何参数,将会创建一个位于(0,0)位置的点。 + + - 该对象的x属性值,默认为 0.0。 + - 该对象的y属性值,默认为 0.0。 + DragonBones 3.0 + zh_CN + + + + + + + + + + - A Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its + width and its height.
+ The x, y, width, and height properties of the Rectangle class are independent of each other; changing the value of + one property has no effect on the others. However, the right and bottom properties are integrally related to those + four properties. For example, if you change the value of the right property, the value of the width property changes; + if you change the bottom property, the value of the height property changes. +
+ DragonBones 3.0 + en_US + + - Rectangle 对象是按其位置(由它左上角的点 (x, y) 确定)以及宽度和高度定义的区域。
+ Rectangle 类的 x、y、width 和 height 属性相互独立;更改一个属性的值不会影响其他属性。 + 但是,right 和 bottom 属性与这四个属性是整体相关的。例如,如果更改 right 属性的值,则 width + 属性的值将发生变化;如果更改 bottom 属性,则 height 属性的值将发生变化。 +
+ DragonBones 3.0 + zh_CN +
+ + + - The x coordinate of the top-left corner of the rectangle. + + 0.0 + DragonBones 3.0 + en_US + + - 矩形左上角的 x 坐标。 + + 0.0 + DragonBones 3.0 + zh_CN + + + + - The y coordinate of the top-left corner of the rectangle. + + 0.0 + DragonBones 3.0 + en_US + + - 矩形左上角的 y 坐标。 + + 0.0 + DragonBones 3.0 + zh_CN + + + + - The width of the rectangle, in pixels. + + 0.0 + DragonBones 3.0 + en_US + + - 矩形的宽度(以像素为单位)。 + + 0.0 + DragonBones 3.0 + zh_CN + + + + - 矩形的高度(以像素为单位)。 + + 0.0 + DragonBones 3.0 + en_US + + - The height of the rectangle, in pixels. + + 0.0 + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + - 2D Transform. + + DragonBones 3.0 + en_US + + - 2D 变换。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + + + + + + + + + + + + + - Horizontal translate. + + DragonBones 3.0 + en_US + + - 水平位移。 + + DragonBones 3.0 + zh_CN + + + + - Vertical translate. + + DragonBones 3.0 + en_US + + - 垂直位移。 + + DragonBones 3.0 + zh_CN + + + + - Skew. (In radians) + + DragonBones 3.0 + en_US + + - 倾斜。 (以弧度为单位) + + DragonBones 3.0 + zh_CN + + + + - rotation. (In radians) + + DragonBones 3.0 + en_US + + - 旋转。 (以弧度为单位) + + DragonBones 3.0 + zh_CN + + + + - Horizontal Scaling. + + DragonBones 3.0 + en_US + + - 水平缩放。 + + DragonBones 3.0 + zh_CN + + + + - Vertical scaling. + + DragonBones 3.0 + en_US + + - 垂直缩放。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + + + + + + + + + + + + + - The animation config is used to describe all the information needed to play an animation state. + The API is still in the experimental phase and may encounter bugs or stability or compatibility issues when used. + + + + DragonBones 5.0 + en_US + + - 动画配置用来描述播放一个动画状态所需要的全部信息。 + 该 API 仍在实验阶段,使用时可能遭遇 bug 或稳定性或兼容性问题。 + + + + DragonBones 5.0 + zh_CN + + + + + + + - Fade out the pattern of other animation states when the animation state is fade in. + This property is typically used to specify the substitution of multiple animation states blend. + + dragonBones.AnimationFadeOutMode.All + DragonBones 5.0 + en_US + + - 淡入动画状态时淡出其他动画状态的模式。 + 该属性通常用来指定多个动画状态混合时的相互替换关系。 + + dragonBones.AnimationFadeOutMode.All + DragonBones 5.0 + zh_CN + + + + + + + + + + + + + + + + + + + - Whether the animation state has control over the display property of the slots. + Sometimes blend a animation state does not want it to control the display properties of the slots, + especially if other animation state are controlling the display properties of the slots. + + true + DragonBones 5.0 + en_US + + - 动画状态是否对插槽的显示对象属性有控制权。 + 有时混合一个动画状态并不希望其控制插槽的显示对象属性, + 尤其是其他动画状态正在控制这些插槽的显示对象属性时。 + + true + DragonBones 5.0 + zh_CN + + + + - Whether to reset the objects without animation to the armature pose when the animation state is start to play. + This property should usually be set to false when blend multiple animation states. + + true + DragonBones 5.1 + en_US + + - 开始播放动画状态时是否将没有动画的对象重置为骨架初始值。 + 通常在混合多个动画状态时应该将该属性设置为 false。 + + true + DragonBones 5.1 + zh_CN + + + + + + + - The play times. [0: Loop play, [1~N]: Play N times] + + DragonBones 3.0 + en_US + + - 播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] + + DragonBones 3.0 + zh_CN + + + + - The blend layer. + High layer animation state will get the blend weight first. + When the blend weight is assigned more than 1, the remaining animation states will no longer get the weight assigned. + + + DragonBones 5.0 + en_US + + - 混合图层。 + 图层高的动画状态会优先获取混合权重。 + 当混合权重分配超过 1 时,剩余的动画状态将不再获得权重分配。 + + + DragonBones 5.0 + zh_CN + + + + - The start time of play. (In seconds) + + 0.0 + DragonBones 5.0 + en_US + + - 播放的开始时间。 (以秒为单位) + + 0.0 + DragonBones 5.0 + zh_CN + + + + - The duration of play. + [-1: Use the default value of the animation data, 0: Stop play, (0~N]: The duration] (In seconds) + + -1.0 + DragonBones 5.0 + en_US + + - 播放的持续时间。 + [-1: 使用动画数据默认值, 0: 动画停止, (0~N]: 持续时间] (以秒为单位) + + -1.0 + DragonBones 5.0 + zh_CN + + + + - The play speed. + The value is an overlay relationship with {@link dragonBones.Animation#timeScale}. + [(-N~0): Reverse play, 0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] + + 1.0 + DragonBones 3.0 + en_US + + - 播放速度。 + 该值与 {@link dragonBones.Animation#timeScale} 是叠加关系。 + [(-N~0): 倒转播放, 0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] + + 1.0 + DragonBones 3.0 + zh_CN + + + + - The blend weight. + + 1.0 + DragonBones 5.0 + en_US + + - 混合权重。 + + 1.0 + DragonBones 5.0 + zh_CN + + + + - The fade in time. + [-1: Use the default value of the animation data, [0~N]: The fade in time] (In seconds) + + -1.0 + DragonBones 5.0 + en_US + + - 淡入时间。 + [-1: 使用动画数据默认值, [0~N]: 淡入时间] (以秒为单位) + + -1.0 + DragonBones 5.0 + zh_CN + + + + - The auto fade out time when the animation state play completed. + [-1: Do not fade out automatically, [0~N]: The fade out time] (In seconds) + + -1.0 + DragonBones 5.0 + en_US + + - 动画状态播放完成后的自动淡出时间。 + [-1: 不自动淡出, [0~N]: 淡出时间] (以秒为单位) + + -1.0 + DragonBones 5.0 + zh_CN + + + + - The name of the animation state. (Can be different from the name of the animation data) + + DragonBones 5.0 + en_US + + - 动画状态名称。 (可以不同于动画数据) + + DragonBones 5.0 + zh_CN + + + + - The animation data name. + + DragonBones 5.0 + en_US + + - 动画数据名称。 + + DragonBones 5.0 + zh_CN + + + + - The blend group name of the animation state. + This property is typically used to specify the substitution of multiple animation states blend. + + + DragonBones 5.0 + en_US + + - 混合组名称。 + 该属性通常用来指定多个动画状态混合时的相互替换关系。 + + + DragonBones 5.0 + zh_CN + + + + + + + + + + + + + + + + + + + + + + + + + - The animation data. + + DragonBones 3.0 + en_US + + - 动画数据。 + + DragonBones 3.0 + zh_CN + + + + - FrameIntArray. + + + + + + + - FrameFloatArray. + + + + + + + - FrameArray. + + + + + + + - The frame count of the animation. + + DragonBones 3.0 + en_US + + - 动画的帧数。 + + DragonBones 3.0 + zh_CN + + + + - The play times of the animation. [0: Loop play, [1~N]: Play N times] + + DragonBones 3.0 + en_US + + - 动画的播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] + + DragonBones 3.0 + zh_CN + + + + - The duration of the animation. (In seconds) + + DragonBones 3.0 + en_US + + - 动画的持续时间。 (以秒为单位) + + DragonBones 3.0 + zh_CN + + + + + + + - The fade in time of the animation. (In seconds) + + DragonBones 3.0 + en_US + + - 动画的淡入时间。 (以秒为单位) + + DragonBones 3.0 + zh_CN + + + + + + + - The animation name. + + DragonBones 3.0 + en_US + + - 动画名称。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - The armature data. + + DragonBones 3.0 + en_US + + - 骨架数据。 + + DragonBones 3.0 + zh_CN + + + + + + + - The animation frame rate. + + DragonBones 3.0 + en_US + + - 动画帧率。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + - The armature name. + + DragonBones 3.0 + en_US + + - 骨架名称。 + + DragonBones 3.0 + zh_CN + + + + + + + - The names of all the animation data. + + DragonBones 3.0 + en_US + + - 所有的动画数据名称。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - The default skin data. + + DragonBones 4.5 + en_US + + - 默认插槽数据。 + + DragonBones 4.5 + zh_CN + + + + - The default animation data. + + DragonBones 4.5 + en_US + + - 默认动画数据。 + + DragonBones 4.5 + zh_CN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Get a specific done data. + + - The bone name. + DragonBones 3.0 + en_US + + - 获取特定的骨骼数据。 + + - 骨骼名称。 + DragonBones 3.0 + zh_CN + + + + - Get a specific slot data. + + - The slot name. + DragonBones 3.0 + en_US + + - 获取特定的插槽数据。 + + - 插槽名称。 + DragonBones 3.0 + zh_CN + + + + + + + - Get a specific skin data. + + - The skin name. + DragonBones 3.0 + en_US + + - 获取特定皮肤数据。 + + - 皮肤名称。 + DragonBones 3.0 + zh_CN + + + + + + + - Get a specific animation data. + + - The animation animationName. + DragonBones 3.0 + en_US + + - 获取特定的动画数据。 + + - 动画名称。 + DragonBones 3.0 + zh_CN + + + + - The bone data. + + DragonBones 3.0 + en_US + + - 骨骼数据。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + + + + - The bone length. + + DragonBones 3.0 + en_US + + - 骨骼长度。 + + DragonBones 3.0 + zh_CN + + + + - The bone name. + + DragonBones 3.0 + en_US + + - 骨骼名称。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + - The parent bone data. + + DragonBones 3.0 + en_US + + - 父骨骼数据。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + + - The slot data. + + DragonBones 3.0 + en_US + + - 插槽数据。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + + + + + + + + + - The slot name. + + DragonBones 3.0 + en_US + + - 插槽名称。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + - The parent bone data. + + DragonBones 3.0 + en_US + + - 父骨骼数据。 + + DragonBones 3.0 + zh_CN + + + + + + + - The base class of bounding box data. + + + + + DragonBones 5.0 + en_US + + - 边界框数据基类。 + + + + + DragonBones 5.0 + zh_CN + + + + - The bounding box type. + + DragonBones 5.0 + en_US + + - 边界框类型。 + + DragonBones 5.0 + zh_CN + + + + + + + + + + + + + + + + - Check whether the bounding box contains a specific point. (Local coordinate system) + + DragonBones 5.0 + en_US + + - 检查边界框是否包含特定点。(本地坐标系) + + DragonBones 5.0 + zh_CN + + + + - Check whether the bounding box intersects a specific segment. (Local coordinate system) + + DragonBones 5.0 + en_US + + - 检查边界框是否与特定线段相交。(本地坐标系) + + DragonBones 5.0 + zh_CN + + + + - Cohen–Sutherland algorithm https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm + ---------------------- + | 0101 | 0100 | 0110 | + ---------------------- + | 0001 | 0000 | 0010 | + ---------------------- + | 1001 | 1000 | 1010 | + ---------------------- + + + + + - The rectangle bounding box data. + + DragonBones 5.1 + en_US + + - 矩形边界框数据。 + + DragonBones 5.1 + zh_CN + + + + - Compute the bit code for a point (x, y) using the clip rectangle + + + + + + + + + + + + + + + + + + - The ellipse bounding box data. + + DragonBones 5.1 + en_US + + - 椭圆边界框数据。 + + DragonBones 5.1 + zh_CN + + + + + + + + + + + + + + + + + - The polygon bounding box data. + + DragonBones 5.1 + en_US + + - 多边形边界框数据。 + + DragonBones 5.1 + zh_CN + + + + + + + + + + + + + - The polygon vertices. + + DragonBones 5.1 + en_US + + - 多边形顶点。 + + DragonBones 5.1 + zh_CN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - The DragonBones data. + A DragonBones data contains multiple armature data. + + + DragonBones 3.0 + en_US + + - 龙骨数据。 + 一个龙骨数据包含多个骨架数据。 + + + DragonBones 3.0 + zh_CN + + + + + + + - The animation frame rate. + + DragonBones 3.0 + en_US + + - 动画帧频。 + + DragonBones 3.0 + zh_CN + + + + - The data version. + + DragonBones 3.0 + en_US + + - 数据版本。 + + DragonBones 3.0 + zh_CN + + + + - The DragonBones data name. + The name is consistent with the DragonBones project name. + + DragonBones 3.0 + en_US + + - 龙骨数据名称。 + 该名称与龙骨项目名保持一致。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + + + - All armature data names. + + DragonBones 3.0 + en_US + + - 所有的骨架数据名称。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Get a specific armature data. + + - The armature data name. + DragonBones 3.0 + en_US + + - 获取特定的骨架数据。 + + - 骨架数据名称。 + DragonBones 3.0 + zh_CN + + + + - The skin data, typically a armature data instance contains at least one skinData. + + DragonBones 3.0 + en_US + + - 皮肤数据,通常一个骨架数据至少包含一个皮肤数据。 + + DragonBones 3.0 + zh_CN + + + + - The skin name. + + DragonBones 3.0 + en_US + + - 皮肤名称。 + + DragonBones 3.0 + zh_CN + + + + + + + + + + + - + + + + + + + + + - The texture atlas data. + + DragonBones 3.0 + en_US + + - 贴图集数据。 + + DragonBones 3.0 + zh_CN + + + + + - + - + - - + + + - The texture atlas name. + + DragonBones 3.0 + en_US + + - 贴图集名称。 + + DragonBones 3.0 + zh_CN - - + + + - The image path of the texture atlas. + + DragonBones 3.0 + en_US + + - 贴图集图片路径。 + + DragonBones 3.0 + zh_CN - - + - + + + + - + - + - + - + - - + + + - The user custom data. + + DragonBones 5.0 + en_US + + - 用户自定义数据。 + + DragonBones 5.0 + zh_CN - - + + + - The custom int numbers. + + DragonBones 5.0 + en_US + + - 自定义整数。 + + DragonBones 5.0 + zh_CN - - - + + + - The custom float numbers. + + DragonBones 5.0 + en_US + + - 自定义浮点数。 + + DragonBones 5.0 + zh_CN - - + + + - The custom strings. + + DragonBones 5.0 + en_US + + - 自定义字符串。 + + DragonBones 5.0 + zh_CN - + + + + - + + - + + - - + + + - Get the custom int number. + + DragonBones 5.0 + en_US + + - 获取自定义整数。 + + DragonBones 5.0 + zh_CN - - + + + - Get the custom float number. + + DragonBones 5.0 + en_US + + - 获取自定义浮点数。 + + DragonBones 5.0 + zh_CN - - + + + - Get the custom string. + + DragonBones 5.0 + en_US + + - 获取自定义字符串。 + + DragonBones 5.0 + zh_CN - + + - + + - + + - + - - - - + + - - + + + This class encodes and decodes JSON strings. + Spec. details, see http://www.json.org/ + + JSON uses Arrays and Objects. These correspond here to the datatypes IList and IDictionary. + All numbers are parsed to doubles. + - - + + + Parses the string json into a value + + A JSON string. + An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false - - + + + Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string + + A Dictionary<string, object> / List<object> + A JSON encoded string, or null if object 'json' is not serializable - - + + + The features that intersect to form the contact point + This must be 4 bytes or less. + - - + + + Feature index on ShapeA + - - + + + Feature index on ShapeB + - - + + + The feature type on ShapeA + - - + + + The feature type on ShapeB + - - + + + Contact ids to facilitate warm starting. + - - + + + The features that intersect to form the contact point + - - + + + Used to quickly compare contact ids. + - - + + + A manifold point is a contact point belonging to a contact + manifold. It holds details related to the geometry and dynamics + of the contact points. + The local point usage depends on the manifold type: + -ShapeType.Circles: the local center of circleB + -SeparationFunction.FaceA: the local center of cirlceB or the clip point of polygonB + -SeparationFunction.FaceB: the clip point of polygonA + This structure is stored across time steps, so we keep it small. + Note: the impulses are used for internal caching and may not + provide reliable contact forces, especially for high speed collisions. + - - + + + Uniquely identifies a contact point between two Shapes + - + - - Support default skin data. + Usage depends on manifold type - - - + + + The non-penetration impulse + - - + + + The friction impulse + - - + + + A manifold for two touching convex Shapes. + Box2D supports multiple types of contact: + - Clip point versus plane with radius + - Point versus point with radius (circles) + The local point usage depends on the manifold type: + - ShapeType.Circles: the local center of circleA + - SeparationFunction.FaceA: the center of faceA + - SeparationFunction.FaceB: the center of faceB + Similarly the local normal usage: + - ShapeType.Circles: not used + - SeparationFunction.FaceA: the normal on polygonA + - SeparationFunction.FaceB: the normal on polygonB + We store contacts in this way so that position correction can + account for movement, which is critical for continuous physics. + All contact scenarios must be expressed in one of these types. + This structure is stored across time steps, so we keep it small. + - - - + + + Not use for Type.SeparationFunction.Points + - - - + + + Usage depends on manifold type + - - - + + + The number of manifold points + - - - + + + The points of contact + - - - + + + This is used for determining the state of contact points. + - - - + + + Point does not exist + - - + + + Point was added in the update + - - + + + Point persisted across the update + - + - - Check whether a specific point is inside a custom bounding box in the slot. - The coordinate system of the point is the inner coordinate system of the armature. - Custom bounding boxes need to be customized in Dragonbones Pro. + Point was removed in the update - - The horizontal coordinate of the point. - - The vertical coordinate of the point. - DragonBones 5.0 - en_US + + - - 检查特定点是否在插槽的自定义边界框内。 - 点的坐标系为骨架内坐标系。 - 自定义边界框需要在 DragonBones Pro 中自定义。 + Used for computing contact manifolds. - - 点的水平坐标。 - - 点的垂直坐标。 - DragonBones 5.0 - zh_CN - + - - Check whether a specific segment intersects a custom bounding box for the slot. - The coordinate system of the segment and intersection is the inner coordinate system of the armature. - Custom bounding boxes need to be customized in Dragonbones Pro. + Ray-cast input data. - - The horizontal coordinate of the beginning of the segment. - - The vertical coordinate of the beginning of the segment. - - The horizontal coordinate of the end point of the segment. - - The vertical coordinate of the end point of the segment. - - The first intersection at which a line segment intersects the bounding box from the beginning to the end. (If not set, the intersection point will not calculated) - - The first intersection at which a line segment intersects the bounding box from the end to the beginning. (If not set, the intersection point will not calculated) - - The normal radians of the tangent of the intersection boundary box. [x: Normal radian of the first intersection tangent, y: Normal radian of the second intersection tangent] (If not set, the normal will not calculated) - Intersection situation. [1: Disjoint and segments within the bounding box, 0: Disjoint, 1: Intersecting and having a nodal point and ending in the bounding box, 2: Intersecting and having a nodal point and starting at the bounding box, 3: Intersecting and having two intersections, N: Intersecting and having N intersections] - DragonBones 5.0 - en_US + + - - 检查特定线段是否与插槽的自定义边界框相交。 - 线段和交点的坐标系均为骨架内坐标系。 - 自定义边界框需要在 DragonBones Pro 中自定义。 + The ray extends from p1 to p1 + maxFraction * (p2 - p1). + If you supply a max fraction of 1, the ray extends from p1 to p2. + A max fraction of 0.5 makes the ray go from p1 and half way to p2. - - 线段起点的水平坐标。 - - 线段起点的垂直坐标。 - - 线段终点的水平坐标。 - - 线段终点的垂直坐标。 - - 线段从起点到终点与边界框相交的第一个交点。 (如果未设置,则不计算交点) - - 线段从终点到起点与边界框相交的第一个交点。 (如果未设置,则不计算交点) - - 交点边界框切线的法线弧度。 [x: 第一个交点切线的法线弧度, y: 第二个交点切线的法线弧度] (如果未设置,则不计算法线) - 相交的情况。 [-1: 不相交且线段在包围盒内, 0: 不相交, 1: 相交且有一个交点且终点在包围盒内, 2: 相交且有一个交点且起点在包围盒内, 3: 相交且有两个交点, N: 相交且有 N 个交点] - DragonBones 5.0 - zh_CN - + - - Forces the slot to update the state of the display object in the next frame. + The starting point of the ray. - DragonBones 4.5 - en_US + + - - 强制插槽在下一帧更新显示对象的状态。 + The ending point of the ray. - DragonBones 4.5 - zh_CN - + - - The visible of slot's display object. + Ray-cast output data. - true - DragonBones 5.6 - en_US + + - - 插槽的显示对象的可见。 + The ray hits at p1 + fraction * (p2 - p1), where p1 and p2 come from RayCastInput. + Contains the actual fraction of the ray where it has the intersection point. - true - DragonBones 5.6 - zh_CN - + - - The index of the display object displayed in the display list. + The normal of the face of the shape the ray has hit. - - TypeScript style, for reference only. -
-                let slot = armature.getSlot("weapon");
-                slot.displayIndex = 3;
-                slot.displayController = "none";
-            
-
- DragonBones 4.5 - en_US +
+ - - 此时显示的显示对象在显示列表中的索引。 + An axis aligned bounding box. - - TypeScript 风格,仅供参考。 -
-                let slot = armature.getSlot("weapon");
-                slot.displayIndex = 3;
-                slot.displayController = "none";
-            
-
- DragonBones 4.5 - zh_CN
- + - - The slot name. + The lower vertex - - DragonBones 3.0 - en_US + + - - 插槽名称。 + The upper vertex - - DragonBones 3.0 - zh_CN - + - - Contains a display list of display objects or child armatures. + Get the center of the AABB. - DragonBones 3.0 - en_US + + - - 包含显示对象或子骨架的显示列表。 + Get the extents of the AABB (half-widths). - DragonBones 3.0 - zh_CN - + - - The slot data. + Get the perimeter length - - DragonBones 4.5 - en_US + + - - 插槽数据。 + Gets the vertices of the AABB. - - DragonBones 4.5 - zh_CN + The corners of the AABB - - + + + First quadrant + - + - - The custom bounding box data for the slot at current time. + Second quadrant - DragonBones 5.0 - en_US + + - - 插槽此时的自定义包围盒数据。 + Third quadrant - DragonBones 5.0 - zh_CN - - - - - - - + - - The display object that the slot displays at this time. + Forth quadrant - - TypeScript style, for reference only. -
-                let slot = armature.getSlot("text");
-                slot.display = new yourEngine.TextField();
-            
-
- DragonBones 3.0 - en_US +
+ - - 插槽此时显示的显示对象。 + Verify that the bounds are sorted. And the bounds are valid numbers (not NaN). - - TypeScript 风格,仅供参考。 -
-                let slot = armature.getSlot("text");
-                slot.display = new yourEngine.TextField();
-            
-
- DragonBones 3.0 - zh_CN + + true if this instance is valid; otherwise, false. +
- + - - The child armature that the slot displayed at current time. + Combine an AABB into this one. - - TypeScript style, for reference only. -
-                let slot = armature.getSlot("weapon");
-            let prevChildArmature = slot.childArmature;
-            if (prevChildArmature) {
-            prevChildArmature.dispose();
-                }
-                slot.childArmature = factory.buildArmature("weapon_blabla", "weapon_blabla_project");
-            
-
- DragonBones 3.0 - en_US + The aabb. +
+ - - 插槽此时显示的子骨架。 - 注意,被替换的对象并不会被回收,根据语言和引擎的不同,需要额外处理。 + Combine two AABBs into this one. - - TypeScript 风格,仅供参考。 -
-                let slot = armature.getSlot("weapon");
-            let prevChildArmature = slot.childArmature;
-            if (prevChildArmature) {
-            prevChildArmature.dispose();
-                }
-                slot.childArmature = factory.buildArmature("weapon_blabla", "weapon_blabla_project");
-            
-
- DragonBones 3.0 - zh_CN + The aabb1. + The aabb2.
- + - - The parent bone to which it belongs. + Does this aabb contain the provided AABB. - DragonBones 3.0 - en_US + The aabb. + + true if it contains the specified aabb; otherwise, false. + + + - - 所属的父骨骼。 + Determines whether the AAABB contains the specified point. - DragonBones 3.0 - zh_CN + The point. + + true if it contains the specified point; otherwise, false. + - + - - The base class of the transform object. + Test if the two AABBs overlap. - - DragonBones 4.5 - en_US + The first AABB. + The second AABB. + True if they are overlapping. + + - - 变换对象的基类。 + Raycast against this AABB using the specificed points and maxfraction (found in input) - - DragonBones 4.5 - zh_CN - - - + The results of the raycast. + The parameters for the raycast. + True if the ray intersects the AABB - - + + + This holds polygon B expressed in frame A. + - - + + + This structure is used to keep track of the best separating axis. + - + - - A matrix relative to the armature coordinate system. + Reference face used for clipping - DragonBones 3.0 - en_US + + - - 相对于骨架坐标系的矩阵。 + Collision methods - DragonBones 3.0 - zh_CN - + - - A transform relative to the armature coordinate system. + Test overlap between the two shapes. - - DragonBones 3.0 - en_US + The first shape. + The index for the first shape. + The second shape. + The index for the second shape. + The transform for the first shape. + The transform for the seconds shape. + + + - - 相对于骨架坐标系的变换。 + Compute the collision manifold between two circles. - - DragonBones 3.0 - zh_CN - + - - The offset transform relative to the armature or the parent bone coordinate system. + Compute the collision manifold between a polygon and a circle. - - DragonBones 3.0 - en_US + The manifold. + The polygon A. + The transform of A. + The circle B. + The transform of B. + + - - 相对于骨架或父骨骼坐标系的偏移变换。 + Compute the collision manifold between two polygons. - - DragonBones 3.0 - zh_CN + The manifold. + The poly A. + The transform A. + The poly B. + The transform B. - - + + + Compute contact points for edge versus circle. + This accounts for edge connectivity. + + The manifold. + The edge A. + The transform A. + The circle B. + The transform B. - - + + + Collides and edge and a polygon, taking into account edge adjacency. + + The manifold. + The edge A. + The xf A. + The polygon B. + The xf B. - - + + + Clipping for contact manifolds. + + The v out. + The v in. + The normal. + The offset. + The vertex index A. + - - - + + + Find the separation between poly1 and poly2 for a give edge normal on poly1. + + The poly1. + The XF1. + The edge1. + The poly2. + The XF2. + - - + + + Find the max separation between poly1 and poly2 using edge normals from poly1. + + Index of the edge. + The poly1. + The XF1. + The poly2. + The XF2. + - + - - For performance considerations, rotation or scale in the {@link #global} attribute of the bone or slot is not always properly accessible, - some engines do not rely on these attributes to update rendering, such as Egret. - The use of this method ensures that the access to the {@link #global} property is correctly rotation or scale. + A distance proxy is used by the GJK algorithm. + It encapsulates any shape. - - TypeScript style, for reference only. -
-                bone.updateGlobalTransform();
-                let rotation = bone.global.rotation;
-            
-
- DragonBones 3.0 - en_US +
+ - - 出于性能的考虑,骨骼或插槽的 {@link #global} 属性中的旋转或缩放并不总是正确可访问的,有些引擎并不依赖这些属性更新渲染,比如 Egret。 - 使用此方法可以保证访问到 {@link #global} 属性中正确的旋转或缩放。 + Initialize the proxy using the given shape. The shape + must remain in scope while the proxy is in use. - - TypeScript 风格,仅供参考。 -
-                bone.updateGlobalTransform();
-                let rotation = bone.global.rotation;
-            
-
- DragonBones 3.0 - zh_CN + The shape. + The index.
- + - - The armature to which it belongs. + Get the supporting vertex index in the given direction. - DragonBones 3.0 - en_US + The direction. + + + - - 所属的骨架。 + Get the supporting vertex in the given direction. - DragonBones 3.0 - zh_CN + The direction. + - + - - The BaseObject is the base class for all objects in the DragonBones framework. - All BaseObject instances are cached to the object pool to reduce the performance consumption of frequent requests for memory or memory recovery. + Used to warm start ComputeDistance. + Set count to zero on first call. - DragonBones 4.5 - en_US + + - - 基础对象,通常 DragonBones 的对象都继承自该类。 - 所有基础对象的实例都会缓存到对象池,以减少频繁申请内存或内存回收的性能消耗。 + Length or area - DragonBones 4.5 - zh_CN - + - - Set the maximum cache count of the specify object pool. + Vertices on shape A - - The specify class. (Set all object pools max cache count if not set) - - Max count. - DragonBones 4.5 - en_US + + - - 设置特定对象池的最大缓存数量。 + Vertices on shape B - - 特定的类。 (不设置则设置所有对象池的最大缓存数量) - - 最大缓存数量。 - DragonBones 4.5 - zh_CN - + - - Clear the cached instances of a specify object pool. + Input for Distance.ComputeDistance(). + You have to option to use the shape radii in the computation. - - Specify class. (Clear all cached instances if not set) - DragonBones 4.5 - en_US + + - - 清除特定对象池的缓存实例。 + Output for Distance.ComputeDistance(). - - 特定的类。 (不设置则清除所有缓存的实例) - DragonBones 4.5 - zh_CN - + - - Get an instance of the specify class from object pool. + Number of GJK iterations used - - The specify class. - DragonBones 4.5 - en_US + + - - 从对象池中获取特定类的实例。 + Closest point on shapeA - - 特定的类。 - DragonBones 4.5 - zh_CN - + - - A unique identification number assigned to the object. + Closest point on shapeB - DragonBones 4.5 - en_US + + - - 分配给此实例的唯一标识号。 + Barycentric coordinate for closest point - DragonBones 4.5 - zh_CN - - - - + - - Clear the object and return it back to object pool。 + wA index - DragonBones 4.5 - en_US + + - - 清除该实例的所有数据并将其返还对象池。 + wB index - DragonBones 4.5 - zh_CN - - - - - - - - - - + + + wB - wA + - + - - Bounding box type. + Support point in proxyA - DragonBones 5.0 - en_US + + - - 边界框类型。 + Support point in proxyB - DragonBones 5.0 - zh_CN - - - + + + The Gilbert–Johnson–Keerthi distance algorithm that provides the distance between shapes. + - - - + + + The number of calls made to the ComputeDistance() function. + Note: This is only activated when Settings.EnableDiagnostics = true + - - - + + + The number of iterations that was made on the last call to ComputeDistance(). + Note: This is only activated when Settings.EnableDiagnostics = true + - - - + + + The maximum numer of iterations ever mae with calls to the CompteDistance() funtion. + Note: This is only activated when Settings.EnableDiagnostics = true + - + - - Offset mode. + A node in the dynamic tree. The client does not interact with this directly. - DragonBones 5.5 - en_US + + - - 偏移模式。 + Enlarged AABB - DragonBones 5.5 - zh_CN - + + + A dynamic tree arranges data in a binary tree to accelerate + queries such as volume queries and ray casts. Leafs are proxies + with an AABB. In the tree we expand the proxy AABB by Settings.b2_fatAABBFactor + so that the proxy AABB is bigger than the client object. This allows the client + object to move by small amounts without triggering a tree update. + + Nodes are pooled and relocatable, so we use node indices rather than pointers. + + + - - Animation fade out mode. + Constructing the tree initializes the node pool. - DragonBones 4.5 - en_US + + - - 动画淡出模式。 + Compute the height of the binary tree in O(N) time. Should not be called often. - DragonBones 4.5 - zh_CN - + - - Do not fade out of any animation states. + Get the ratio of the sum of the node areas to the root area. - en_US + + - - 不淡出任何的动画状态。 + Get the maximum balance of an node in the tree. The balance is the difference + in height of the two children of a node. - zh_CN - + - - Fade out the animation states of the same layer. + Create a proxy in the tree as a leaf node. We return the index + of the node instead of a pointer so that we can grow + the node pool. + /// + The aabb. + The user data. + Index of the created proxy + + + + Destroy a proxy. This asserts if the id is invalid. - en_US + The proxy id. + + - - 淡出同层的动画状态。 + Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, + then the proxy is removed from the tree and re-inserted. Otherwise + the function returns immediately. - zh_CN + The proxy id. + The aabb. + The displacement. + true if the proxy was re-inserted. - + - - Fade out the animation states of the same group. + Get proxy user data. - en_US + + The proxy id. + the proxy user data or 0 if the id is invalid. + + - - 淡出同组的动画状态。 + Get the fat AABB for a proxy. - zh_CN + The proxy id. + The fat AABB. - + - - Fade out the animation states of the same layer and group. + Query an AABB for overlapping proxies. The callback class + is called for each proxy that overlaps the supplied AABB. - en_US + The callback. + The aabb. + + - - 淡出同层并且同组的动画状态。 + Ray-cast against the proxies in the tree. This relies on the callback + to perform a exact ray-cast in the case were the proxy contains a Shape. + The callback also performs the any collision filtering. This has performance + roughly equal to k * log(n), where k is the number of collisions and n is the + number of proxies in the tree. - zh_CN + A callback class that is called for each proxy that is hit by the ray. + The ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). - + - - Fade out of all animation states. + Perform a left or right rotation if node A is imbalanced. - en_US + + the new root index. + + - - 淡出所有的动画状态。 + Compute the height of a sub-tree. - zh_CN + The node id to use as parent. + The height of the tree. - + - - Does not replace the animation state with the same name. + Compute the height of the entire tree. - en_US + The height of the tree. + + - - 不替换同名的动画状态。 + Validate this tree. For testing. - zh_CN - - + + + Build an optimal tree. Very expensive. For testing. + - + - - The properties of the object carry basic information about an event, - which are passed as parameter or parameter's parameter to event listeners when an event occurs. + Shift the origin of the nodes - DragonBones 4.5 - en_US + The displacement to use. + + - - 事件对象,包含有关事件的基本信息,当发生事件时,该实例将作为参数或参数的参数传递给事件侦听器。 + The broad-phase is used for computing pairs and performing volume queries and ray casts. + This broad-phase does not persist pairs. Instead, this reports potentially new pairs. + It is up to the client to consume the new pairs and to track subsequent overlap. - DragonBones 4.5 - zh_CN - + - - Animation start play. + Constructs a new broad phase based on the dynamic tree implementation - DragonBones 4.5 - en_US + + - - 动画开始播放。 + Get the number of proxies. - DragonBones 4.5 - zh_CN + The proxy count. - + - - Animation loop play complete once. + Create a proxy with an initial AABB. Pairs are not reported until + UpdatePairs is called. - DragonBones 4.5 - en_US + The user data. + + + - - 动画循环播放完成一次。 + Destroy a proxy. It is up to the client to remove any pairs. - DragonBones 4.5 - zh_CN + The proxy id. - + - - Animation play complete. + This is called from DynamicTree.Query when we are gathering pairs. - DragonBones 4.5 - en_US + + + + - - 动画播放完成。 + Get the AABB for a proxy. - DragonBones 4.5 - zh_CN + The proxy id. + The aabb. - + - - Animation fade in start. + Get user data from a proxy. Returns null if the id is invalid. - DragonBones 4.5 - en_US + The proxy id. + + + - - 动画淡入开始。 + Test overlap of fat AABBs. - DragonBones 4.5 - zh_CN + The proxy id A. + The proxy id B. + - + - - Animation fade in complete. + Update the pairs. This results in pair callbacks. This can only add pairs. - DragonBones 4.5 - en_US + The callback. + + - - 动画淡入完成。 + Query an AABB for overlapping proxies. The callback class + is called for each proxy that overlaps the supplied AABB. - DragonBones 4.5 - zh_CN + The callback. + The aabb. - + - - Animation fade out start. + Ray-cast against the proxies in the tree. This relies on the callback + to perform a exact ray-cast in the case were the proxy contains a shape. + The callback also performs the any collision filtering. This has performance + roughly equal to k * log(n), where k is the number of collisions and n is the + number of proxies in the tree. - DragonBones 4.5 - en_US + A callback class that is called for each proxy that is hit by the ray. + The ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). + + - - 动画淡出开始。 + Get the tree quality based on the area of the tree. - DragonBones 4.5 - zh_CN - + - - Animation fade out complete. + Gets the balance of the tree. - DragonBones 4.5 - en_US + + - - 动画淡出完成。 + Gets the height of the tree. - DragonBones 4.5 - zh_CN - + - - Animation frame event. + A chain shape is a free form sequence of line segments. + The chain has two-sided collision, so you can use inside and outside collision. + Therefore, you may use any winding order. + Connectivity information is used to create smooth collisions. + WARNING: The chain will not collide properly if there are self-intersections. - DragonBones 4.5 - en_US + + - - 动画帧事件。 + The vertices. These are not owned/freed by the chain Shape. - DragonBones 4.5 - zh_CN - + - - Animation frame sound event. + Constructor for ChainShape. By default have 0 in density. - DragonBones 4.5 - en_US + + - - 动画帧声音事件。 + Create a new chainshape from the vertices. - DragonBones 4.5 - zh_CN + The vertices to use. Must contain 2 or more vertices. + Set to true to create a closed loop. It connects the first vertice to the last, and automatically adjusts connectivity to create smooth collisions along the chain. - - - + - - The armature that dispatch the event. + Establish connectivity to a vertex that precedes the first vertex. + Don't call this for loops. - - DragonBones 4.5 - en_US + + - - 发出该事件的骨架。 + Establish connectivity to a vertex that follows the last vertex. + Don't call this for loops. - - DragonBones 4.5 - zh_CN + + - - The custom data. + This method has been optimized to reduce garbage. - - - DragonBones 5.0 - en_US + The cached edge to set properties on. + The index. + + - - 自定义数据。 + Get a child edge. - - - DragonBones 5.0 - zh_CN + The index. - + - - If is a frame event, the value is used to describe the time that the event was in the animation timeline. (In seconds) + Compare the chain to another chain - DragonBones 4.5 - en_US + The other chain + True if the two chain shapes are the same + + - - 如果是帧事件,此值用来描述该事件在动画时间轴中所处的时间。(以秒为单位) + A circle shape. - DragonBones 4.5 - zh_CN - + - - The event type。 + Create a new circle with the desired radius and density. - DragonBones 4.5 - en_US + The radius of the circle. + The density of the circle. + + - - 事件类型。 + Get or set the position of the circle - DragonBones 4.5 - zh_CN - + - - The event name. (The frame event name or the frame sound name) + Compare the circle to another circle - DragonBones 4.5 - en_US + The other circle + True if the two circles are the same size and have the same position + + - - 事件名称。 (帧事件的名称或帧声音的名称) + A line segment (edge) shape. These can be connected in chains or loops + to other edge shapes. + The connectivity information is used to ensure correct contact normals. - DragonBones 4.5 - zh_CN - + - - The bone that dispatch the event. + Edge start vertex - - DragonBones 4.5 - en_US + + - - 发出该事件的骨骼。 + Edge end vertex - - DragonBones 4.5 - zh_CN - + - - The slot that dispatch the event. + Create a new EdgeShape with the specified start and end. - - DragonBones 4.5 - en_US + The start of the edge. + The end of the edge. + + - - 发出该事件的插槽。 + Is true if the edge is connected to an adjacent vertex before vertex 1. - - DragonBones 4.5 - zh_CN - + - - The animation state that dispatch the event. + Is true if the edge is connected to an adjacent vertex after vertex2. - - DragonBones 4.5 - en_US + + - - 发出该事件的动画状态。 + Optional adjacent vertices. These are used for smooth collision. - - DragonBones 4.5 - zh_CN - - - - - - - + - - The event dispatcher interface. - Dragonbones event dispatch usually relies on docking engine to implement, which defines the event method to be implemented when docking the engine. + Optional adjacent vertices. These are used for smooth collision. - DragonBones 4.5 - en_US + + - - 事件派发接口。 - DragonBones 的事件派发通常依赖于对接的引擎来实现,该接口定义了对接引擎时需要实现的事件方法。 + These are the edge vertices - DragonBones 4.5 - zh_CN - + - - Checks whether the object has any listeners registered for a specific type of event。 + These are the edge vertices - - Event type. - DragonBones 4.5 - en_US + + - - 检查是否为特定的事件类型注册了任何侦听器。 + Set this as an isolated edge. - - 事件类型。 - DragonBones 4.5 - zh_CN + The start. + The end. - + - - Dispatches an event into the event flow. + Represents a simple non-selfintersecting convex polygon. + Create a convex hull from the given array of points. - - Event type. - - Event object. - - DragonBones 4.5 - en_US + + - - 分派特定的事件到事件流中。 + Initializes a new instance of the class. - - 事件类型。 - - 事件数据。 - - DragonBones 4.5 - zh_CN + The vertices. + The density. - + - - Add an event listener object so that the listener receives notification of an event. + Create a new PolygonShape with the specified density. - - Event type. - - Event listener. - - The listener function's "this". - DragonBones 4.5 - en_US + The density. + + - - 添加特定事件类型的事件侦听器,以使侦听器能够接收事件通知。 + Create a convex hull from the given array of local points. + The number of vertices must be in the range [3, Settings.MaxPolygonVertices]. + Warning: the points may be re-ordered, even if they form a convex polygon + Warning: collinear points are handled but not removed. Collinear points may lead to poor stacking behavior. - - 事件类型。 - - 事件侦听器。 - - 侦听函数绑定的 this 对象。 - DragonBones 4.5 - zh_CN - + - - Removes a listener from the object. + Given a transform, compute the associated axis aligned bounding box for a child shape. - - Event type. - - Event listener. - - The listener function's "this". - DragonBones 4.5 - en_US + The aabb results. + The world transform of the shape. + The child shape index. + + - - 删除特定事件类型的侦听器。 + This holds the mass data computed for a shape. - - 事件类型。 - - 事件侦听器。 - - 侦听函数绑定的 this 对象。 - DragonBones 4.5 - zh_CN - - - - - + - - Base class for the factory that create the armatures. (Typically only one global factory instance is required) - The factory instance create armatures by parsed and added DragonBonesData instances and TextureAtlasData instances. - Once the data has been parsed, it has been cached in the factory instance and does not need to be parsed again until it is cleared by the factory instance. + The area of the shape - - - - - DragonBones 3.0 - en_US + + - - 创建骨架的工厂基类。 (通常只需要一个全局工厂实例) - 工厂通过解析并添加的 DragonBonesData 实例和 TextureAtlasData 实例来创建骨架。 - 当数据被解析过之后,已经添加到工厂中,在没有被工厂清理之前,不需要再次解析。 + The position of the shape's centroid relative to the shape's origin. - - - - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - + + + The rotational inertia of the shape about the local origin. + - - + + + The mass of the shape, usually in kilograms. + - - + + + The equal operator + + + + - + - - Create a factory instance. (typically only one global factory instance is required) + The not equal operator - DragonBones 3.0 - en_US + + + + + - - 创建一个工厂实例。 (通常只需要一个全局工厂实例) + A shape is used for collision detection. You can create a shape however you like. + Shapes used for simulation in World are created automatically when a Fixture + is created. Shapes may encapsulate a one or more child shapes. - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - + + + Contains the properties of the shape such as: + - Area of the shape + - Centroid + - Inertia + - Mass + - - + + + Get the type of this shape. + + The type of the shape. - - + + + Get the number of child primitives. + + - - + + + Gets or sets the density. + Changing the density causes a recalculation of shape properties. + + The density. - - + + + Radius of the Shape + Changing the radius causes a recalculation of shape properties. + - - + + + Clone the concrete shape + + A clone of the shape - + - - Parse the raw data to a DragonBonesData instance and cache it to the factory. + Test a point for containment in this shape. + Note: This only works for convex shapes. - - The raw data. - - Specify a cache name for the instance so that the instance can be obtained through this name. (If not set, use the instance name instead) - - Specify a scaling value for all armatures. (Default: 1.0) - DragonBonesData instance - - - - - DragonBones 4.5 - en_US + The shape world transform. + A point in world coordinates. + True if the point is inside the shape + + - - 将原始数据解析为 DragonBonesData 实例,并缓存到工厂中。 + Cast a ray against a child shape. - - 原始数据。 - - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) - - 为所有的骨架指定一个缩放值。 (默认: 1.0) - DragonBonesData 实例 - - - - - DragonBones 4.5 - zh_CN + The ray-cast results. + The ray-cast input parameters. + The transform to be applied to the shape. + The child shape index. + True if the ray-cast hits the shape - + - - Parse the raw texture atlas data and the texture atlas object to a TextureAtlasData instance and cache it to the factory. + Given a transform, compute the associated axis aligned bounding box for a child shape. - - The raw texture atlas data. - - The texture atlas object. - - Specify a cache name for the instance so that the instance can be obtained through this name. (If not set, use the instance name instead) - - Specify a scaling value for the map set. (Default: 1.0) - TextureAtlasData instance - - - - - DragonBones 4.5 - en_US + The aabb results. + The world transform of the shape. + The child shape index. + + - - 将原始贴图集数据和贴图集对象解析为 TextureAtlasData 实例,并缓存到工厂中。 + Compute the mass properties of this shape using its dimensions and density. + The inertia tensor is computed about the local origin, not the centroid. - - 原始贴图集数据。 - - 贴图集对象。 - - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) - - 为贴图集指定一个缩放值。 (默认: 1.0) - TextureAtlasData 实例 - - - - - DragonBones 4.5 - zh_CN - - + + + Compare this shape to another shape based on type and properties. + + The other shape + True if the two shapes are the same. - + - - Get a specific DragonBonesData instance. + Used for the buoyancy controller - - The DragonBonesData instance cache name. - DragonBonesData instance - - - - - DragonBones 3.0 - en_US + + - - 获取特定的 DragonBonesData 实例。 + Input parameters for CalculateTimeOfImpact - - DragonBonesData 实例的缓存名称。 - DragonBonesData 实例 - - - - - DragonBones 3.0 - zh_CN - + - - Cache a DragonBonesData instance to the factory. + Compute the upper bound on time before two shapes penetrate. Time is represented as + a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate, + non-tunneling collision. If you change the time interval, you should call this function + again. + Note: use Distance() to compute the contact point and normal at the time of impact. - - The DragonBonesData instance. - - Specify a cache name for the instance so that the instance can be obtained through this name. (if not set, use the instance name instead) - - - - - DragonBones 3.0 - en_US + The output. + The input. + + - - 将 DragonBonesData 实例缓存到工厂中。 + Andrew's Monotone Chain Convex Hull algorithm. + Used to get the convex hull of a point cloud. + + Source: http://www.softsurfer.com/Archive/algorithm_0109/algorithm_0109.htm - - DragonBonesData 实例。 - - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) - - - - - DragonBones 3.0 - zh_CN - + - - Remove a DragonBonesData instance. + Returns the convex hull from the given vertices.. - - The DragonBonesData instance cache name. - - Whether to dispose data. (Default: true) - - - - - DragonBones 3.0 - en_US + + - - 移除 DragonBonesData 实例。 + Giftwrap convex hull algorithm. + O(nh) time complexity, where n is the number of points and h is the number of points on the convex hull. + + See http://en.wikipedia.org/wiki/Gift_wrapping_algorithm for more details. - - DragonBonesData 实例缓存名称。 - - 是否释放数据。 (默认: true) - - - - - DragonBones 3.0 - zh_CN - + - - Get a list of specific TextureAtlasData instances. + Returns the convex hull from the given vertices. - - The TextureAtlasData cahce name. - - - - - DragonBones 3.0 - en_US + The vertices. + + + + Creates a convex hull. + Note: + 1. Vertices must be of a simple polygon, i.e. edges do not overlap. + 2. Melkman does not work on point clouds + + + Implemented using Melkman's Convex Hull Algorithm - O(n) time complexity. + Reference: http://www.ams.sunysb.edu/~jsbm/courses/345/melkman.pdf + + + - - 获取特定的 TextureAtlasData 实例列表。 + Returns a convex hull from the given vertices. - - TextureAtlasData 实例缓存名称。 - - - - - DragonBones 3.0 - zh_CN + A convex hull in counter clockwise winding order. - + - - Cache a TextureAtlasData instance to the factory. + Convex decomposition algorithm created by Mark Bayazit (http://mnbayazit.com/) + + Properties: + - Tries to decompose using polygons instead of triangles. + - Tends to produce optimal results with low processing time. + - Running time is O(nr), n = number of vertices, r = reflex vertices. + - Does not support holes. + + For more information about this algorithm, see http://mnbayazit.com/406/bayazit - - The TextureAtlasData instance. - - Specify a cache name for the instance so that the instance can be obtained through this name. (if not set, use the instance name instead) - - - - - DragonBones 3.0 - en_US + + - - 将 TextureAtlasData 实例缓存到工厂中。 + Decompose the polygon into several smaller non-concave polygon. + If the polygon is already convex, it will return the original polygon, unless it is over Settings.MaxPolygonVertices. - - TextureAtlasData 实例。 - - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) - - - - - DragonBones 3.0 - zh_CN - + - - Remove a TextureAtlasData instance. + 2D constrained Delaunay triangulation algorithm. + Based on the paper "Sweep-line algorithm for constrained Delaunay triangulation" by V. Domiter and and B. Zalik + + Properties: + - Creates triangles with a large interior angle. + - Supports holes + - Generate a lot of garbage due to incapsulation of the Poly2Tri library. + - Running time is O(n^2), n = number of vertices. + - Does not care about winding order. + + Source: http://code.google.com/p/poly2tri/ - - The TextureAtlasData instance cache name. - - Whether to dispose data. - - - - - DragonBones 3.0 - en_US + + - - 移除 TextureAtlasData 实例。 + Decompose the polygon into several smaller non-concave polygon. - - TextureAtlasData 实例的缓存名称。 - - 是否释放数据。 - - - - - DragonBones 3.0 - zh_CN - + + Neighbor pointers + Flags to determine if an edge is a Delauney edge + + + Flags to determine if an edge is a Constrained edge + + + Has this triangle been marked as an interior triangle? + + - - Get a specific armature data. + Update neighbor pointers - - The armature data name. - - The cached name for DragonbonesData instance. - - DragonBones 5.1 - en_US + Point 1 of the shared edge + Point 2 of the shared edge + This triangle's new neighbor + + - - 获取特定的骨架数据。 + Exhaustive search to update neighbor pointers - - 骨架数据名称。 - - DragonBonesData 实例的缓存名称。 - - DragonBones 5.1 - zh_CN - + + Clears all references to all other triangles and points + + + Opposite triangle + The point in t that isn't shared between the triangles + + - - Clear all cached DragonBonesData instances and TextureAtlasData instances. + Legalize triangle by rotating clockwise around oPoint - - Whether to dispose data. - DragonBones 4.5 - en_US + The origin point to rotate around + ??? + + - - 清除缓存的所有 DragonBonesData 实例和 TextureAtlasData 实例。 + Finalize edge marking - - 是否释放数据。 - DragonBones 4.5 - zh_CN - + - - Create a armature from cached DragonBonesData instances and TextureAtlasData instances. - Note that when the created armature that is no longer in use, you need to explicitly dispose {@link #dragonBones.Armature#dispose()}. + Mark edge as constrained - - The armature data name. - - The cached name of the DragonBonesData instance. (If not set, all DragonBonesData instances are retrieved, and when multiple DragonBonesData instances contain a the same name armature data, it may not be possible to accurately create a specific armature) - - The skin name, you can set a different ArmatureData name to share it's skin data. (If not set, use the default skin data) - The armature. - - TypeScript style, for reference only. -
-                let armature = factory.buildArmature("armatureName", "dragonBonesName");
-                armature.clock = factory.clock;
-            
-
- - - DragonBones 3.0 - en_US +
+ - - 通过缓存的 DragonBonesData 实例和 TextureAtlasData 实例创建一个骨架。 - 注意,创建的骨架不再使用时,需要显式释放 {@link #dragonBones.Armature#dispose()}。 + Get the index of the neighbor that shares this edge (or -1 if it isn't shared) - - 骨架数据名称。 - - DragonBonesData 实例的缓存名称。 (如果未设置,将检索所有的 DragonBonesData 实例,当多个 DragonBonesData 实例中包含同名的骨架数据时,可能无法准确的创建出特定的骨架) - - 皮肤名称,可以设置一个其他骨架数据名称来共享其皮肤数据。(如果未设置,则使用默认的皮肤数据) - 骨架。 - - TypeScript 风格,仅供参考。 -
-                let armature = factory.buildArmature("armatureName", "dragonBonesName");
-                armature.clock = factory.clock;
-            
-
- - - DragonBones 3.0 - zh_CN + index of the shared edge or -1 if edge isn't shared
- - + + @author Thomas Åhlen (thahlen@gmail.com) - + - - Replaces the current display data for a particular slot with a specific display data. - Specify display data with "dragonBonesName/armatureName/slotName/displayName". + MM: This seems to be used by LocateNode to guess a position in the implicit linked list of AdvancingFrontNodes near x + Removed an overload that depended on this being exact - - The DragonBonesData instance cache name. - - The armature data name. - - The slot data name. - - The display data name. - - The slot. - - The index of the display data that is replaced. (If it is not set, replaces the current display data) - - TypeScript style, for reference only. -
-                let slot = armature.getSlot("weapon");
-                factory.replaceSlotDisplay("dragonBonesName", "armatureName", "slotName", "displayName", slot);
-            
-
- DragonBones 4.5 - en_US +
+ - - 用特定的显示对象数据替换特定插槽当前的显示对象数据。 - 用 "dragonBonesName/armatureName/slotName/displayName" 指定显示对象数据。 + We use a balancing tree to locate a node smaller or equal to given key value - - DragonBonesData 实例的缓存名称。 - - 骨架数据名称。 - - 插槽数据名称。 - - 显示对象数据名称。 - - 插槽。 - - 被替换的显示对象数据的索引。 (如果未设置,则替换当前的显示对象数据) - - TypeScript 风格,仅供参考。 -
-                let slot = armature.getSlot("weapon");
-                factory.replaceSlotDisplay("dragonBonesName", "armatureName", "slotName", "displayName", slot);
-            
-
- DragonBones 4.5 - zh_CN
- - - - - + - - Replaces the existing animation data for a specific armature with the animation data for the specific armature data. - This enables you to make a armature template so that other armature without animations can share it's animations. + This implementation will use simple node traversal algorithm to find a point on the front - - The armtaure. - - The armature data. - - Whether to completely overwrite the original animation. (Default: false) - - TypeScript style, for reference only. -
-                let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
-                let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
-                if (armatureDataB) {
-                factory.replaceAnimation(armatureA, armatureDataB);
-                }
-            
-
- - - DragonBones 5.6 - en_US +
+ - - 用特定骨架数据的动画数据替换特定骨架现有的动画数据。 - 这样就能实现制作一个骨架动画模板,让其他没有制作动画的骨架共享该动画。 + Triangulate simple polygon with holes - - 骨架。 - - 骨架数据。 - - 是否完全覆盖原来的动画。(默认: false) - - TypeScript 风格,仅供参考。 -
-                let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
-                let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
-                if (armatureDataB) {
-                factory.replaceAnimation(armatureA, armatureDataB);
-                }
-            
-
- - - DragonBones 5.6 - zh_CN
- - + + + Start sweeping the Y-sorted point set from bottom to top + - - + + + If this is a Delaunay Triangulation of a pointset we need to fill so the triangle mesh gets a ConvexHull + - + - - An Worldclock instance updated by engine. + We will traverse the entire advancing front and fill it to form a convex hull. - DragonBones 5.7 - en_US + + - - 由引擎驱动的 WorldClock 实例。 + Find closes node to the left of the new point and + create a new triangle. If needed new holes and basins + will be filled to. - DragonBones 5.7 - zh_CN - + - - Deprecated, please refer to {@link #replaceSkin}. + Creates a new front triangle and legalize it - en_US + + - - 已废弃,请参考 {@link #replaceSkin}。 + When we need to traverse from one triangle to the next we need + the point in current triangle that is the opposite point to the next + triangle. - zh_CN - - - + + + After a flip we have two triangles and know that only one will still be + intersecting the edge. So decide which to contiune with and legalize the other + + + should be the result of an TriangulationUtil.orient2d( eq, op, ep ) + triangle 1 + triangle 2 + a point shared by both triangles + another point shared by both triangles + returns the triangle still intersecting the edge - + + - - 2D Transform matrix. + Fills holes in the Advancing Front - DragonBones 3.0 - en_US + + - - 2D 转换矩阵。 + Fills a basin that has formed on the Advancing Front to the right + of given node. + First we decide a left,bottom and right node that forms the + boundaries of the basin. Then we do a reqursive fill. - DragonBones 3.0 - zh_CN + + starting node, this or next node will be left node - + - - The value that affects the positioning of pixels along the x axis when scaling or rotating an image. + Recursive algorithm to fill a Basin with triangles - 1.0 - DragonBones 3.0 - en_US + + - - 缩放或旋转图像时影响像素沿 x 轴定位的值。 + ??? - 1.0 - DragonBones 3.0 - zh_CN + middle node + the angle between 3 front nodes - + - - The value that affects the positioning of pixels along the y axis when rotating or skewing an image. + The basin angle is decided against the horizontal line [1,0] - 0.0 - DragonBones 3.0 - en_US + + - - 旋转或倾斜图像时影响像素沿 y 轴定位的值。 + Adds a triangle to the advancing front to fill a hole. - 0.0 - DragonBones 3.0 - zh_CN + + middle node, that is the bottom of the hole - + - - The value that affects the positioning of pixels along the x axis when rotating or skewing an image. + Returns true if triangle was legalized - 0.0 - DragonBones 3.0 - en_US + + - - 旋转或倾斜图像时影响像素沿 x 轴定位的值。 + Rotates a triangle pair one vertex CW + n2 n2 + P +-----+ P +-----+ + | t /| |\ t | + | / | | \ | + n1| / |n3 n1| \ |n3 + | / | after CW | \ | + |/ oT | | oT \| + +-----+ oP +-----+ + n4 n4 - 0.0 - DragonBones 3.0 - zh_CN - + - - The value that affects the positioning of pixels along the y axis when scaling or rotating an image. + Give two points in any order. Will always be ordered so + that q.y > p.y and q.x > p.x if same y value - 1.0 - DragonBones 3.0 - en_US + + + + @author Thomas Åhlén, thahlen@gmail.com + + + - - 缩放或旋转图像时影响像素沿 y 轴定位的值。 + Try to map a node to all sides of this triangle that don't have + a neighbor. - 1.0 - DragonBones 3.0 - zh_CN - + - - The distance by which to translate each point along the x axis. + Create a polygon from a list of at least 3 points with no duplicates. - 0.0 - DragonBones 3.0 - en_US + A list of unique points + + - - 沿 x 轴平移每个点的距离。 + Create a polygon from a list of at least 3 points with no duplicates. - 0.0 - DragonBones 3.0 - zh_CN + A list of unique points. - + - - The distance by which to translate each point along the y axis. + Creates constraints and populates the context with points - 0.0 - DragonBones 3.0 - en_US + The context + + - - 沿 y 轴平移每个点的距离。 + Add a hole to the polygon. - 0.0 - DragonBones 3.0 - zh_CN + A subtraction polygon fully contained inside this polygon. - - + + + Inserts newPoint after point. + + The point to insert after in the polygon + The point to insert into the polygon - - + + + Inserts list (after last point in polygon?) + + - - + + + Adds a point after the last in the polygon. + + The point to add - + - - Convert to unit matrix. - The resulting matrix has the following properties: a=1, b=0, c=0, d=1, tx=0, ty=0. + Removes a point from the polygon. - DragonBones 3.0 - en_US + + + + + @param points - A list of all points in PointSet + @param constraints - Pairs of two points defining a constraint, all points must be part of given PointSet! + + + + @author Thomas Åhlén, thahlen@gmail.com + + - - 转换为单位矩阵。 - 该矩阵具有以下属性:a=1、b=0、c=0、d=1、tx=0、ty=0。 + Requirements: + 1. a,b and c form a triangle. + 2. a and d is know to be on opposite side of bc + + a + + + / \ + / \ + b/ \c + +-------+ + / B \ + / \ + + Facts: + d has to be in area B to have a chance to be inside the circle formed by a,b and c + d is outside B if orient2d(a,b,d) or orient2d(c,a,d) is CW + This preknowledge gives us a way to optimize the incircle test - DragonBones 3.0 - zh_CN + triangle point, opposite d + triangle point + triangle point + point opposite a + true if d is inside circle, false if on circle edge - - - - Multiplies the current matrix with another matrix. - - - The matrix that needs to be multiplied. - DragonBones 3.0 - en_US + + Forumla to calculate signed area + Positive if CCW + Negative if CW + 0 if collinear + A[P1,P2,P3] = (x1*y2 - y1*x2) + (x2*y3 - y2*x3) + (x3*y1 - y3*x1) + = (x1-x3)*(y2-y3) - (y1-y3)*(x2-x3) + + - - 将当前矩阵与另一个矩阵相乘。 + Convex decomposition algorithm using ear clipping + + Properties: + - Only works on simple polygons. + - Does not support holes. + - Running time is O(n^2), n = number of vertices. + + Source: http://www.ewjordan.com/earClip/ - - 需要相乘的矩阵。 - DragonBones 3.0 - zh_CN - + - - Convert to inverse matrix. + Decompose the polygon into several smaller non-concave polygon. + Each resulting polygon will have no more than Settings.MaxPolygonVertices vertices. - DragonBones 3.0 - en_US + The vertices. + The tolerance. + + + + Triangulates a polygon using simple ear-clipping algorithm. Returns + size of Triangle array unless the polygon can't be triangulated. + This should only happen if the polygon self-intersects, + though it will not _always_ return null for a bad polygon - it is the + caller's responsibility to check for self-intersection, and if it + doesn't, it should at least check that the return value is non-null + before using. You're warned! + + Triangles may be degenerate, especially if you have identical points + in the input to the algorithm. Check this before you use them. + + This is totally unoptimized, so for large polygons it should not be part + of the simulation loop. + + + Only works on simple polygons. + + + - - 转换为逆矩阵。 + Finds and fixes "pinch points," points where two polygon + vertices are at the same point. + + If a pinch point is found, pin is broken up into poutA and poutB + and true is returned; otherwise, returns false. + + Mostly for internal use. + + O(N^2) time, which sucks... - DragonBones 3.0 - zh_CN + The pin. + The pout A. + The pout B. + - + - - Apply a matrix transformation to a specific point. + Fix for obnoxious behavior for the % operator for negative numbers... - - X coordinate. - - Y coordinate. - - The point after the transformation is applied. - - Whether to ignore tx, ty's conversion to point. - DragonBones 3.0 - en_US + The x. + The modulus. + + + - - 将矩阵转换应用于特定点。 + Checks if vertex i is the tip of an ear in polygon defined by xv[] and yv[]. - - 横坐标。 - - 纵坐标。 - - 应用转换之后的点。 - - 是否忽略 tx,ty 对点的转换。 - DragonBones 3.0 - zh_CN - - - + The i. + The xv. + The yv. + Length of the xv. + + Assumes clockwise orientation of polygon. + + + true if the specified i is ear; otherwise, false. + - + - - The Point object represents a location in a two-dimensional coordinate system. + Convex decomposition algorithm created by unknown + + Properties: + - No support for holes + - Very fast + - Only works on simple polygons + - Only works on counter clockwise polygons + + More information: http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml - DragonBones 3.0 - en_US + + - - Point 对象表示二维坐标系统中的某个位置。 + Decompose the polygon into triangles. + + Properties: + - Only works on counter clockwise polygons + - DragonBones 3.0 - zh_CN + The list of points describing the polygon - + - - The horizontal coordinate. + Check if the point P is inside the triangle defined by + the points A, B, C - 0.0 - DragonBones 3.0 - en_US + The A point. + The B point. + The C point. + The point to be tested. + True if the point is inside the triangle + + - - 该点的水平坐标。 + Cut a the contour and add a triangle into V to describe the + location of the cut - 0.0 - DragonBones 3.0 - zh_CN + The list of points defining the polygon + The index of the first point + The index of the second point + The index of the third point + The number of elements in the array. + The array to populate with indicies of triangles. + True if a triangle was found - + - - The vertical coordinate. + Convex decomposition algorithm created by Raimund Seidel + + Properties: + - Decompose the polygon into trapezoids, then triangulate. + - To use the trapezoid data, use ConvexPartitionTrapezoid() + - Generate a lot of garbage due to incapsulation of the Poly2Tri library. + - Running time is O(n log n), n = number of vertices. + - Running time is almost linear for most simple polygons. + - Does not care about winding order. + + For more information, see Raimund Seidel's paper "A simple and fast incremental randomized + algorithm for computing trapezoidal decompositions and for triangulating polygons" + + See also: "Computational Geometry", 3rd edition, by Mark de Berg et al, Chapter 6.2 + "Computational Geometry in C", 2nd edition, by Joseph O'Rourke + + Original code from the Poly2Tri project by Mason Green. + http://code.google.com/p/poly2tri/source/browse?repo=archive#hg/scala/src/org/poly2tri/seidel + + This implementation is from Dec 14, 2010 - 0.0 - DragonBones 3.0 - en_US + + - - 该点的垂直坐标。 + Decompose the polygon into several smaller non-concave polygons. - 0.0 - DragonBones 3.0 - zh_CN + The polygon to decompose. + The sheer to use if you get bad results, try using a higher value. + A list of triangles - + - - Creates a new point. If you pass no parameters to this method, a point is created at (0,0). + Decompose the polygon into several smaller non-concave polygons. - - The horizontal coordinate. - - The vertical coordinate. - DragonBones 3.0 - en_US + The polygon to decompose. + The sheer to use if you get bad results, try using a higher value. + A list of trapezoids + + - - 创建一个 egret.Point 对象.若不传入任何参数,将会创建一个位于(0,0)位置的点。 + Convex decomposition algorithm using ear clipping + + Properties: + - Only works on simple polygons. + - Does not support holes. + - Running time is O(n^2), n = number of vertices. - - 该对象的x属性值,默认为 0.0。 - - 该对象的y属性值,默认为 0.0。 - DragonBones 3.0 - zh_CN - - - - - - - + - - A Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its - width and its height.
- The x, y, width, and height properties of the Rectangle class are independent of each other; changing the value of - one property has no effect on the others. However, the right and bottom properties are integrally related to those - four properties. For example, if you change the value of the right property, the value of the width property changes; - if you change the bottom property, the value of the height property changes. + Convex decomposition algorithm created by Mark Bayazit (http://mnbayazit.com/) + + Properties: + - Tries to decompose using polygons instead of triangles. + - Tends to produce optimal results with low processing time. + - Running time is O(nr), n = number of vertices, r = reflex vertices. + - Does not support holes. +
+
+ + + Convex decomposition algorithm created by unknown + + Properties: + - No support for holes + - Very fast + - Only works on simple polygons + - Only works on counter clockwise polygons - DragonBones 3.0 - en_US + + - - Rectangle 对象是按其位置(由它左上角的点 (x, y) 确定)以及宽度和高度定义的区域。
- Rectangle 类的 x、y、width 和 height 属性相互独立;更改一个属性的值不会影响其他属性。 - 但是,right 和 bottom 属性与这四个属性是整体相关的。例如,如果更改 right 属性的值,则 width - 属性的值将发生变化;如果更改 bottom 属性,则 height 属性的值将发生变化。 + Convex decomposition algorithm created by Raimund Seidel + + Properties: + - Decompose the polygon into trapezoids, then triangulate. + - To use the trapezoid data, use ConvexPartitionTrapezoid() + - Generate a lot of garbage due to incapsulation of the Poly2Tri library. + - Running time is O(n log n), n = number of vertices. + - Running time is almost linear for most simple polygons. + - Does not care about winding order.
- DragonBones 3.0 - zh_CN
- + - - The x coordinate of the top-left corner of the rectangle. + 2D constrained Delaunay triangulation algorithm. + Based on the paper "Sweep-line algorithm for constrained Delaunay triangulation" by V. Domiter and and B. Zalik + + Properties: + - Creates triangles with a large interior angle. + - Supports holes + - Generate a lot of garbage due to incapsulation of the Poly2Tri library. + - Running time is O(n^2), n = number of vertices. + - Does not care about winding order. - 0.0 - DragonBones 3.0 - en_US + + - - 矩形左上角的 x 坐标。 + Collection of helper methods for misc collisions. + Does float tolerance and line collisions with lines and AABBs. - 0.0 - DragonBones 3.0 - zh_CN - + + + Check if the lines a0->a1 and b0->b1 cross. + If they do, intersectionPoint will be filled + with the point of crossing. + + Grazing lines should not return true. + + + + - - The y coordinate of the top-left corner of the rectangle. + This method detects if two line segments (or lines) intersect, + and, if so, the point of intersection. Use the and + parameters to set whether the intersection point + must be on the first and second line segments. Setting these + both to true means you are doing a line-segment to line-segment + intersection. Setting one of them to true means you are doing a + line to line-segment intersection test, and so on. + Note: If two line segments are coincident, then + no intersection is detected (there are actually + infinite intersection points). + Author: Jeremy Bell - 0.0 - DragonBones 3.0 - en_US + The first point of the first line segment. + The second point of the first line segment. + The first point of the second line segment. + The second point of the second line segment. + This is set to the intersection + point if an intersection is detected. + Set this to true to require that the + intersection point be on the first line segment. + Set this to true to require that the + intersection point be on the second line segment. + True if an intersection is detected, false otherwise. + + - - 矩形左上角的 y 坐标。 + This method detects if two line segments (or lines) intersect, + and, if so, the point of intersection. Use the and + parameters to set whether the intersection point + must be on the first and second line segments. Setting these + both to true means you are doing a line-segment to line-segment + intersection. Setting one of them to true means you are doing a + line to line-segment intersection test, and so on. + Note: If two line segments are coincident, then + no intersection is detected (there are actually + infinite intersection points). + Author: Jeremy Bell - 0.0 - DragonBones 3.0 - zh_CN + The first point of the first line segment. + The second point of the first line segment. + The first point of the second line segment. + The second point of the second line segment. + This is set to the intersection + point if an intersection is detected. + Set this to true to require that the + intersection point be on the first line segment. + Set this to true to require that the + intersection point be on the second line segment. + True if an intersection is detected, false otherwise. - + - - The width of the rectangle, in pixels. + This method detects if two line segments intersect, + and, if so, the point of intersection. + Note: If two line segments are coincident, then + no intersection is detected (there are actually + infinite intersection points). - 0.0 - DragonBones 3.0 - en_US + The first point of the first line segment. + The second point of the first line segment. + The first point of the second line segment. + The second point of the second line segment. + This is set to the intersection + point if an intersection is detected. + True if an intersection is detected, false otherwise. + + - - 矩形的宽度(以像素为单位)。 + This method detects if two line segments intersect, + and, if so, the point of intersection. + Note: If two line segments are coincident, then + no intersection is detected (there are actually + infinite intersection points). - 0.0 - DragonBones 3.0 - zh_CN + The first point of the first line segment. + The second point of the first line segment. + The first point of the second line segment. + The second point of the second line segment. + This is set to the intersection + point if an intersection is detected. + True if an intersection is detected, false otherwise. - + - - 矩形的高度(以像素为单位)。 + Get all intersections between a line segment and a list of vertices + representing a polygon. The vertices reuse adjacent points, so for example + edges one and two are between the first and second vertices and between the + second and third vertices. The last edge is between vertex vertices.Count - 1 + and verts0. (ie, vertices from a Geometry or AABB) - 0.0 - DragonBones 3.0 - en_US + The first point of the line segment to test + The second point of the line segment to test. + The vertices, as described above + + - - The height of the rectangle, in pixels. + Get all intersections between a line segment and an AABB. - 0.0 - DragonBones 3.0 - zh_CN + The first point of the line segment to test + The second point of the line segment to test. + The AABB that is used for testing intersection. - - + + Perform the cross product on two vectors. - - + + Multiply a matrix times a vector. - - + + Multiply a matrix times a vector. - + + Multiply two rotations: q * r + + + Transpose multiply two rotations: qT * r + + + Rotate a vector + + + Inverse rotate a vector + + + Get the skew vector such that dot(skew_vec, other) == cross(vec, other) + + - - 2D Transform. + This function is used to ensure that a floating point number is + not a NaN or infinity. - DragonBones 3.0 - en_US + The x. + + true if the specified x is valid; otherwise, false. + + + - - 2D 变换。 + This is a approximate yet fast inverse square-root. - DragonBones 3.0 - zh_CN - - - - - - - - - + The x. + - - + + + Return the angle between two vectors on a plane + The angle is from vector 1 to vector 2, positive anticlockwise + The result is between -pi -> pi + - - + + Perform the dot product on two vectors. - - + + + Returns a positive number if c is to the left of the line going from a to b. + + Positive number if point is left, negative if point is right, + and 0 if points are collinear. - - + + + Returns a positive number if c is to the left of the line going from a to b. + + Positive number if point is left, negative if point is right, + and 0 if points are collinear. - + - - Horizontal translate. + Determines if three vertices are collinear (ie. on a straight line) - DragonBones 3.0 - en_US + First vertex + Second vertex + Third vertex + The tolerance + + + - - 水平位移。 + Checks if a floating point Value is equal to another, + within a certain tolerance. - DragonBones 3.0 - zh_CN + The first floating point Value. + The second floating point Value. + The floating point tolerance. + True if the values are "equal", false otherwise. - + - - Vertical translate. + Checks if a floating point Value is within a specified + range of values (inclusive). - DragonBones 3.0 - en_US + The Value to check. + The minimum Value. + The maximum Value. + True if the Value is within the range specified, + false otherwise. + + - - 垂直位移。 + A 2-by-2 matrix. Stored in column-major order. - DragonBones 3.0 - zh_CN - + - - Skew. (In radians) + Construct this matrix using columns. - DragonBones 3.0 - en_US + The c1. + The c2. + + - - 倾斜。 (以弧度为单位) + Construct this matrix using scalars. - DragonBones 3.0 - zh_CN + The a11. + The a12. + The a21. + The a22. - + - - rotation. (In radians) + Initialize this matrix using columns. - DragonBones 3.0 - en_US + The c1. + The c2. + + - - 旋转。 (以弧度为单位) + Set this to the identity matrix. - DragonBones 3.0 - zh_CN - + - - Horizontal Scaling. + Set this matrix to all zeros. - DragonBones 3.0 - en_US + + - - 水平缩放。 + Solve A * x = b, where b is a column vector. This is more efficient + than computing the inverse in one-shot cases. - DragonBones 3.0 - zh_CN + The b. + - + - - Vertical scaling. + A 3-by-3 matrix. Stored in column-major order. - DragonBones 3.0 - en_US + + - - 垂直缩放。 + Construct this matrix using columns. - DragonBones 3.0 - zh_CN + The c1. + The c2. + The c3. - - + + + Set this matrix to all zeros. + - - + + + Solve A * x = b, where b is a column vector. This is more efficient + than computing the inverse in one-shot cases. + + The b. + - - + + + Solve A * x = b, where b is a column vector. This is more efficient + than computing the inverse in one-shot cases. Solve only the upper + 2-by-2 matrix equation. + + The b. + - - + + Get the inverse of this matrix as a 2-by-2. + Returns the zero matrix if singular. - - + + Get the symmetric inverse of this matrix as a 3-by-3. + Returns the zero matrix if singular. - - + + Get the inverse of this matrix as a 2-by-2. + Returns the zero matrix if singular. - - + + Rotation - - - - The animation config is used to describe all the information needed to play an animation state. - The API is still in the experimental phase and may encounter bugs or stability or compatibility issues when used. - - - - DragonBones 5.0 - en_US - - - 动画配置用来描述播放一个动画状态所需要的全部信息。 - 该 API 仍在实验阶段,使用时可能遭遇 bug 或稳定性或兼容性问题。 - - - - DragonBones 5.0 - zh_CN + + Initialize from an angle in radians - - + + Set using an angle in radians. - - - - Fade out the pattern of other animation states when the animation state is fade in. - This property is typically used to specify the substitution of multiple animation states blend. - - dragonBones.AnimationFadeOutMode.All - DragonBones 5.0 - en_US - - - 淡入动画状态时淡出其他动画状态的模式。 - 该属性通常用来指定多个动画状态混合时的相互替换关系。 - - dragonBones.AnimationFadeOutMode.All - DragonBones 5.0 - zh_CN + + Set to the identity rotation - - + + Get the angle in radians - - + + Get the x-axis - - + + Get the u-axis - - + + Sine and cosine - - + + Sine and cosine - - - - Whether the animation state has control over the display property of the slots. - Sometimes blend a animation state does not want it to control the display properties of the slots, - especially if other animation state are controlling the display properties of the slots. - - true - DragonBones 5.0 - en_US + - - 动画状态是否对插槽的显示对象属性有控制权。 - 有时混合一个动画状态并不希望其控制插槽的显示对象属性, - 尤其是其他动画状态正在控制这些插槽的显示对象属性时。 + A transform contains translation and rotation. It is used to represent + the position and orientation of rigid frames. - true - DragonBones 5.0 - zh_CN - - - - Whether to reset the objects without animation to the armature pose when the animation state is start to play. - This property should usually be set to false when blend multiple animation states. - - true - DragonBones 5.1 - en_US + - - 开始播放动画状态时是否将没有动画的对象重置为骨架初始值。 - 通常在混合多个动画状态时应该将该属性设置为 false。 + Initialize using a position vector and a rotation matrix. - true - DragonBones 5.1 - zh_CN - - - + The position. + The r. - - - - The play times. [0: Loop play, [1~N]: Play N times] - - DragonBones 3.0 - en_US + - - 播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] + Set this to the identity transform. - DragonBones 3.0 - zh_CN - + - - The blend layer. - High layer animation state will get the blend weight first. - When the blend weight is assigned more than 1, the remaining animation states will no longer get the weight assigned. + Set this based on the position and angle. - - DragonBones 5.0 - en_US + The position. + The angle. + + - - 混合图层。 - 图层高的动画状态会优先获取混合权重。 - 当混合权重分配超过 1 时,剩余的动画状态将不再获得权重分配。 + This describes the motion of a body/shape for TOI computation. + Shapes are defined with respect to the body origin, which may + no coincide with the center of mass. However, to support dynamics + we must interpolate the center of mass position. - - DragonBones 5.0 - zh_CN - + - - The start time of play. (In seconds) + World angles - 0.0 - DragonBones 5.0 - en_US + + - - 播放的开始时间。 (以秒为单位) + Fraction of the current time step in the range [0,1] + c0 and a0 are the positions at alpha0. - 0.0 - DragonBones 5.0 - zh_CN - + - - The duration of play. - [-1: Use the default value of the animation data, 0: Stop play, (0~N]: The duration] (In seconds) + Center world positions - -1.0 - DragonBones 5.0 - en_US + + - - 播放的持续时间。 - [-1: 使用动画数据默认值, 0: 动画停止, (0~N]: 持续时间] (以秒为单位) + Local center of mass position - -1.0 - DragonBones 5.0 - zh_CN - + - - The play speed. - The value is an overlay relationship with {@link dragonBones.Animation#timeScale}. - [(-N~0): Reverse play, 0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] + Get the interpolated transform at a specific time. - 1.0 - DragonBones 3.0 - en_US + The transform. + beta is a factor in [0,1], where 0 indicates alpha0. + + - - 播放速度。 - 该值与 {@link dragonBones.Animation#timeScale} 是叠加关系。 - [(-N~0): 倒转播放, 0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] + Advance the sweep forward, yielding a new initial state. - 1.0 - DragonBones 3.0 - zh_CN + new initial time.. - + - - The blend weight. + Normalize the angles. - 1.0 - DragonBones 5.0 - en_US + + - - 混合权重。 + Path: + Very similar to Vertices, but this + class contains vectors describing + control points on a Catmull-Rom + curve. - 1.0 - DragonBones 5.0 - zh_CN - + - - The fade in time. - [-1: Use the default value of the animation data, [0~N]: The fade in time] (In seconds) + All the points that makes up the curve - -1.0 - DragonBones 5.0 - en_US + + - - 淡入时间。 - [-1: 使用动画数据默认值, [0~N]: 淡入时间] (以秒为单位) + Initializes a new instance of the class. - -1.0 - DragonBones 5.0 - zh_CN - + - - The auto fade out time when the animation state play completed. - [-1: Do not fade out automatically, [0~N]: The fade out time] (In seconds) + Initializes a new instance of the class. - -1.0 - DragonBones 5.0 - en_US + The vertices to created the path from. + + - - 动画状态播放完成后的自动淡出时间。 - [-1: 不自动淡出, [0~N]: 淡出时间] (以秒为单位) + Initializes a new instance of the class. - -1.0 - DragonBones 5.0 - zh_CN + The vertices to created the path from. - + - - The name of the animation state. (Can be different from the name of the animation data) + True if the curve is closed. - DragonBones 5.0 - en_US + true if closed; otherwise, false. + + - - 动画状态名称。 (可以不同于动画数据) + Gets the next index of a controlpoint - DragonBones 5.0 - zh_CN + The index. + - + - - The animation data name. + Gets the previous index of a controlpoint - DragonBones 5.0 - en_US + The index. + + + - - 动画数据名称。 + Translates the control points by the specified vector. - DragonBones 5.0 - zh_CN + The vector. - + - - The blend group name of the animation state. - This property is typically used to specify the substitution of multiple animation states blend. + Scales the control points by the specified vector. - - DragonBones 5.0 - en_US + The Value. + + - - 混合组名称。 - 该属性通常用来指定多个动画状态混合时的相互替换关系。 + Rotate the control points by the defined value in radians. - - DragonBones 5.0 - zh_CN - - - - - - - - - - - - - - - - - - + The amount to rotate by in radians. - - + + + Returns a set of points defining the + curve with the specifed number of divisions + between each control point. + + Number of divisions between each control point. + - + - - The animation data. + Gets the normal for the given time. - DragonBones 3.0 - en_US + The time + The normal. + + - - 动画数据。 + An easy to use manager for creating paths. - DragonBones 3.0 - zh_CN - + - - FrameIntArray. + Convert a path into a set of edges and attaches them to the specified body. + Note: use only for static edges. - - + The path. + The body. + The subdivisions. - + - - FrameFloatArray. + Convert a closed path into a polygon. + Convex decomposition is automatically performed. - - + The path. + The body. + The density. + The subdivisions. - + - - FrameArray. + Duplicates the given Body along the given path for approximatly the given copies. - - + The world. + The path. + The shapes. + The type. + The copies. + + - + - - The frame count of the animation. + Duplicates the given Body along the given path for approximatly the given copies. - DragonBones 3.0 - en_US + The world. + The path. + The shape. + The type. + The copies. + The user data. + + + - - 动画的帧数。 + Moves the given body along the defined path. - DragonBones 3.0 - zh_CN + The path. + The body. + The time. + The strength. + The time step. - + - - The play times of the animation. [0: Loop play, [1~N]: Play N times] + Attaches the bodies with revolute joints. - DragonBones 3.0 - en_US + The world. + The bodies. + The local anchor A. + The local anchor B. + if set to true [connect first and last]. + if set to true [collide connected]. + + - - 动画的播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] + Contains filter data that can determine whether an object should be processed or not. - DragonBones 3.0 - zh_CN - + - - The duration of the animation. (In seconds) + Disable the logic on specific categories. + Category.None by default. - DragonBones 3.0 - en_US + + - - 动画的持续时间。 (以秒为单位) + Disable the logic on specific groups - DragonBones 3.0 - zh_CN - - - - + - - The fade in time of the animation. (In seconds) + Enable the logic on specific categories + Category.All by default. - DragonBones 3.0 - en_US + + - - 动画的淡入时间。 (以秒为单位) + Enable the logic on specific groups. - DragonBones 3.0 - zh_CN - - - - + - - The animation name. + - DragonBones 3.0 - en_US + + + + - - 动画名称。 + Adds the category. - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + The category. - + - - The armature data. + Removes the category. - DragonBones 3.0 - en_US + The category. + + - - 骨架数据。 + Determines whether this body ignores the the specified controller. - DragonBones 3.0 - zh_CN - - - + The category. + + true if the object has the specified category; otherwise, false. + - + - - The animation frame rate. + Adds the category. - DragonBones 3.0 - en_US + The category. + + - - 动画帧率。 + Removes the category. - DragonBones 3.0 - zh_CN - - - - - - + The category. - + - - The armature name. + Determines whether this body ignores the the specified controller. - DragonBones 3.0 - en_US + The category. + + true if the object has the specified category; otherwise, false. + + + - - 骨架名称。 + Ignores the controller. The controller has no effect on this body. - DragonBones 3.0 - zh_CN - - - + The logic type. - + - - The names of all the animation data. + Restore the controller. The controller affects this body. - DragonBones 3.0 - en_US + The logic type. + + - - 所有的动画数据名称。 + Determines whether this body ignores the the specified controller. - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - + The logic type. + + true if the body has the specified flag; otherwise, false. + - + - - The default skin data. + This is a comprarer used for + detecting angle difference between rays - DragonBones 4.5 - en_US + + - - 默认插槽数据。 + Creates a realistic explosion based on raycasting. Objects in the open will be affected, but objects behind + static bodies will not. A body that is half in cover, half in the open will get half the force applied to the end in + the open. - DragonBones 4.5 - zh_CN - + - - The default animation data. + Two degrees: maximum angle from edges to first ray tested - DragonBones 4.5 - en_US + + - - 默认动画数据。 + Ratio of arc length to angle from edges to first ray tested. + Defaults to 1/40. - DragonBones 4.5 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Ignore Explosion if it happens inside a shape. + Default value is false. + - - - + + + Max angle between rays (used when segment is large). + Defaults to 15 degrees + - - - + + + Maximum number of shapes involved in the explosion. + Defaults to 100 + - - - + + + How many rays per shape/body/segment. + Defaults to 5 + - - - + + + Activate the explosion at the specified position. + + The position where the explosion happens + The explosion radius + The explosion force at the explosion point (then is inversely proportional to the square of the distance) + A list of bodies and the amount of force that was applied to them. - - - + + + Creates a simple explosion that ignores other bodies hiding behind static bodies. + - - - + + + This is the power used in the power function. A value of 1 means the force + applied to bodies in the explosion is linear. A value of 2 means it is exponential. + - + - - Get a specific done data. + Activate the explosion at the specified position. - - The bone name. - DragonBones 3.0 - en_US + The position (center) of the explosion. + The radius of the explosion. + The force applied + A maximum amount of force. When force gets over this value, it will be equal to maxForce + A list of bodies and the amount of force that was applied to them. + + - - 获取特定的骨骼数据。 + Split a fixture into 2 vertice collections using the given entry and exit-point. - - 骨骼名称。 - DragonBones 3.0 - zh_CN + The Fixture to split + The entry point - The start point + The exit point - The end point + The first collection of vertexes + The second collection of vertexes - + - - Get a specific slot data. + This is a high-level function to cuts fixtures inside the given world, using the start and end points. + Note: We don't support cutting when the start or end is inside a shape. - - The slot name. - DragonBones 3.0 - en_US + The world. + The startpoint. + The endpoint. + True if the cut was performed. + + - - 获取特定的插槽数据。 + Combines a list of triangles into a list of convex polygons. + Starts with a seed triangle, keep adding triangles to it until you can't add any more without making the polygon non-convex. - - 插槽名称。 - DragonBones 3.0 - zh_CN - - + + + Combine a list of triangles into a list of convex polygons. + + Note: This only works on triangles. + + The triangles. + The maximun number of polygons to return. + The tolerance - + - - Get a specific skin data. + Provides a set of tools to simplify polygons in various ways. - - The skin name. - DragonBones 3.0 - en_US + + - - 获取特定皮肤数据。 + Removes all collinear points on the polygon. - - 皮肤名称。 - DragonBones 3.0 - zh_CN - - - + The polygon that needs simplification. + The collinearity tolerance. + A simplified polygon. - + - - Get a specific animation data. + Ramer-Douglas-Peucker polygon simplification algorithm. This is the general recursive version that does not use the + speed-up technique by using the Melkman convex hull. + + If you pass in 0, it will remove all collinear points. - - The animation animationName. - DragonBones 3.0 - en_US + The simplified polygon + + - - 获取特定的动画数据。 + Merges all parallel edges in the list of vertices - - 动画名称。 - DragonBones 3.0 - zh_CN + The vertices. + The tolerance. - + - - The bone data. + Merges the identical points in the polygon. - DragonBones 3.0 - en_US + The vertices. + + - - 骨骼数据。 + Reduces the polygon by distance. - DragonBones 3.0 - zh_CN - - - + The vertices. + The distance between points. Points closer than this will be removed. - - + + + Reduces the polygon by removing the Nth vertex in the vertices list. + + The vertices. + The Nth point to remove. Example: 5. + - - + + + Simplify the polygon by removing all points that in pairs of 3 have an area less than the tolerance. + + Pass in 0 as tolerance, and it will only remove collinear points. + + + + - - + + + Implements "A new algorithm for Boolean operations on general polygons" + available here: http://liama.ia.ac.cn/wiki/_media/user:dong:dong_cg_05.pdf + Merges two polygons, a subject and a clip with the specified operation. Polygons may not be + self-intersecting. + + Warning: May yield incorrect results or even crash if polygons contain collinear points. + + The subject polygon. + The clip polygon, which is added, + substracted or intersected with the subject + The operation to be performed. Either + Union, Difference or Intersection. + The error generated (if any) + A list of closed polygons, which make up the result of the clipping operation. + Outer contours are ordered counter clockwise, holes are ordered clockwise. - + - - The bone length. + Calculates all intersections between two polygons. - DragonBones 3.0 - en_US + The first polygon. + The second polygon. + Returns the first polygon with added intersection points. + Returns the second polygon with added intersection points. + + - - 骨骼长度。 + Calculates the simplical chain corresponding to the input polygon. - DragonBones 3.0 - zh_CN + Used by method Execute(). - + - - The bone name. + Calculates the characteristics function for all edges of + the given simplical chains and builds the result chain. - DragonBones 3.0 - en_US + Used by method Execute(). + + - - 骨骼名称。 + Calculates the polygon(s) from the result simplical chain. - DragonBones 3.0 - zh_CN - - - - - - + Used by method Execute(). - + - - The parent bone data. + Needed to calculate the characteristics function of a simplex. - DragonBones 3.0 - en_US + Used by method CalculateEdgeCharacter(). + + - - 父骨骼数据。 + Needed for sorting multiple intersections points on the same edge. - DragonBones 3.0 - zh_CN - - - - - - - - - - + Used by method CalculateIntersections(). - + - - The slot data. + Returns the coefficient of a simplex. - DragonBones 3.0 - en_US + Used by method CalculateSimplicalChain(). + + - - 插槽数据。 + Winding number test for a point in a simplex. - DragonBones 3.0 - zh_CN - - - - - - - - - - - + The point to be tested. + The edge that the point is tested against. + False if the winding number is even and the point is outside + the simplex and True otherwise. - - + + + Tests if a point lies on a line segment. + + Used by method CalculateBeta(). - - + + Specifies an Edge. Edges are used to represent simplicies in simplical chains - + - - The slot name. + Build vertices to represent an axis-aligned box. - DragonBones 3.0 - en_US + the half-width. + the half-height. + + - - 插槽名称。 + Build vertices to represent an oriented box. - DragonBones 3.0 - zh_CN - - - - - - + the half-width. + the half-height. + the center of the box in local coordinates. + the rotation of the box in local coordinates. - + - - The parent bone data. + Creates a rounded rectangle with the specified width and height. - DragonBones 3.0 - en_US + The width. + The height. + The rounding X radius. + The rounding Y radius. + The number of segments to subdivide the edges. + + + - - 父骨骼数据。 + Set this as a single edge. - DragonBones 3.0 - zh_CN - - - + The first point. + The second point. - + - - The base class of bounding box data. + Creates a circle with the specified radius and number of edges. - - - - DragonBones 5.0 - en_US + The radius. + The number of edges. The more edges, the more it resembles a circle + + + - - 边界框数据基类。 + Creates a ellipse with the specified width, height and number of edges. - - - - DragonBones 5.0 - zh_CN + Width of the ellipse. + Height of the ellipse. + The number of edges. The more edges, the more it resembles an ellipse + - + - - The bounding box type. + Creates an capsule with the specified height, radius and number of edges. + A capsule has the same form as a pill capsule. - DragonBones 5.0 - en_US + Height (inner height + 2 * radius) of the capsule. + Radius of the capsule ends. + The number of edges of the capsule ends. The more edges, the more it resembles an capsule + + + - - 边界框类型。 + Creates an capsule with the specified height, radius and number of edges. + A capsule has the same form as a pill capsule. - DragonBones 5.0 - zh_CN - - - - - - - - - - - - + Height (inner height + radii) of the capsule. + Radius of the top. + The number of edges of the top. The more edges, the more it resembles an capsule + Radius of bottom. + The number of edges of the bottom. The more edges, the more it resembles an capsule + - + - - Check whether the bounding box contains a specific point. (Local coordinate system) + Creates a gear shape with the specified radius and number of teeth. - DragonBones 5.0 - en_US + The radius. + The number of teeth. + The tip percentage. + Height of the tooth. + + + - - 检查边界框是否包含特定点。(本地坐标系) + Detects the vertices by analyzing the texture data. - DragonBones 5.0 - zh_CN + The texture data. + The texture width. + - + - - Check whether the bounding box intersects a specific segment. (Local coordinate system) + Detects the vertices by analyzing the texture data. - DragonBones 5.0 - en_US + The texture data. + The texture width. + if set to true it will perform hole detection. + + + - - 检查边界框是否与特定线段相交。(本地坐标系) + Detects the vertices by analyzing the texture data. - DragonBones 5.0 - zh_CN + The texture data. + The texture width. + The hull tolerance. + The alpha tolerance. + if set to true it will perform multi part detection. + if set to true it will perform hole detection. + - + - - Cohen–Sutherland algorithm https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm - ---------------------- - | 0101 | 0100 | 0110 | - ---------------------- - | 0001 | 0000 | 0010 | - ---------------------- - | 1001 | 1000 | 1010 | - ---------------------- + Serialize the world into an XML file - + - - The rectangle bounding box data. + An emulation for the Stopwatch class for Windows Phone and Silverlight. - DragonBones 5.1 - en_US + + - - 矩形边界框数据。 + Creates a new instance of the class and starts the watch immediately. - DragonBones 5.1 - zh_CN + An instance of Stopwatch, running. - + - - Compute the bit code for a point (x, y) using the clip rectangle + Creates an instance of the Stopwatch class. - - - - - - - - - - - - - - + - - The ellipse bounding box data. + Completely resets and deactivates the timer. - DragonBones 5.1 - en_US + + - - 椭圆边界框数据。 + Begins the timer. - DragonBones 5.1 - zh_CN - - - - - - - - - - - - - - + - - The polygon bounding box data. + Stops the current timer. - DragonBones 5.1 - en_US + + - - 多边形边界框数据。 + Gets a value indicating whether the instance is currently recording. - DragonBones 5.1 - zh_CN - - - - - - - - - - + - - The polygon vertices. + Gets the Elapsed time as a Timespan. - DragonBones 5.1 - en_US + + - - 多边形顶点。 + Gets the Elapsed time as the total number of milliseconds. - DragonBones 5.1 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Gets the Elapsed time as the total number of ticks (which is faked + as Silverlight doesn't have a way to get at the actual "Ticks") + - - - + + + Marching squares over the given domain using the mesh defined via the dimensions + (wid,hei) to build a set of polygons such that f(x,y) less than 0, using the given number + 'bin' for recursive linear inteprolation along cell boundaries. + + if 'comb' is true, then the polygons will also be composited into larger possible concave + polygons. + + + + + + + + - - - + + Linearly interpolate between (x0 to x1) given a value at these coordinates (v0 and v1) + such as to approximate value(return) = 0 + * - - + + Recursive linear interpolation for use in marching squares * - - - + + Recursive linear interpolation for use in marching squares * - - - + + Square value for use in marching squares * - - - + + Look-up table to relate polygon key with the vertices that should be used for + the sub polygon in marching squares + * + Perform a single celled marching square for for the given cell defined by (x0,y0) (x1,y1) + using the function f for recursive interpolation, given the look-up table 'fs' of + the values of 'f' at cell vertices with the result to be stored in 'poly' given the actual + coordinates of 'ax' 'ay' in the marching squares mesh. + * - - - + + Used in polygon composition to composit polygons into scan lines + Combining polya and polyb into one super-polygon stored in polya. + * - - - - The DragonBones data. - A DragonBones data contains multiple armature data. - - - DragonBones 3.0 - en_US + - - 龙骨数据。 - 一个龙骨数据包含多个骨架数据。 + Designed as a complete port of CxFastList from CxStd. - - DragonBones 3.0 - zh_CN - - - - - - - The animation frame rate. - - DragonBones 3.0 - en_US + - - 动画帧频。 + Iterator to start of list (O(1)) - DragonBones 3.0 - zh_CN - - - - The data version. - - DragonBones 3.0 - en_US + - - 数据版本。 + Iterator to end of list (O(1)) - DragonBones 3.0 - zh_CN - - - - The DragonBones data name. - The name is consistent with the DragonBones project name. - - DragonBones 3.0 - en_US + - - 龙骨数据名称。 - 该名称与龙骨项目名保持一致。 + Returns first element of list (O(1)) - DragonBones 3.0 - zh_CN - - - - - - - - - - - - + - - All armature data names. + add object to list (O(1)) - DragonBones 3.0 - en_US + + - - 所有的骨架数据名称。 + remove object from list, returns true if an element was removed (O(n)) - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - + + + pop element from head of list (O(1)) Note: this does not return the object popped! + There is good reason to this, and it regards the Alloc list variants which guarantee + objects are released to the object pool. You do not want to retrieve an element + through pop or else that object may suddenly be used by another piece of code which + retrieves it from the object pool. + - - - + + + insert object after 'node' returning an iterator to the inserted object. + - - - + + + removes the element pointed to by 'node' with 'prev' being the previous iterator, + returning an iterator to the element following that of 'node' (O(1)) + - - - + + + whether the list is empty (O(1)) + - - - + + + computes size of list (O(n)) + - - + + + empty the list (O(1) if CxMixList, O(n) otherwise) + - - + + + returns true if 'value' is an element of the list (O(n)) + - - - + + Associated polygon at coordinate * + Key of original sub-polygon * - + - - Get a specific armature data. + Simple class to maintain a terrain. It can keep track - - The armature data name. - DragonBones 3.0 - en_US + + - - 获取特定的骨架数据。 + World to manage terrain in. - - 骨架数据名称。 - DragonBones 3.0 - zh_CN - + - - The skin data, typically a armature data instance contains at least one skinData. + Center of terrain in world units. - DragonBones 3.0 - en_US + + - - 皮肤数据,通常一个骨架数据至少包含一个皮肤数据。 + Width of terrain in world units. - DragonBones 3.0 - zh_CN - + - - The skin name. + Height of terrain in world units. - DragonBones 3.0 - en_US + + - - 皮肤名称。 + Points per each world unit used to define the terrain in the point cloud. - DragonBones 3.0 - zh_CN - - - - - - - - - - - - + + + Points per cell. + - - + + + Points per sub cell. + - - + + + Number of iterations to perform in the Marching Squares algorithm. + Note: More then 3 has almost no effect on quality. + - + - - The texture atlas data. + Decomposer to use when regenerating terrain. Can be changed on the fly without consequence. + Note: Some decomposerers are unstable. - DragonBones 3.0 - en_US + + - - 贴图集数据。 + Point cloud defining the terrain. - DragonBones 3.0 - zh_CN - - + + + Generated bodies. + - - + + + Creates a new terrain. + + The World + The area of the terrain. - - + + + Creates a new terrain + + The World + The position (center) of the terrain. + The width of the terrain. + The height of the terrain. - - + + + Initialize the terrain for use. + - + - - The texture atlas name. + Apply the specified texture data to the terrain. - DragonBones 3.0 - en_US + + + + - - 贴图集名称。 + Modify a single point in the terrain. - DragonBones 3.0 - zh_CN + World location to modify. Automatically clipped. + -1 = inside terrain, 1 = outside terrain - + - - The image path of the texture atlas. + Regenerate the terrain. - DragonBones 3.0 - en_US + + - - 贴图集图片路径。 + The detection type affects the resulting polygon data. - DragonBones 3.0 - zh_CN - - + + + Holes are integrated into the main polygon. + - - + + + The data of the main polygon and hole polygons is returned separately. + - - + + + This array is ment to be readonly. + It's not because it is accessed very frequently. + - - - + + + Get or set the polygon detection type. + - - - + + + Will detect texture 'holes' if set to true. Slows down the detection. Default is false. + - - + + + Will detect texture multiple 'solid' isles if set to true. Slows down the detection. Default is false. + - - - + + + Will optimize the vertex positions along the interpolated normal between two edges about a half pixel (post processing). Default is false. + - + - - The user custom data. + Can be used for scaling. - DragonBones 5.0 - en_US + + - - 用户自定义数据。 + Alpha (coverage) tolerance. Default is 20: Every pixel with a coverage value equal or greater to 20 will be counts as solid. - DragonBones 5.0 - zh_CN - + - - The custom int numbers. + Default is 1.5f. - DragonBones 5.0 - en_US + + - - 自定义整数。 + Detects the vertices of the supplied texture data. (PolygonDetectionType.Integrated) - DragonBones 5.0 - zh_CN + The texture data. + The texture width. + - + - - The custom float numbers. + Detects the vertices of the supplied texture data. - DragonBones 5.0 - en_US + The texture data. + The texture width. + if set to true it will perform hole detection. + + + - - 自定义浮点数。 + Detects the vertices of the supplied texture data. - DragonBones 5.0 - zh_CN + The texture data. + The texture width. + if set to true it will perform hole detection. + The hull tolerance. + The alpha tolerance. + if set to true it will perform multi part detection. + - + - - The custom strings. + Function to search for an entrance point of a hole in a polygon. It searches the polygon from top to bottom between the polygon edges. - DragonBones 5.0 - en_US + The polygon to search in. + The last entrance point. + The next holes entrance point. Null if ther are no holes. + + - - 自定义字符串。 + Searches the polygon for the x coordinates of the edges that cross the specified y coordinate. - DragonBones 5.0 - zh_CN + Polygon to search in. + Y coordinate to check for edges. + Descending sorted list of x coordinates of edges that cross the specified y coordinate. - - + + + + + + + - - - + + + Searches for the next shape. + + Already detected polygons. + Search start coordinate. + Returns the found entrance coordinate. Null if no other shapes found. + True if a new shape was found. - - - + + + There were no errors in the polygon + - - - + + + Polygon must have between 3 and Settings.MaxPolygonVertices vertices. + - + - - Get the custom int number. + Polygon must be simple. This means no overlapping edges. - DragonBones 5.0 - en_US + + - - 获取自定义整数。 + Polygon must have a counter clockwise winding. - DragonBones 5.0 - zh_CN - + - - Get the custom float number. + The polygon is concave, it needs to be convex. - DragonBones 5.0 - en_US + + - - 获取自定义浮点数。 + Polygon area is too small. - DragonBones 5.0 - zh_CN - + - - Get the custom string. + The polygon has a side that is too short. - DragonBones 5.0 - en_US + + - - 获取自定义字符串。 + You can add holes to this collection. + It will get respected by some of the triangulation algoithms, but otherwise not used. - DragonBones 5.0 - zh_CN - - - + + + Gets the next index. Used for iterating all the edges with wrap-around. + + The current index - - - + + + Gets the next vertex. Used for iterating all the edges with wrap-around. + + The current index - - - + + + Gets the previous index. Used for iterating all the edges with wrap-around. + + The current index - - - + + + Gets the previous vertex. Used for iterating all the edges with wrap-around. + + The current index - - - + + + Gets the signed area. + If the area is less than 0, it indicates that the polygon is clockwise winded. + + The signed area - - - This class encodes and decodes JSON strings. - Spec. details, see http://www.json.org/ - - JSON uses Arrays and Objects. These correspond here to the datatypes IList and IDictionary. - All numbers are parsed to doubles. - + + + Gets the area. + + - + - Parses the string json into a value + Gets the centroid. - A JSON string. - An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false + - + - Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string + Returns an AABB that fully contains this polygon. - A Dictionary<string, object> / List<object> - A JSON encoded string, or null if object 'json' is not serializable - + - The features that intersect to form the contact point - This must be 4 bytes or less. + Translates the vertices with the specified vector. + The value. - + - Feature index on ShapeA + Translates the vertices with the specified vector. + The vector. - + - Feature index on ShapeB + Scales the vertices with the specified vector. + The Value. - + - The feature type on ShapeA + Scales the vertices with the specified vector. + The Value. - + - The feature type on ShapeB + Rotate the vertices with the defined value in radians. + + Warning: Using this method on an active set of vertices of a Body, + will cause problems with collisions. Use Body.Rotation instead. + The amount to rotate by in radians. - + - Contact ids to facilitate warm starting. + Determines whether the polygon is convex. + O(n^2) running time. + + Assumptions: + - The polygon is in counter clockwise order + - The polygon has no overlapping edges + + true if it is convex; otherwise, false. + - + - The features that intersect to form the contact point + Indicates if the vertices are in counter clockwise order. + Warning: If the area of the polygon is 0, it is unable to determine the winding. - + - Used to quickly compare contact ids. + Forces the vertices to be counter clock wise order. - + - A manifold point is a contact point belonging to a contact - manifold. It holds details related to the geometry and dynamics - of the contact points. - The local point usage depends on the manifold type: - -ShapeType.Circles: the local center of circleB - -SeparationFunction.FaceA: the local center of cirlceB or the clip point of polygonB - -SeparationFunction.FaceB: the clip point of polygonA - This structure is stored across time steps, so we keep it small. - Note: the impulses are used for internal caching and may not - provide reliable contact forces, especially for high speed collisions. + Checks if the vertices forms an simple polygon by checking for edge crossings. - + + + Checks if the polygon is valid for use in the engine. + + Performs a full check, for simplicity, convexity, + orientation, minimum angle, and volume. + + From Eric Jordan's convex decomposition library + + PolygonError.NoError if there were no error. + + - Uniquely identifies a contact point between two Shapes + Projects to axis. + The axis. + The min. + The max. - + - Usage depends on manifold type + Winding number test for a point in a polygon. + See more info about the algorithm here: http://softsurfer.com/Archive/algorithm_0103/algorithm_0103.htm + The point to be tested. + -1 if the winding number is zero and the point is outside + the polygon, 1 if the point is inside the polygon, and 0 if the point + is on the polygons edge. - + - The non-penetration impulse + Compute the sum of the angles made between the test point and each pair of points making up the polygon. + If this sum is 2pi then the point is an interior point, if 0 then the point is an exterior point. + ref: http://ozviz.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/ - Solution 2 - + - The friction impulse + Transforms the polygon using the defined matrix. + The matrix to use as transformation. - + - A manifold for two touching convex Shapes. - Box2D supports multiple types of contact: - - Clip point versus plane with radius - - Point versus point with radius (circles) - The local point usage depends on the manifold type: - - ShapeType.Circles: the local center of circleA - - SeparationFunction.FaceA: the center of faceA - - SeparationFunction.FaceB: the center of faceB - Similarly the local normal usage: - - ShapeType.Circles: not used - - SeparationFunction.FaceA: the normal on polygonA - - SeparationFunction.FaceB: the normal on polygonB - We store contacts in this way so that position correction can - account for movement, which is critical for continuous physics. - All contact scenarios must be expressed in one of these types. - This structure is stored across time steps, so we keep it small. + Modes for Decay. Actual Decay must be implemented in inheriting + classes - + - Not use for Type.SeparationFunction.Points + Forcetypes are used in the decay math to properly get the distance. + They are also used to draw a representation in DebugView - + - Usage depends on manifold type + Timing Modes + Switched: Standard on/off mode using the baseclass enabled property + Triggered: When the Trigger() method is called the force is active + for a specified Impulse Length + Curve: Still to be defined. The basic idea is having a Trigger + combined with a curve for the strength - + - The number of manifold points + Curve to be used for Decay in Curve mode - + - The points of contact + The Forcetype of the instance - + - This is used for determining the state of contact points. + Provided for reuse to provide Variation functionality in + inheriting classes - + - Point does not exist + Curve used by Curve Mode as an animated multiplier for the force + strength. + Only positions between 0 and 1 are considered as that range is + stretched to have ImpulseLength. - + - Point was added in the update + Constructor - + - Point persisted across the update + Overloaded Contstructor with supplying Timing Mode + - + - Point was removed in the update + Global Strength of the force to be applied - + - Used for computing contact manifolds. + Position of the Force. Can be ignored (left at (0,0) for forces + that are not position-dependent - + - Ray-cast input data. + Maximum speed of the bodies. Bodies that are travelling faster are + supposed to be ignored - + - The ray extends from p1 to p1 + maxFraction * (p2 - p1). - If you supply a max fraction of 1, the ray extends from p1 to p2. - A max fraction of 0.5 makes the ray go from p1 and half way to p2. + Maximum Force to be applied. As opposed to Maximum Speed this is + independent of the velocity of + the affected body - + - The starting point of the ray. + Timing Mode of the force instance - + - The ending point of the ray. + Time of the current impulse. Incremented in update till + ImpulseLength is reached - + - Ray-cast output data. + Length of a triggered impulse. Used in both Triggered and Curve Mode - + - The ray hits at p1 + fraction * (p2 - p1), where p1 and p2 come from RayCastInput. - Contains the actual fraction of the ray where it has the intersection point. + Indicating if we are currently during an Impulse + (Triggered and Curve Mode) - + - The normal of the face of the shape the ray has hit. + Variation of the force applied to each body affected + !! Must be used in inheriting classes properly !! - + - An axis aligned bounding box. + See DecayModes - + - The lower vertex + Start of the distance based Decay. To set a non decaying area - + - The upper vertex + Maximum distance a force should be applied - + - Get the center of the AABB. + Calculate the Decay for a given body. Meant to ease force + development and stick to the DRY principle and provide unified and + predictable decay math. + The body to calculate decay for + A multiplier to multiply the force with to add decay + support in inheriting classes - + - Get the extents of the AABB (half-widths). + Triggers the trigger modes (Trigger and Curve) - + - Get the perimeter length + Inherited from Controller + Depending on the TimingMode perform timing logic and call ApplyForce() + - + - Gets the vertices of the AABB. + Apply the force supplying strength (wich is modified in Update() + according to the TimingMode - The corners of the AABB + + The strength - + - First quadrant + Controls the rotational drag that the fluid exerts on the bodies within it. Use higher values will simulate thick fluid, like honey, lower values to + simulate water-like fluids. - + - Second quadrant + Density of the fluid. Higher values will make things more buoyant, lower values will cause things to sink. - + - Third quadrant + Controls the linear drag that the fluid exerts on the bodies within it. Use higher values will simulate thick fluid, like honey, lower values to + simulate water-like fluids. - + - Forth quadrant + Acts like waterflow. Defaults to 0,0. - + - Verify that the bounds are sorted. And the bounds are valid numbers (not NaN). + Initializes a new instance of the class. - - true if this instance is valid; otherwise, false. - + Only bodies inside this AABB will be influenced by the controller + Density of the fluid + Linear drag coefficient of the fluid + Rotational drag coefficient of the fluid + The direction gravity acts. Buoyancy force will act in opposite direction of gravity. - + - Combine an AABB into this one. + Ignores the controller. The controller has no effect on this body. - The aabb. + The controller type. - + - Combine two AABBs into this one. + Restore the controller. The controller affects this body. - The aabb1. - The aabb2. + The controller type. - + - Does this aabb contain the provided AABB. + Determines whether this body ignores the the specified controller. - The aabb. + The controller type. - true if it contains the specified aabb; otherwise, false. + true if the body has the specified flag; otherwise, false. - + - Determines whether the AAABB contains the specified point. + Reference implementation for forces based on AbstractForceController + It supports all features provided by the base class and illustrates proper + usage as an easy to understand example. + As a side-effect it is a nice and easy to use wind force for your projects - The point. - - true if it contains the specified point; otherwise, false. - - + - Test if the two AABBs overlap. + Direction of the windforce - The first AABB. - The second AABB. - True if they are overlapping. - + - Raycast against this AABB using the specificed points and maxfraction (found in input) + The amount of Direction randomization. Allowed range is 0-1. - The results of the raycast. - The parameters for the raycast. - True if the ray intersects the AABB - + - This holds polygon B expressed in frame A. + Ignore the position and apply the force. If off only in the "front" (relative to position and direction) + will be affected - + - This structure is used to keep track of the best separating axis. + Put a limit on the linear (translation - the movespeed) and angular (rotation) velocity + of bodies added to this controller. - + - Reference face used for clipping + Initializes a new instance of the class. + Sets the max linear velocity to Settings.MaxTranslation + Sets the max angular velocity to Settings.MaxRotation - + - Collision methods + Initializes a new instance of the class. + Pass in 0 or float.MaxValue to disable the limit. + maxAngularVelocity = 0 will disable the angular velocity limit. + The max linear velocity. + The max angular velocity. - + - Test overlap between the two shapes. + Gets or sets the max angular velocity. - The first shape. - The index for the first shape. - The second shape. - The index for the second shape. - The transform for the first shape. - The transform for the seconds shape. - + The max angular velocity. - + - Compute the collision manifold between two circles. + Gets or sets the max linear velocity. + The max linear velocity. - + - Compute the collision manifold between a polygon and a circle. + Convert units between display and simulation units. - The manifold. - The polygon A. - The transform of A. - The circle B. - The transform of B. - + - Compute the collision manifold between two polygons. + Draw shapes. - The manifold. - The poly A. - The transform A. - The poly B. - The transform B. - + - Compute contact points for edge versus circle. - This accounts for edge connectivity. + Draw joint connections. - The manifold. - The edge A. - The transform A. - The circle B. - The transform B. - + - Collides and edge and a polygon, taking into account edge adjacency. + Draw axis aligned bounding boxes. - The manifold. - The edge A. - The xf A. - The polygon B. - The xf B. - + - Clipping for contact manifolds. + Draw center of mass frame. - The v out. - The v in. - The normal. - The offset. - The vertex index A. - - + - Find the separation between poly1 and poly2 for a give edge normal on poly1. + Draw useful debug data such as timings and number of bodies, joints, contacts and more. - The poly1. - The XF1. - The edge1. - The poly2. - The XF2. - - + - Find the max separation between poly1 and poly2 using edge normals from poly1. + Draw contact points between colliding bodies. - Index of the edge. - The poly1. - The XF1. - The poly2. - The XF2. - - + - A distance proxy is used by the GJK algorithm. - It encapsulates any shape. + Draw contact normals. Need ContactPoints to be enabled first. - + - Initialize the proxy using the given shape. The shape - must remain in scope while the proxy is in use. + Draws the vertices of polygons. - The shape. - The index. - + - Get the supporting vertex index in the given direction. + Draws the performance graph. - The direction. - - + - Get the supporting vertex in the given direction. + Draws controllers. - The direction. - - + + Implement and register this class with a World to provide debug drawing of physics + entities in your game. + + - Used to warm start ComputeDistance. - Set count to zero on first call. + Gets or sets the debug view flags. + The flags. - + - Length or area + Append flags to the current flags. + The flags. - + - Vertices on shape A + Remove flags from the current flags. + The flags. - + - Vertices on shape B + Draw a closed polygon provided in CCW order. + The vertices. + The vertex count. + The red value. + The blue value. + The green value. - + - Input for Distance.ComputeDistance(). - You have to option to use the shape radii in the computation. + Draw a solid closed polygon provided in CCW order. + The vertices. + The vertex count. + The red value. + The blue value. + The green value. - + - Output for Distance.ComputeDistance(). + Draw a circle. + The center. + The radius. + The red value. + The blue value. + The green value. - + - Number of GJK iterations used + Draw a solid circle. + The center. + The radius. + The axis. + The red value. + The blue value. + The green value. - + - Closest point on shapeA + Draw a line segment. + The start. + The end. + The red value. + The blue value. + The green value. - + - Closest point on shapeB + Draw a transform. Choose your own length scale. + The transform. - + - Barycentric coordinate for closest point + The body type. - + - wA index + Zero velocity, may be manually moved. Note: even static bodies have mass. - + - wB index + Zero mass, non-zero velocity set by user, moved by solver - + - wB - wA + Positive mass, non-zero velocity determined by forces, moved by solver - + + Scale the gravity applied to this body. + + - Support point in proxyA + Set the user data. Use this to store your application specific data. + The user data. - + - Support point in proxyB + Gets the total number revolutions the body has made. + The revolutions. - + - The Gilbert–Johnson–Keerthi distance algorithm that provides the distance between shapes. + Gets or sets the body type. + Warning: Calling this mid-update might cause a crash. + The type of body. - + - The number of calls made to the ComputeDistance() function. - Note: This is only activated when Settings.EnableDiagnostics = true + Get or sets the linear velocity of the center of mass. + The linear velocity. - + - The number of iterations that was made on the last call to ComputeDistance(). - Note: This is only activated when Settings.EnableDiagnostics = true + Gets or sets the angular velocity. Radians/second. + The angular velocity. - + - The maximum numer of iterations ever mae with calls to the CompteDistance() funtion. - Note: This is only activated when Settings.EnableDiagnostics = true + Gets or sets the linear damping. + The linear damping. - + - A node in the dynamic tree. The Client does not interact with this directly. + Gets or sets the angular damping. + The angular damping. - + - Enlarged AABB + Gets or sets a value indicating whether this body should be included in the CCD solver. + true if this instance is included in CCD; otherwise, false. - - - A dynamic tree arranges data in a binary tree to accelerate - queries such as volume queries and ray casts. Leafs are proxies - with an AABB. In the tree we expand the proxy AABB by Settings.b2_fatAABBFactor - so that the proxy AABB is bigger than the Client object. This allows the Client - object to move by small amounts without triggering a tree update. - - Nodes are pooled and relocatable, so we use node indices rather than pointers. - - - + - Constructing the tree initializes the node pool. + You can disable sleeping on this body. If you disable sleeping, the + body will be woken. + true if sleeping is allowed; otherwise, false. - + - Compute the height of the binary tree in O(N) time. Should not be called often. + Set the sleep state of the body. A sleeping body has very + low CPU cost. + true if awake; otherwise, false. - + - Get the ratio of the sum of the node areas to the root area. + Set the active state of the body. An inactive body is not + simulated and cannot be collided with or woken up. + If you pass a flag of true, all fixtures will be added to the + broad-phase. + If you pass a flag of false, all fixtures will be removed from + the broad-phase and all contacts will be destroyed. + Fixtures and joints are otherwise unaffected. You may continue + to create/destroy fixtures and joints on inactive bodies. + Fixtures on an inactive body are implicitly inactive and will + not participate in collisions, ray-casts, or queries. + Joints connected to an inactive body are implicitly inactive. + An inactive body is still owned by a b2World object and remains + in the body list. + true if active; otherwise, false. - + - Get the maximum balance of an node in the tree. The balance is the difference - in height of the two children of a node. + Set this body to have fixed rotation. This causes the mass + to be reset. + true if it has fixed rotation; otherwise, false. - + - Create a proxy in the tree as a leaf node. We return the index - of the node instead of a pointer so that we can grow - the node pool. - /// - The aabb. - The user data. - Index of the created proxy + Gets all the fixtures attached to this body. +
+ The fixture list.
- + - Destroy a proxy. This asserts if the id is invalid. + Get the list of all joints attached to this body. - The proxy id. + The joint list. - + - Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, - then the proxy is removed from the tree and re-inserted. Otherwise - the function returns immediately. + Get the list of all contacts attached to this body. + Warning: this list changes during the time step and you may + miss some collisions if you don't use ContactListener. - The proxy id. - The aabb. - The displacement. - true if the proxy was re-inserted. + The contact list. - + - Get proxy user data. + Get the world body origin position. - - The proxy id. - the proxy user data or 0 if the id is invalid. + Return the world position of the body's origin. - + - Get the fat AABB for a proxy. + Get the angle in radians. - The proxy id. - The fat AABB. + Return the current world rotation angle in radians. - + - Query an AABB for overlapping proxies. The callback class - is called for each proxy that overlaps the supplied AABB. + Gets or sets a value indicating whether this body is static. - The callback. - The aabb. + true if this instance is static; otherwise, false. - + - Ray-cast against the proxies in the tree. This relies on the callback - to perform a exact ray-cast in the case were the proxy contains a Shape. - The callback also performs the any collision filtering. This has performance - roughly equal to k * log(n), where k is the number of collisions and n is the - number of proxies in the tree. + Gets or sets a value indicating whether this body is kinematic. - A callback class that is called for each proxy that is hit by the ray. - The ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). + true if this instance is kinematic; otherwise, false. - + - Perform a left or right rotation if node A is imbalanced. + Gets or sets a value indicating whether this body ignores gravity. - - the new root index. + true if it ignores gravity; otherwise, false. - + - Compute the height of a sub-tree. + Get the world position of the center of mass. - The node id to use as parent. - The height of the tree. + The world position. - + - Compute the height of the entire tree. + Get the local position of the center of mass. - The height of the tree. + The local position. - + - Validate this tree. For testing. + Gets or sets the mass. Usually in kilograms (kg). + The mass. - + - Build an optimal tree. Very expensive. For testing. + Get or set the rotational inertia of the body about the local origin. usually in kg-m^2. + The inertia. - + - Shift the origin of the nodes + Body objects can define which categories of bodies they wish to ignore CCD with. + This allows certain bodies to be configured to ignore CCD with objects that + aren't a penetration problem due to the way content has been prepared. + This is compared against the other Body's fixture CollisionCategories within World.SolveTOI(). - The displacement to use. - + - The broad-phase is used for computing pairs and performing volume queries and ray casts. - This broad-phase does not persist pairs. Instead, this reports potentially new pairs. - It is up to the Client to consume the new pairs and to track subsequent overlap. + Resets the dynamics of this body. + Sets torque, force and linear/angular velocity to 0 - + - Constructs a new broad phase based on the dynamic tree implementation + Creates a fixture and attach it to this body. + If the density is non-zero, this function automatically updates the mass of the body. + Contacts are not created until the next time step. + Warning: This function is locked during callbacks. + The shape. + Application specific data + - + - Get the number of proxies. + Destroy a fixture. This removes the fixture from the broad-phase and + destroys all contacts associated with this fixture. This will + automatically adjust the mass of the body if the body is dynamic and the + fixture has positive density. + All fixtures attached to a body are implicitly destroyed when the body is destroyed. + Warning: This function is locked during callbacks. - The proxy count. + The fixture to be removed. - + - Create a proxy with an initial AABB. Pairs are not reported until - UpdatePairs is called. + Set the position of the body's origin and rotation. + This breaks any contacts and wakes the other bodies. + Manipulating a body's transform may cause non-physical behavior. - The user data. - + The world position of the body's local origin. + The world rotation in radians. - + - Destroy a proxy. It is up to the Client to remove any pairs. + Set the position of the body's origin and rotation. + This breaks any contacts and wakes the other bodies. + Manipulating a body's transform may cause non-physical behavior. - The proxy id. + The world position of the body's local origin. + The world rotation in radians. - + - This is called from DynamicTree.Query when we are gathering pairs. + For teleporting a body without considering new contacts immediately. - - + The position. + The angle. - + - Get the AABB for a proxy. + Get the body transform for the body's origin. - The proxy id. - The aabb. + The transform of the body's origin. - + - Get user data from a proxy. Returns null if the id is invalid. + Apply a force at a world point. If the force is not + applied at the center of mass, it will generate a torque and + affect the angular velocity. This wakes up the body. - The proxy id. - + The world force vector, usually in Newtons (N). + The world position of the point of application. - + - Test overlap of fat AABBs. + Applies a force at the center of mass. - The proxy id A. - The proxy id B. - + The force. - + - Update the pairs. This results in pair callbacks. This can only add pairs. + Applies a force at the center of mass. - The callback. + The force. - + - Query an AABB for overlapping proxies. The callback class - is called for each proxy that overlaps the supplied AABB. + Apply a force at a world point. If the force is not + applied at the center of mass, it will generate a torque and + affect the angular velocity. This wakes up the body. - The callback. - The aabb. + The world force vector, usually in Newtons (N). + The world position of the point of application. - + - Ray-cast against the proxies in the tree. This relies on the callback - to perform a exact ray-cast in the case were the proxy contains a shape. - The callback also performs the any collision filtering. This has performance - roughly equal to k * log(n), where k is the number of collisions and n is the - number of proxies in the tree. + Apply a torque. This affects the angular velocity + without affecting the linear velocity of the center of mass. + This wakes up the body. - A callback class that is called for each proxy that is hit by the ray. - The ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). + The torque about the z-axis (out of the screen), usually in N-m. - + - Get the tree quality based on the area of the tree. + Apply an impulse at a point. This immediately modifies the velocity. + This wakes up the body. + The world impulse vector, usually in N-seconds or kg-m/s. - + - Gets the balance of the tree. + Apply an impulse at a point. This immediately modifies the velocity. + It also modifies the angular velocity if the point of application + is not at the center of mass. + This wakes up the body. + The world impulse vector, usually in N-seconds or kg-m/s. + The world position of the point of application. - + - Gets the height of the tree. + Apply an impulse at a point. This immediately modifies the velocity. + This wakes up the body. + The world impulse vector, usually in N-seconds or kg-m/s. - + - A chain shape is a free form sequence of line segments. - The chain has two-sided collision, so you can use inside and outside collision. - Therefore, you may use any winding order. - Connectivity information is used to create smooth collisions. - WARNING: The chain will not collide properly if there are self-intersections. + Apply an impulse at a point. This immediately modifies the velocity. + It also modifies the angular velocity if the point of application + is not at the center of mass. + This wakes up the body. + The world impulse vector, usually in N-seconds or kg-m/s. + The world position of the point of application. - + - The vertices. These are not owned/freed by the chain Shape. + Apply an angular impulse. + The angular impulse in units of kg*m*m/s. - + - Constructor for ChainShape. By default have 0 in density. + This resets the mass properties to the sum of the mass properties of the fixtures. + This normally does not need to be called unless you called SetMassData to override + the mass and you later want to reset the mass. - + - Create a new chainshape from the vertices. + Get the world coordinates of a point given the local coordinates. - The vertices to use. Must contain 2 or more vertices. - Set to true to create a closed loop. It connects the first vertice to the last, and automatically adjusts connectivity to create smooth collisions along the chain. + A point on the body measured relative the the body's origin. + The same point expressed in world coordinates. - + - Establish connectivity to a vertex that precedes the first vertex. - Don't call this for loops. + Get the world coordinates of a point given the local coordinates. + A point on the body measured relative the the body's origin. + The same point expressed in world coordinates. - + - Establish connectivity to a vertex that follows the last vertex. - Don't call this for loops. + Get the world coordinates of a vector given the local coordinates. + Note that the vector only takes the rotation into account, not the position. + A vector fixed in the body. + The same vector expressed in world coordinates. - + - This method has been optimized to reduce garbage. + Get the world coordinates of a vector given the local coordinates. - The cached edge to set properties on. - The index. + A vector fixed in the body. + The same vector expressed in world coordinates. - + - Get a child edge. + Gets a local point relative to the body's origin given a world point. + Note that the vector only takes the rotation into account, not the position. - The index. + A point in world coordinates. + The corresponding local point relative to the body's origin. - + - Compare the chain to another chain + Gets a local point relative to the body's origin given a world point. - The other chain - True if the two chain shapes are the same + A point in world coordinates. + The corresponding local point relative to the body's origin. - + - A circle shape. + Gets a local vector given a world vector. + Note that the vector only takes the rotation into account, not the position. + A vector in world coordinates. + The corresponding local vector. - + - Create a new circle with the desired radius and density. + Gets a local vector given a world vector. + Note that the vector only takes the rotation into account, not the position. - The radius of the circle. - The density of the circle. + A vector in world coordinates. + The corresponding local vector. - + - Get or set the position of the circle + Get the world linear velocity of a world point attached to this body. + A point in world coordinates. + The world velocity of a point. - + - Compare the circle to another circle + Get the world linear velocity of a world point attached to this body. - The other circle - True if the two circles are the same size and have the same position + A point in world coordinates. + The world velocity of a point. - + - A line segment (edge) shape. These can be connected in chains or loops - to other edge shapes. - The connectivity information is used to ensure correct contact normals. + Get the world velocity of a local point. + A point in local coordinates. + The world velocity of a point. - + - Edge start vertex + Get the world velocity of a local point. + A point in local coordinates. + The world velocity of a point. - + - Edge end vertex + This is used to prevent connected bodies from colliding. + It may lie, depending on the collideConnected flag. + The other body. + - + - Create a new EdgeShape with the specified start and end. + Makes a clone of the body. Fixtures and therefore shapes are not included. + Use DeepClone() to clone the body, as well as fixtures and shapes. - The start of the edge. - The end of the edge. + + - + - Is true if the edge is connected to an adjacent vertex before vertex 1. + Clones the body and all attached fixtures and shapes. Simply said, it makes a complete copy of the body. + + - + - Is true if the edge is connected to an adjacent vertex after vertex2. + A type of body that supports multiple fixtures that can break apart. - + - Optional adjacent vertices. These are used for smooth collision. + The force needed to break the body apart. + Default: 500 - + - Optional adjacent vertices. These are used for smooth collision. + Fires when a contact is created - + - These are the edge vertices + The filter used by the contact manager. - + - These are the edge vertices + Fires when a contact is deleted - + - Set this as an isolated edge. + Fires when the broadphase detects that two Fixtures are close to each other. - The start. - The end. - + - Represents a simple non-selfintersecting convex polygon. - Create a convex hull from the given array of points. + Fires after the solver has run - + - Initializes a new instance of the class. + Fires before the solver runs - The vertices. - The density. - + - Create a new PolygonShape with the specified density. + A contact edge is used to connect bodies and contacts together + in a contact graph where each body is a node and each contact + is an edge. A contact edge belongs to a doubly linked list + maintained in each attached body. Each contact has two contact + nodes, one for each attached body. - The density. - + - Create a convex hull from the given array of local points. - The number of vertices must be in the range [3, Settings.MaxPolygonVertices]. - Warning: the points may be re-ordered, even if they form a convex polygon - Warning: collinear points are handled but not removed. Collinear points may lead to poor stacking behavior. + The contact - + - Given a transform, compute the associated axis aligned bounding box for a child shape. + The next contact edge in the body's contact list - The aabb results. - The world transform of the shape. - The child shape index. - + - This holds the mass data computed for a shape. + Provides quick access to the other body attached. - + - The area of the shape + The previous contact edge in the body's contact list - + - The position of the shape's centroid relative to the shape's origin. + The class manages contact between two shapes. A contact exists for each overlapping + AABB in the broad-phase (except if filtered). Therefore a contact object may exist + that has no contact points. - + - The rotational inertia of the shape about the local origin. + Get the contact manifold. Do not modify the manifold unless you understand the + internals of Box2D. - + + Get or set the desired tangent speed for a conveyor belt behavior. In meters per second. + + + Enable/disable this contact. This can be used inside the pre-solve + contact listener. The contact is only disabled for the current + time step (or sub-step in continuous collisions). + NOTE: If you are setting Enabled to a constant true or false, + use the explicit Enable() or Disable() functions instead to + save the CPU from doing a branch operation. + + - The mass of the shape, usually in kilograms. + Get the child primitive index for fixture A. + The child index A. - + - The equal operator + Get the child primitive index for fixture B. - - - + The child index B. - + - The not equal operator + Determines whether this contact is touching. - - - + + true if this instance is touching; otherwise, false. + - + - A shape is used for collision detection. You can create a shape however you like. - Shapes used for simulation in World are created automatically when a Fixture - is created. Shapes may encapsulate a one or more child shapes. + Gets the world manifold. - + - Contains the properties of the shape such as: - - Area of the shape - - Centroid - - Inertia - - Mass + Update the contact manifold and touching status. + Note: do not assume the fixture AABBs are overlapping or are valid. + The contact manager. - + - Get the type of this shape. + Evaluate this contact with your own manifold and transforms. - The type of the shape. + The manifold. + The first transform. + The second transform. - + - Get the number of child primitives. + Evaluate the manifold with supplied transforms. This assumes + modest motion from the original state. This does not change the + point count, impulses, etc. The radii must come from the Shapes + that generated the manifold. - + The manifold. + The transform for A. + The radius for A. + The transform for B. + The radius for B. + World vector pointing from A to B + Torld contact point (point of intersection). - + - Gets or sets the density. - Changing the density causes a recalculation of shape properties. + This proxy is used internally to connect fixtures to the broad-phase. - The density. - + - Radius of the Shape - Changing the radius causes a recalculation of shape properties. + A fixture is used to attach a Shape to a body for collision detection. A fixture + inherits its transform from its parent. Fixtures hold additional non-geometric data + such as friction, collision filters, etc. + Fixtures are created via Body.CreateFixture. + Warning: You cannot reuse fixtures. - + - Clone the concrete shape + Fires after two shapes has collided and are solved. This gives you a chance to get the impact force. - A clone of the shape - + - Test a point for containment in this shape. - Note: This only works for convex shapes. + Fires when two fixtures are close to each other. + Due to how the broadphase works, this can be quite inaccurate as shapes are approximated using AABBs. - The shape world transform. - A point in world coordinates. - True if the point is inside the shape - + - Cast a ray against a child shape. + Fires when two shapes collide and a contact is created between them. + Note that the first fixture argument is always the fixture that the delegate is subscribed to. - The ray-cast results. - The ray-cast input parameters. - The transform to be applied to the shape. - The child shape index. - True if the ray-cast hits the shape - + - Given a transform, compute the associated axis aligned bounding box for a child shape. + Fires when two shapes separate and a contact is removed between them. + Note: This can in some cases be called multiple times, as a fixture can have multiple contacts. + Note The first fixture argument is always the fixture that the delegate is subscribed to. - The aabb results. - The world transform of the shape. - The child shape index. - + - Compute the mass properties of this shape using its dimensions and density. - The inertia tensor is computed about the local origin, not the centroid. + Defaults to 0 + + If Settings.UseFPECollisionCategories is set to false: + Collision groups allow a certain group of objects to never collide (negative) + or always collide (positive). Zero means no collision group. Non-zero group + filtering always wins against the mask bits. + + If Settings.UseFPECollisionCategories is set to true: + If 2 fixtures are in the same collision group, they will not collide. - + - Compare this shape to another shape based on type and properties. + Defaults to Category.All + + The collision mask bits. This states the categories that this + fixture would accept for collision. + Use Settings.UseFPECollisionCategories to change the behavior. - The other shape - True if the two shapes are the same. - + - Used for the buoyancy controller + The collision categories this fixture is a part of. + + If Settings.UseFPECollisionCategories is set to false: + Defaults to Category.Cat1 + + If Settings.UseFPECollisionCategories is set to true: + Defaults to Category.All - + - Input parameters for CalculateTimeOfImpact + Get the child Shape. You can modify the child Shape, however you should not change the + number of vertices because this will crash some collision caching mechanisms. + The shape. - + - Compute the upper bound on time before two shapes penetrate. Time is represented as - a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate, - non-tunneling collision. If you change the time interval, you should call this function - again. - Note: use Distance() to compute the contact point and normal at the time of impact. + Gets or sets a value indicating whether this fixture is a sensor. - The output. - The input. + true if this instance is a sensor; otherwise, false. - + - Andrew's Monotone Chain Convex Hull algorithm. - Used to get the convex hull of a point cloud. - - Source: http://www.softsurfer.com/Archive/algorithm_0109/algorithm_0109.htm + Get the parent body of this fixture. This is null if the fixture is not attached. + The body. - + - Returns the convex hull from the given vertices.. + Set the user data. Use this to store your application specific data. + The user data. - + - Giftwrap convex hull algorithm. - O(nh) time complexity, where n is the number of points and h is the number of points on the convex hull. - - See http://en.wikipedia.org/wiki/Gift_wrapping_algorithm for more details. + Set the coefficient of friction. This will _not_ change the friction of + existing contacts. + The friction. - + - Returns the convex hull from the given vertices. + Set the coefficient of restitution. This will _not_ change the restitution of + existing contacts. - The vertices. + The restitution. - + - Creates a convex hull. - Note: - 1. Vertices must be of a simple polygon, i.e. edges do not overlap. - 2. Melkman does not work on point clouds + Gets a unique ID for this fixture. - - Implemented using Melkman's Convex Hull Algorithm - O(n) time complexity. - Reference: http://www.ams.sunysb.edu/~jsbm/courses/345/melkman.pdf - + The fixture id. - + - Returns a convex hull from the given vertices. + Restores collisions between this fixture and the provided fixture. - A convex hull in counter clockwise winding order. + The fixture. - + - Convex decomposition algorithm created by Mark Bayazit (http://mnbayazit.com/) - - Properties: - - Tries to decompose using polygons instead of triangles. - - Tends to produce optimal results with low processing time. - - Running time is O(nr), n = number of vertices, r = reflex vertices. - - Does not support holes. - - For more information about this algorithm, see http://mnbayazit.com/406/bayazit + Ignores collisions between this fixture and the provided fixture. + + The fixture. + + + + Determines whether collisions are ignored between this fixture and the provided fixture. + The fixture. + + true if the fixture is ignored; otherwise, false. + - + - Decompose the polygon into several smaller non-concave polygon. - If the polygon is already convex, it will return the original polygon, unless it is over Settings.MaxPolygonVertices. + Contacts are persistant and will keep being persistant unless they are + flagged for filtering. + This methods flags all contacts associated with the body for filtering. - + - 2D constrained Delaunay triangulation algorithm. - Based on the paper "Sweep-line algorithm for constrained Delaunay triangulation" by V. Domiter and and B. Zalik - - Properties: - - Creates triangles with a large interior angle. - - Supports holes - - Generate a lot of garbage due to incapsulation of the Poly2Tri library. - - Running time is O(n^2), n = number of vertices. - - Does not care about winding order. - - Source: http://code.google.com/p/poly2tri/ + Test a point for containment in this fixture. + A point in world coordinates. + - + - Decompose the polygon into several smaller non-concave polygon. + Cast a ray against this Shape. + The ray-cast results. + The ray-cast input parameters. + Index of the child. + - - Neighbor pointers - Flags to determine if an edge is a Delauney edge - - - Flags to determine if an edge is a Constrained edge - - - Has this triangle been marked as an interior triangle? - - + - Update neighbor pointers + Get the fixture's AABB. This AABB may be enlarge and/or stale. + If you need a more accurate AABB, compute it using the Shape and + the body transform. - Point 1 of the shared edge - Point 2 of the shared edge - This triangle's new neighbor + The aabb. + Index of the child. - + - Exhaustive search to update neighbor pointers + Only compares the values of this fixture, and not the attached shape or body. + This is used for deduplication in serialization only. - - Clears all references to all other triangles and points - - - Opposite triangle - The point in t that isn't shared between the triangles - - + - Legalize triangle by rotating clockwise around oPoint + Clones the fixture and attached shape onto the specified body. - The origin point to rotate around - ??? + The body you wish to clone the fixture onto. + The cloned fixture. - + - Finalize edge marking + This is an internal class. - + - Mark edge as constrained + Maintains a fixed angle between two bodies - + - Get the index of the neighbor that shares this edge (or -1 if it isn't shared) + Constructor for AngleJoint - index of the shared edge or -1 if edge isn't shared - - - @author Thomas Åhlen (thahlen@gmail.com) + The first body + The second body - + - MM: This seems to be used by LocateNode to guess a position in the implicit linked list of AdvancingFrontNodes near x - Removed an overload that depended on this being exact + The desired angle between BodyA and BodyB - + - We use a balancing tree to locate a node smaller or equal to given key value + Gets or sets the bias factor. + Defaults to 0.2 - + - This implementation will use simple node traversal algorithm to find a point on the front + Gets or sets the maximum impulse + Defaults to float.MaxValue - + - Triangulate simple polygon with holes + Gets or sets the softness of the joint + Defaults to 0 - + - Start sweeping the Y-sorted point set from bottom to top + A distance joint rains two points on two bodies + to remain at a fixed distance from each other. You can view + this as a massless, rigid rod. - + - If this is a Delaunay Triangulation of a pointset we need to fill so the triangle mesh gets a ConvexHull + This requires defining an + anchor point on both bodies and the non-zero length of the + distance joint. If you don't supply a length, the local anchor points + is used so that the initial configuration can violate the constraint + slightly. This helps when saving and loading a game. + @warning Do not use a zero or short length. + The first body + The second body + The first body anchor + The second body anchor + Set to true if you are using world coordinates as anchors. - + - We will traverse the entire advancing front and fill it to form a convex hull. + The local anchor point relative to bodyA's origin. - + - Find closes node to the left of the new point and - create a new triangle. If needed new holes and basins - will be filled to. + The local anchor point relative to bodyB's origin. - + - Creates a new front triangle and legalize it + The natural length between the anchor points. + Manipulating the length can lead to non-physical behavior when the frequency is zero. - + - When we need to traverse from one triangle to the next we need - the point in current triangle that is the opposite point to the next - triangle. + The mass-spring-damper frequency in Hertz. A value of 0 + disables softness. - + - After a flip we have two triangles and know that only one will still be - intersecting the edge. So decide which to contiune with and legalize the other + The damping ratio. 0 = no damping, 1 = critical damping. - - should be the result of an TriangulationUtil.orient2d( eq, op, ep ) - triangle 1 - triangle 2 - a point shared by both triangles - another point shared by both triangles - returns the triangle still intersecting the edge - - + - Fills holes in the Advancing Front + Get the reaction force given the inverse time step. Unit is N. + + - + - Fills a basin that has formed on the Advancing Front to the right - of given node. - First we decide a left,bottom and right node that forms the - boundaries of the basin. Then we do a reqursive fill. + Get the reaction torque given the inverse time step. + Unit is N*m. This is always zero for a distance joint. - - starting node, this or next node will be left node + + - + - Recursive algorithm to fill a Basin with triangles + A mouse joint is used to make a point on a body track a + specified world point. This a soft constraint with a maximum + force. This allows the constraint to stretch and without + applying huge forces. + NOTE: this joint is not documented in the manual because it was + developed to be used in the testbed. If you want to learn how to + use the mouse joint, look at the testbed. - + - ??? + This requires a world target point, + tuning parameters, and the time step. - middle node - the angle between 3 front nodes + The body. + The target. - + - The basin angle is decided against the horizontal line [1,0] + The local anchor point on BodyA - + - Adds a triangle to the advancing front to fill a hole. + The maximum constraint force that can be exerted + to move the candidate body. Usually you will express + as some multiple of the weight (multiplier * mass * gravity). - - middle node, that is the bottom of the hole - + - Returns true if triangle was legalized + The response speed. - + - Rotates a triangle pair one vertex CW - n2 n2 - P +-----+ P +-----+ - | t /| |\ t | - | / | | \ | - n1| / |n3 n1| \ |n3 - | / | after CW | \ | - |/ oT | | oT \| - +-----+ oP +-----+ - n4 n4 + The damping ratio. 0 = no damping, 1 = critical damping. - + - Give two points in any order. Will always be ordered so - that q.y > p.y and q.x > p.x if same y value + Friction joint. This is used for top-down friction. + It provides 2D translational friction and angular friction. - - - @author Thomas Åhlén, thahlen@gmail.com - - - + - Try to map a node to all sides of this triangle that don't have - a neighbor. + Constructor for FrictionJoint. + + + + Set to true if you are using world coordinates as anchors. - + - Create a polygon from a list of at least 3 points with no duplicates. + The local anchor point on BodyA - A list of unique points - + - Create a polygon from a list of at least 3 points with no duplicates. + The local anchor point on BodyB - A list of unique points. - + - Creates constraints and populates the context with points + The maximum friction force in N. - The context - + - Add a hole to the polygon. + The maximum friction torque in N-m. - A subtraction polygon fully contained inside this polygon. - + + + A gear joint is used to connect two joints together. + Either joint can be a revolute or prismatic joint. + You specify a gear ratio to bind the motions together: + + The ratio can be negative or positive. If one joint is a revolute joint + and the other joint is a prismatic joint, then the ratio will have units + of length or units of 1/length. + + Warning: You have to manually destroy the gear joint if jointA or jointB is destroyed. + + + - Inserts newPoint after point. + Requires two existing revolute or prismatic joints (any combination will work). + The provided joints must attach a dynamic body to a static body. - The point to insert after in the polygon - The point to insert into the polygon + The first joint. + The second joint. + The ratio. + The first body + The second body - + - Inserts list (after last point in polygon?) + The gear ratio. - - + - Adds a point after the last in the polygon. + The first revolute/prismatic joint attached to the gear joint. - The point to add - + - Removes a point from the polygon. + The second revolute/prismatic joint attached to the gear joint. - - - - - @param points - A list of all points in PointSet - @param constraints - Pairs of two points defining a constraint, all points must be part of given PointSet! - - - - @author Thomas Åhlén, thahlen@gmail.com - + - Requirements: - 1. a,b and c form a triangle. - 2. a and d is know to be on opposite side of bc - - a - + - / \ - / \ - b/ \c - +-------+ - / B \ - / \ - - Facts: - d has to be in area B to have a chance to be inside the circle formed by a,b and c - d is outside B if orient2d(a,b,d) or orient2d(c,a,d) is CW - This preknowledge gives us a way to optimize the incircle test + A joint edge is used to connect bodies and joints together + in a joint graph where each body is a node and each joint + is an edge. A joint edge belongs to a doubly linked list + maintained in each attached body. Each joint has two joint + nodes, one for each attached body. - triangle point, opposite d - triangle point - triangle point - point opposite a - true if d is inside circle, false if on circle edge - - - Forumla to calculate signed area - Positive if CCW - Negative if CW - 0 if collinear - A[P1,P2,P3] = (x1*y2 - y1*x2) + (x2*y3 - y2*x3) + (x3*y1 - y3*x1) - = (x1-x3)*(y2-y3) - (y1-y3)*(x2-x3) - + - Convex decomposition algorithm using ear clipping - - Properties: - - Only works on simple polygons. - - Does not support holes. - - Running time is O(n^2), n = number of vertices. - - Source: http://www.ewjordan.com/earClip/ + The joint. - + - Decompose the polygon into several smaller non-concave polygon. - Each resulting polygon will have no more than Settings.MaxPolygonVertices vertices. + The next joint edge in the body's joint list. - The vertices. - The tolerance. - - - - Triangulates a polygon using simple ear-clipping algorithm. Returns - size of Triangle array unless the polygon can't be triangulated. - This should only happen if the polygon self-intersects, - though it will not _always_ return null for a bad polygon - it is the - caller's responsibility to check for self-intersection, and if it - doesn't, it should at least check that the return value is non-null - before using. You're warned! - - Triangles may be degenerate, especially if you have identical points - in the input to the algorithm. Check this before you use them. - - This is totally unoptimized, so for large polygons it should not be part - of the simulation loop. - - - Only works on simple polygons. - - + - Finds and fixes "pinch points," points where two polygon - vertices are at the same point. - - If a pinch point is found, pin is broken up into poutA and poutB - and true is returned; otherwise, returns false. - - Mostly for internal use. - - O(N^2) time, which sucks... + Provides quick access to the other body attached. - The pin. - The pout A. - The pout B. - - + - Fix for obnoxious behavior for the % operator for negative numbers... + The previous joint edge in the body's joint list. - The x. - The modulus. - - + - Checks if vertex i is the tip of an ear in polygon defined by xv[] and yv[]. + Indicate if this join is enabled or not. Disabling a joint + means it is still in the simulation, but inactive. - The i. - The xv. - The yv. - Length of the xv. - - Assumes clockwise orientation of polygon. - - - true if the specified i is ear; otherwise, false. - - + - Convex decomposition algorithm created by unknown - - Properties: - - No support for holes - - Very fast - - Only works on simple polygons - - Only works on counter clockwise polygons - - More information: http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml + Constructor for fixed joint - + - Decompose the polygon into triangles. - - Properties: - - Only works on counter clockwise polygons - + Gets or sets the type of the joint. - The list of points describing the polygon + The type of the joint. - + - Check if the point P is inside the triangle defined by - the points A, B, C + Get the first body attached to this joint. - The A point. - The B point. - The C point. - The point to be tested. - True if the point is inside the triangle - + - Cut a the contour and add a triangle into V to describe the - location of the cut + Get the second body attached to this joint. - The list of points defining the polygon - The index of the first point - The index of the second point - The index of the third point - The number of elements in the array. - The array to populate with indicies of triangles. - True if a triangle was found - + - Convex decomposition algorithm created by Raimund Seidel - - Properties: - - Decompose the polygon into trapezoids, then triangulate. - - To use the trapezoid data, use ConvexPartitionTrapezoid() - - Generate a lot of garbage due to incapsulation of the Poly2Tri library. - - Running time is O(n log n), n = number of vertices. - - Running time is almost linear for most simple polygons. - - Does not care about winding order. - - For more information, see Raimund Seidel's paper "A simple and fast incremental randomized - algorithm for computing trapezoidal decompositions and for triangulating polygons" - - See also: "Computational Geometry", 3rd edition, by Mark de Berg et al, Chapter 6.2 - "Computational Geometry in C", 2nd edition, by Joseph O'Rourke - - Original code from the Poly2Tri project by Mason Green. - http://code.google.com/p/poly2tri/source/browse?repo=archive#hg/scala/src/org/poly2tri/seidel - - This implementation is from Dec 14, 2010 + Get the anchor point on bodyA in world coordinates. + On some joints, this value indicate the anchor point within the world. - + - Decompose the polygon into several smaller non-concave polygons. + Get the anchor point on bodyB in world coordinates. + On some joints, this value indicate the anchor point within the world. - The polygon to decompose. - The sheer to use if you get bad results, try using a higher value. - A list of triangles - + - Decompose the polygon into several smaller non-concave polygons. + Set the user data pointer. - The polygon to decompose. - The sheer to use if you get bad results, try using a higher value. - A list of trapezoids + The data. - + - Convex decomposition algorithm using ear clipping - - Properties: - - Only works on simple polygons. - - Does not support holes. - - Running time is O(n^2), n = number of vertices. + Set this flag to true if the attached bodies should collide. - + - Convex decomposition algorithm created by Mark Bayazit (http://mnbayazit.com/) - - Properties: - - Tries to decompose using polygons instead of triangles. - - Tends to produce optimal results with low processing time. - - Running time is O(nr), n = number of vertices, r = reflex vertices. - - Does not support holes. + The Breakpoint simply indicates the maximum Value the JointError can be before it breaks. + The default value is float.MaxValue, which means it never breaks. - + - Convex decomposition algorithm created by unknown - - Properties: - - No support for holes - - Very fast - - Only works on simple polygons - - Only works on counter clockwise polygons + Fires when the joint is broken. - + - Convex decomposition algorithm created by Raimund Seidel - - Properties: - - Decompose the polygon into trapezoids, then triangulate. - - To use the trapezoid data, use ConvexPartitionTrapezoid() - - Generate a lot of garbage due to incapsulation of the Poly2Tri library. - - Running time is O(n log n), n = number of vertices. - - Running time is almost linear for most simple polygons. - - Does not care about winding order. + Get the reaction force on body at the joint anchor in Newtons. + The inverse delta time. - + - 2D constrained Delaunay triangulation algorithm. - Based on the paper "Sweep-line algorithm for constrained Delaunay triangulation" by V. Domiter and and B. Zalik - - Properties: - - Creates triangles with a large interior angle. - - Supports holes - - Generate a lot of garbage due to incapsulation of the Poly2Tri library. - - Running time is O(n^2), n = number of vertices. - - Does not care about winding order. + Get the reaction torque on the body at the joint anchor in N*m. + The inverse delta time. - + - Collection of helper methods for misc collisions. - Does float tolerance and line collisions with lines and AABBs. + Return true if the joint is a fixed type. - - - Check if the lines a0->a1 and b0->b1 cross. - If they do, intersectionPoint will be filled - with the point of crossing. - - Grazing lines should not return true. - - - - + - This method detects if two line segments (or lines) intersect, - and, if so, the point of intersection. Use the and - parameters to set whether the intersection point - must be on the first and second line segments. Setting these - both to true means you are doing a line-segment to line-segment - intersection. Setting one of them to true means you are doing a - line to line-segment intersection test, and so on. - Note: If two line segments are coincident, then - no intersection is detected (there are actually - infinite intersection points). - Author: Jeremy Bell + Solves the position constraints. - The first point of the first line segment. - The second point of the first line segment. - The first point of the second line segment. - The second point of the second line segment. - This is set to the intersection - point if an intersection is detected. - Set this to true to require that the - intersection point be on the first line segment. - Set this to true to require that the - intersection point be on the second line segment. - True if an intersection is detected, false otherwise. + + returns true if the position errors are within tolerance. - + - This method detects if two line segments (or lines) intersect, - and, if so, the point of intersection. Use the and - parameters to set whether the intersection point - must be on the first and second line segments. Setting these - both to true means you are doing a line-segment to line-segment - intersection. Setting one of them to true means you are doing a - line to line-segment intersection test, and so on. - Note: If two line segments are coincident, then - no intersection is detected (there are actually - infinite intersection points). - Author: Jeremy Bell + A motor joint is used to control the relative motion + between two bodies. A typical usage is to control the movement + of a dynamic body with respect to the ground. - The first point of the first line segment. - The second point of the first line segment. - The first point of the second line segment. - The second point of the second line segment. - This is set to the intersection - point if an intersection is detected. - Set this to true to require that the - intersection point be on the first line segment. - Set this to true to require that the - intersection point be on the second line segment. - True if an intersection is detected, false otherwise. - + - This method detects if two line segments intersect, - and, if so, the point of intersection. - Note: If two line segments are coincident, then - no intersection is detected (there are actually - infinite intersection points). + Constructor for MotorJoint. - The first point of the first line segment. - The second point of the first line segment. - The first point of the second line segment. - The second point of the second line segment. - This is set to the intersection - point if an intersection is detected. - True if an intersection is detected, false otherwise. + The first body + The second body + Set to true if you are using world coordinates as anchors. - + - This method detects if two line segments intersect, - and, if so, the point of intersection. - Note: If two line segments are coincident, then - no intersection is detected (there are actually - infinite intersection points). + The maximum amount of force that can be applied to BodyA - The first point of the first line segment. - The second point of the first line segment. - The first point of the second line segment. - The second point of the second line segment. - This is set to the intersection - point if an intersection is detected. - True if an intersection is detected, false otherwise. - + - Get all intersections between a line segment and a list of vertices - representing a polygon. The vertices reuse adjacent points, so for example - edges one and two are between the first and second vertices and between the - second and third vertices. The last edge is between vertex vertices.Count - 1 - and verts0. (ie, vertices from a Geometry or AABB) + The maximum amount of torque that can be applied to BodyA - The first point of the line segment to test - The second point of the line segment to test. - The vertices, as described above - + - Get all intersections between a line segment and an AABB. + The linear (translation) offset. - The first point of the line segment to test - The second point of the line segment to test. - The AABB that is used for testing intersection. - - - Perform the cross product on two vectors. - - - Multiply a matrix times a vector. - - - Multiply a matrix times a vector. - - - Multiply two rotations: q * r - - - Transpose multiply two rotations: qT * r - - - Rotate a vector - - - Inverse rotate a vector - - Get the skew vector such that dot(skew_vec, other) == cross(vec, other) - - + - This function is used to ensure that a floating point number is - not a NaN or infinity. + Get or set the angular offset. - The x. - - true if the specified x is valid; otherwise, false. - - + - This is a approximate yet fast inverse square-root. + A prismatic joint. This joint provides one degree of freedom: translation + along an axis fixed in bodyA. Relative rotation is prevented. You can + use a joint limit to restrict the range of motion and a joint motor to + drive the motion or to model joint friction. - The x. - - + - Return the angle between two vectors on a plane - The angle is from vector 1 to vector 2, positive anticlockwise - The result is between -pi -> pi + This requires defining a line of + motion using an axis and an anchor point. The definition uses local + anchor points and a local axis so that the initial configuration + can violate the constraint slightly. The joint translation is zero + when the local anchor points coincide in world space. Using local + anchors and a local axis helps when saving and loading a game. + The first body. + The second body. + The first body anchor. + The second body anchor. + The axis. + Set to true if you are using world coordinates as anchors. - - Perform the dot product on two vectors. - - + - Returns a positive number if c is to the left of the line going from a to b. + - Positive number if point is left, negative if point is right, - and 0 if points are collinear. + + + + + - + - Returns a positive number if c is to the left of the line going from a to b. + The local anchor point on BodyA - Positive number if point is left, negative if point is right, - and 0 if points are collinear. - + - Determines if three vertices are collinear (ie. on a straight line) + The local anchor point on BodyB - First vertex - Second vertex - Third vertex - The tolerance - - + - Checks if a floating point Value is equal to another, - within a certain tolerance. + Get the current joint translation, usually in meters. - The first floating point Value. - The second floating point Value. - The floating point tolerance. - True if the values are "equal", false otherwise. + - + - Checks if a floating point Value is within a specified - range of values (inclusive). + Get the current joint translation speed, usually in meters per second. - The Value to check. - The minimum Value. - The maximum Value. - True if the Value is within the range specified, - false otherwise. + - + - A 2-by-2 matrix. Stored in column-major order. + Is the joint limit enabled? + true if [limit enabled]; otherwise, false. - + - Construct this matrix using columns. + Get the lower joint limit, usually in meters. - The c1. - The c2. + - + - Construct this matrix using scalars. + Get the upper joint limit, usually in meters. - The a11. - The a12. - The a21. - The a22. + - + - Initialize this matrix using columns. + Set the joint limits, usually in meters. - The c1. - The c2. + The lower limit + The upper limit - + - Set this to the identity matrix. + Is the joint motor enabled? + true if [motor enabled]; otherwise, false. - + - Set this matrix to all zeros. + Set the motor speed, usually in meters per second. + The speed. - + - Solve A * x = b, where b is a column vector. This is more efficient - than computing the inverse in one-shot cases. + Set the maximum motor force, usually in N. - The b. - + The force. - + - A 3-by-3 matrix. Stored in column-major order. + Get the current motor impulse, usually in N. + - + - Construct this matrix using columns. + Gets the motor force. - The c1. - The c2. - The c3. + The inverse delta time - + - Set this matrix to all zeros. + The axis at which the joint moves. - + - Solve A * x = b, where b is a column vector. This is more efficient - than computing the inverse in one-shot cases. + The axis in local coordinates relative to BodyA - The b. - - + - Solve A * x = b, where b is a column vector. This is more efficient - than computing the inverse in one-shot cases. Solve only the upper - 2-by-2 matrix equation. + The reference angle. - The b. - - - - Get the inverse of this matrix as a 2-by-2. - Returns the zero matrix if singular. - - - Get the symmetric inverse of this matrix as a 3-by-3. - Returns the zero matrix if singular. - - - Get the inverse of this matrix as a 2-by-2. - Returns the zero matrix if singular. - - - Rotation - - - Initialize from an angle in radians - - - Set using an angle in radians. - - - Set to the identity rotation - - - Get the angle in radians - - - Get the x-axis - - - Get the u-axis - - Sine and cosine - - - Sine and cosine - - + - A transform contains translation and rotation. It is used to represent - the position and orientation of rigid frames. + The pulley joint is connected to two bodies and two fixed world points. + The pulley supports a ratio such that: + + Yes, the force transmitted is scaled by the ratio. + + Warning: the pulley joint can get a bit squirrelly by itself. They often + work better when combined with prismatic joints. You should also cover the + the anchor points with static shapes to prevent one side from going to zero length. - + - Initialize using a position vector and a rotation matrix. + Constructor for PulleyJoint. - The position. - The r. + The first body. + The second body. + The anchor on the first body. + The anchor on the second body. + The world anchor for the first body. + The world anchor for the second body. + The ratio. + Set to true if you are using world coordinates as anchors. - + - Set this to the identity transform. + The local anchor point on BodyA - + - Set this based on the position and angle. + The local anchor point on BodyB - The position. - The angle. - + - This describes the motion of a body/shape for TOI computation. - Shapes are defined with respect to the body origin, which may - no coincide with the center of mass. However, to support dynamics - we must interpolate the center of mass position. + Get the first world anchor. + - + - World angles + Get the second world anchor. + - + - Fraction of the current time step in the range [0,1] - c0 and a0 are the positions at alpha0. + Get the current length of the segment attached to body1. + - + - Center world positions + Get the current length of the segment attached to body2. + - + - Local center of mass position + The current length between the anchor point on BodyA and WorldAnchorA - + - Get the interpolated transform at a specific time. + The current length between the anchor point on BodyB and WorldAnchorB - The transform. - beta is a factor in [0,1], where 0 indicates alpha0. - + - Advance the sweep forward, yielding a new initial state. + Get the pulley ratio. - new initial time.. + - + - Normalize the angles. + A revolute joint constrains to bodies to share a common point while they + are free to rotate about the point. The relative rotation about the shared + point is the joint angle. You can limit the relative rotation with + a joint limit that specifies a lower and upper angle. You can use a motor + to drive the relative rotation about the shared point. A maximum motor torque + is provided so that infinite forces are not generated. - + - Path: - Very similar to Vertices, but this - class contains vectors describing - control points on a Catmull-Rom - curve. + Constructor of RevoluteJoint. + + The first body. + The second body. + The first body anchor. + The second anchor. + Set to true if you are using world coordinates as anchors. + + + + Constructor of RevoluteJoint. + The first body. + The second body. + The shared anchor. + - + - All the points that makes up the curve + The local anchor point on BodyA - + - Initializes a new instance of the class. + The local anchor point on BodyB - + - Initializes a new instance of the class. + The referance angle computed as BodyB angle minus BodyA angle. - The vertices to created the path from. - + - Initializes a new instance of the class. + Get the current joint angle in radians. - The vertices to created the path from. - + - True if the curve is closed. + Get the current joint angle speed in radians per second. - true if closed; otherwise, false. - + - Gets the next index of a controlpoint + Is the joint limit enabled? - The index. - + true if [limit enabled]; otherwise, false. - + - Gets the previous index of a controlpoint + Get the lower joint limit in radians. - The index. - - + - Translates the control points by the specified vector. + Get the upper joint limit in radians. - The vector. - + - Scales the control points by the specified vector. + Set the joint limits, usually in meters. - The Value. + The lower limit + The upper limit - + - Rotate the control points by the defined value in radians. + Is the joint motor enabled? - The amount to rotate by in radians. + true if [motor enabled]; otherwise, false. - + - Returns a set of points defining the - curve with the specifed number of divisions - between each control point. + Get or set the motor speed in radians per second. - Number of divisions between each control point. - - + - Gets the normal for the given time. + Get or set the maximum motor torque, usually in N-m. - The time - The normal. - + - An easy to use manager for creating paths. + Get or set the current motor impulse, usually in N-m. - + - Convert a path into a set of edges and attaches them to the specified body. - Note: use only for static edges. + Gets the motor torque in N-m. - The path. - The body. - The subdivisions. + The inverse delta time - + - Convert a closed path into a polygon. - Convex decomposition is automatically performed. + A rope joint enforces a maximum distance between two points on two bodies. It has no other effect. + It can be used on ropes that are made up of several connected bodies, and if there is a need to support a heavy body. + This joint is used for stabiliation of heavy objects on soft constraint joints. + + Warning: if you attempt to change the maximum length during the simulation you will get some non-physical behavior. + Use the DistanceJoint instead if you want to dynamically control the length. - The path. - The body. - The density. - The subdivisions. - + - Duplicates the given Body along the given path for approximatly the given copies. + Constructor for RopeJoint. - The world. - The path. - The shapes. - The type. - The copies. - - + The first body + The second body + The anchor on the first body + The anchor on the second body + Set to true if you are using world coordinates as anchors. - + - Duplicates the given Body along the given path for approximatly the given copies. + The local anchor point on BodyA - The world. - The path. - The shape. - The type. - The copies. - The user data. - - + - Moves the given body along the defined path. + The local anchor point on BodyB - The path. - The body. - The time. - The strength. - The time step. - + - Attaches the bodies with revolute joints. + Get or set the maximum length of the rope. + By default, it is the distance between the two anchor points. - The world. - The bodies. - The local anchor A. - The local anchor B. - if set to true [connect first and last]. - if set to true [collide connected]. - + - Contains filter data that can determine whether an object should be processed or not. + Gets the state of the joint. - + - Disable the logic on specific categories. - Category.None by default. + A weld joint essentially glues two bodies together. A weld joint may + distort somewhat because the island constraint solver is approximate. + + The joint is soft constraint based, which means the two bodies will move + relative to each other, when a force is applied. To combine two bodies + in a rigid fashion, combine the fixtures to a single body instead. - + - Disable the logic on specific groups + You need to specify an anchor point where they are attached. + The position of the anchor point is important for computing the reaction torque. + The first body + The second body + The first body anchor. + The second body anchor. + Set to true if you are using world coordinates as anchors. - + - Enable the logic on specific categories - Category.All by default. + The local anchor point on BodyA - + - Enable the logic on specific groups. + The local anchor point on BodyB - + - + The bodyB angle minus bodyA angle in the reference state (radians). - - - + - Adds the category. + The frequency of the joint. A higher frequency means a stiffer joint, but + a too high value can cause the joint to oscillate. + Default is 0, which means the joint does no spring calculations. - The category. - + - Removes the category. + The damping on the joint. The damping is only used when + the joint has a frequency (> 0). A higher value means more damping. - The category. - + - Determines whether this body ignores the the specified controller. + A wheel joint. This joint provides two degrees of freedom: translation + along an axis fixed in bodyA and rotation in the plane. You can use a + joint limit to restrict the range of motion and a joint motor to drive + the rotation or to model rotational friction. + This joint is designed for vehicle suspensions. - The category. - - true if the object has the specified category; otherwise, false. - - + - Adds the category. + Constructor for WheelJoint - The category. + The first body + The second body + The anchor point + The axis + Set to true if you are using world coordinates as anchors. - + - Removes the category. + The local anchor point on BodyA - The category. - + - Determines whether this body ignores the the specified controller. + The local anchor point on BodyB - The category. - - true if the object has the specified category; otherwise, false. - - + - Ignores the controller. The controller has no effect on this body. + The axis at which the suspension moves. - The logic type. - + - Restore the controller. The controller affects this body. + The axis in local coordinates relative to BodyA - The logic type. - + - Determines whether this body ignores the the specified controller. + The desired motor speed in radians per second. - The logic type. - - true if the body has the specified flag; otherwise, false. - - + - This is a comprarer used for - detecting angle difference between rays + The maximum motor torque, usually in N-m. - + - Creates a realistic explosion based on raycasting. Objects in the open will be affected, but objects behind - static bodies will not. A body that is half in cover, half in the open will get half the force applied to the end in - the open. + Suspension frequency, zero indicates no suspension - + - Two degrees: maximum angle from edges to first ray tested + Suspension damping ratio, one indicates critical damping - + - Ratio of arc length to angle from edges to first ray tested. - Defaults to 1/40. + Gets the translation along the axis - + - Ignore Explosion if it happens inside a shape. - Default value is false. + Gets the angular velocity of the joint - + - Max angle between rays (used when segment is large). - Defaults to 15 degrees + Enable/disable the joint motor. - + - Maximum number of shapes involved in the explosion. - Defaults to 100 + Gets the torque of the motor + inverse delta time - + - How many rays per shape/body/segment. - Defaults to 5 + This is an internal structure. - + - Activate the explosion at the specified position. + Time step (Delta time) - The position where the explosion happens - The explosion radius - The explosion force at the explosion point (then is inversely proportional to the square of the distance) - A list of bodies and the amount of force that was applied to them. - + - Creates a simple explosion that ignores other bodies hiding behind static bodies. + dt * inv_dt0 - + - This is the power used in the power function. A value of 1 means the force - applied to bodies in the explosion is linear. A value of 2 means it is exponential. + Inverse time step (0 if dt == 0). - + + This is an internal structure. + + + This is an internal structure. + + + Solver Data + + - Activate the explosion at the specified position. + The world class manages all physics entities, dynamic simulation, + and asynchronous queries. - The position (center) of the explosion. - The radius of the explosion. - The force applied - A maximum amount of force. When force gets over this value, it will be equal to maxForce - A list of bodies and the amount of force that was applied to them. - + - Split a fixture into 2 vertice collections using the given entry and exit-point. + Fires whenever a body has been added - The Fixture to split - The entry point - The start point - The exit point - The end point - The first collection of vertexes - The second collection of vertexes - + - This is a high-level function to cuts fixtures inside the given world, using the start and end points. - Note: We don't support cutting when the start or end is inside a shape. + Fires whenever a body has been removed - The world. - The startpoint. - The endpoint. - True if the cut was performed. - + - Combines a list of triangles into a list of convex polygons. - Starts with a seed triangle, keep adding triangles to it until you can't add any more without making the polygon non-convex. + Fires whenever a fixture has been added - - - Combine a list of triangles into a list of convex polygons. - - Note: This only works on triangles. - - The triangles. - The maximun number of polygons to return. - The tolerance - - + - Provides a set of tools to simplify polygons in various ways. + Fires whenever a fixture has been removed - + - Removes all collinear points on the polygon. + Fires whenever a joint has been added - The polygon that needs simplification. - The collinearity tolerance. - A simplified polygon. - + - Ramer-Douglas-Peucker polygon simplification algorithm. This is the general recursive version that does not use the - speed-up technique by using the Melkman convex hull. - - If you pass in 0, it will remove all collinear points. + Fires whenever a joint has been removed - The simplified polygon - + - Merges all parallel edges in the list of vertices + Fires every time a controller is added to the World. - The vertices. - The tolerance. - + - Merges the identical points in the polygon. + Fires every time a controlelr is removed form the World. - The vertices. - + - Reduces the polygon by distance. + Initializes a new instance of the class. - The vertices. - The distance between points. Points closer than this will be removed. - + - Reduces the polygon by removing the Nth vertex in the vertices list. + Get the number of broad-phase proxies. - The vertices. - The Nth point to remove. Example: 5. - + The proxy count. - + - Simplify the polygon by removing all points that in pairs of 3 have an area less than the tolerance. - - Pass in 0 as tolerance, and it will only remove collinear points. + Change the global gravity vector. - - - + The gravity. - + - Implements "A new algorithm for Boolean operations on general polygons" - available here: http://liama.ia.ac.cn/wiki/_media/user:dong:dong_cg_05.pdf - Merges two polygons, a subject and a clip with the specified operation. Polygons may not be - self-intersecting. - - Warning: May yield incorrect results or even crash if polygons contain collinear points. + Get the contact manager for testing. - The subject polygon. - The clip polygon, which is added, - substracted or intersected with the subject - The operation to be performed. Either - Union, Difference or Intersection. - The error generated (if any) - A list of closed polygons, which make up the result of the clipping operation. - Outer contours are ordered counter clockwise, holes are ordered clockwise. + The contact manager. - + - Calculates all intersections between two polygons. + Get the world body list. - The first polygon. - The second polygon. - Returns the first polygon with added intersection points. - Returns the second polygon with added intersection points. + Thehead of the world body list. - + - Calculates the simplical chain corresponding to the input polygon. + Get the world joint list. - Used by method Execute(). + The joint list. - + - Calculates the characteristics function for all edges of - the given simplical chains and builds the result chain. + Get the world contact list. With the returned contact, use Contact.GetNext to get + the next contact in the world list. A null contact indicates the end of the list. - Used by method Execute(). + The head of the world contact list. - + - Calculates the polygon(s) from the result simplical chain. + If false, the whole simulation stops. It still processes added and removed geometries. - Used by method Execute(). - + - Needed to calculate the characteristics function of a simplex. + Add a rigid body. - Used by method CalculateEdgeCharacter(). + - + - Needed for sorting multiple intersections points on the same edge. + Destroy a rigid body. + Warning: This automatically deletes all associated shapes and joints. - Used by method CalculateIntersections(). + The body. - + - Returns the coefficient of a simplex. + Create a joint to constrain bodies together. This may cause the connected bodies to cease colliding. - Used by method CalculateSimplicalChain(). + The joint. - + - Winding number test for a point in a simplex. + Destroy a joint. This may cause the connected bodies to begin colliding. - The point to be tested. - The edge that the point is tested against. - False if the winding number is even and the point is outside - the simplex and True otherwise. + The joint. - + - Tests if a point lies on a line segment. + All adds and removes are cached by the World duing a World step. + To process the changes before the world updates again, call this method. - Used by method CalculateBeta(). - - Specifies an Edge. Edges are used to represent simplicies in simplical chains + + + Take a time step. This performs collision detection, integration, + and consraint solution. + + The amount of time to simulate, this should not vary. - + - Build vertices to represent an axis-aligned box. + Call this after you are done with time steps to clear the forces. You normally + call this after each call to Step, unless you are performing sub-steps. By default, + forces will be automatically cleared, so you don't need to call this function. - the half-width. - the half-height. - + - Build vertices to represent an oriented box. + Query the world for all fixtures that potentially overlap the provided AABB. + + Inside the callback: + Return true: Continues the query + Return false: Terminate the query - the half-width. - the half-height. - the center of the box in local coordinates. - the rotation of the box in local coordinates. + A user implemented callback class. + The aabb query box. - + - Creates a rounded rectangle with the specified width and height. + Query the world for all fixtures that potentially overlap the provided AABB. + Use the overload with a callback for filtering and better performance. - The width. - The height. - The rounding X radius. - The rounding Y radius. - The number of segments to subdivide the edges. - + The aabb query box. + A list of fixtures that were in the affected area. - + - Set this as a single edge. + Ray-cast the world for all fixtures in the path of the ray. Your callback + controls whether you get the closest point, any point, or n-points. + The ray-cast ignores shapes that contain the starting point. + + Inside the callback: + return -1: ignore this fixture and continue + return 0: terminate the ray cast + return fraction: clip the ray to this point + return 1: don't clip the ray and continue - The first point. - The second point. + A user implemented callback class. + The ray starting point. + The ray ending point. - + - Creates a circle with the specified radius and number of edges. + Returns a list of fixtures that are at the specified point. - The radius. - The number of edges. The more edges, the more it resembles a circle + The point. - + + Shift the world origin. Useful for large worlds. + The body shift formula is: position -= newOrigin + @param newOrigin the new origin with respect to the old origin + Warning: Calling this method mid-update might cause a crash. + + - Creates a ellipse with the specified width, height and number of edges. + This delegate is called when a contact is deleted - Width of the ellipse. - Height of the ellipse. - The number of edges. The more edges, the more it resembles an ellipse - - + - Creates an capsule with the specified height, radius and number of edges. - A capsule has the same form as a pill capsule. + This delegate is called when a contact is created - Height (inner height + 2 * radius) of the capsule. - Radius of the capsule ends. - The number of edges of the capsule ends. The more edges, the more it resembles an capsule - - + - Creates an capsule with the specified height, radius and number of edges. - A capsule has the same form as a pill capsule. + Creates a capsule. + Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices) - Height (inner height + radii) of the capsule. - Radius of the top. - The number of edges of the top. The more edges, the more it resembles an capsule - Radius of bottom. - The number of edges of the bottom. The more edges, the more it resembles an capsule - + - Creates a gear shape with the specified radius and number of teeth. + Creates a rounded rectangle. + Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices) - The radius. - The number of teeth. - The tip percentage. - Height of the tooth. + The world. + The width. + The height. + The x radius. + The y radius. + The segments. + The density. + The position. - + - Detects the vertices by analyzing the texture data. + Creates a breakable body. You would want to remove collinear points before using this. - The texture data. - The texture width. + The world. + The vertices. + The density. + The position. - + - Detects the vertices by analyzing the texture data. + An easy to use factory for creating bodies - The texture data. - The texture width. - if set to true it will perform hole detection. - - + - Detects the vertices by analyzing the texture data. + An easy to use factory for using joints. - The texture data. - The texture width. - The hull tolerance. - The alpha tolerance. - if set to true it will perform multi part detection. - if set to true it will perform hole detection. - - + - Serialize the world into an XML file + Creates a revolute joint and adds it to the world + + + + + - + - An emulation for the Stopwatch class for Windows Phone and Silverlight. + Creates a rope joint and adds it to the world - + - Creates a new instance of the class and starts the watch immediately. + Creates a prismatic joint and adds it to the world - An instance of Stopwatch, running. + + + + + + - + - Creates an instance of the Stopwatch class. + Creates a Wheel Joint and adds it to the world - + - Completely resets and deactivates the timer. + Creates an angle joint. + The world. + The first body. + The second body. + - + - Begins the timer. + Creates a chain. + The world. + The start. + The end. + The width. + The height. + if set to true [fix start]. + if set to true [fix end]. + The number of links. + The link density. + - + - Stops the current timer. + If true, all collision callbacks have to return the same value, and agree + if there was a collision or not. Swtich this to false to revert to the + collision agreement used in FPE 3.3.x - + - Gets a value indicating whether the instance is currently recording. + Enabling diagnistics causes the engine to gather timing information. + You can see how much time it took to solve the contacts, solve CCD + and update the controllers. + NOTE: If you are using a debug view that shows performance counters, + you might want to enable this. - + - Gets the Elapsed time as a Timespan. + Set this to true to skip sanity checks in the engine. This will speed up the + tools by removing the overhead of the checks, but you will need to handle checks + yourself where it is needed. - + - Gets the Elapsed time as the total number of milliseconds. + The number of velocity iterations used in the solver. - + - Gets the Elapsed time as the total number of ticks (which is faked - as Silverlight doesn't have a way to get at the actual "Ticks") + The number of position iterations used in the solver. - - - Marching squares over the given domain using the mesh defined via the dimensions - (wid,hei) to build a set of polygons such that f(x,y) less than 0, using the given number - 'bin' for recursive linear inteprolation along cell boundaries. - - if 'comb' is true, then the polygons will also be composited into larger possible concave - polygons. - - - - - - - - - - - Linearly interpolate between (x0 to x1) given a value at these coordinates (v0 and v1) - such as to approximate value(return) = 0 - * - - - Recursive linear interpolation for use in marching squares * - - - Recursive linear interpolation for use in marching squares * - - - Square value for use in marching squares * - - - Look-up table to relate polygon key with the vertices that should be used for - the sub polygon in marching squares - * - Perform a single celled marching square for for the given cell defined by (x0,y0) (x1,y1) - using the function f for recursive interpolation, given the look-up table 'fs' of - the values of 'f' at cell vertices with the result to be stored in 'poly' given the actual - coordinates of 'ax' 'ay' in the marching squares mesh. - * + + + Enable/Disable Continuous Collision Detection (CCD) + - - Used in polygon composition to composit polygons into scan lines - Combining polya and polyb into one super-polygon stored in polya. - * + + + If true, it will run a GiftWrap convex hull on all polygon inputs. + This makes for a more stable engine when given random input, + but if speed of the creation of polygons are more important, + you might want to set this to false. + - + - Designed as a complete port of CxFastList from CxStd. + The number of velocity iterations in the TOI solver - + - Iterator to start of list (O(1)) + The number of position iterations in the TOI solver - + - Iterator to end of list (O(1)) + Maximum number of sub-steps per contact in continuous physics simulation. - + - Returns first element of list (O(1)) + Enable/Disable warmstarting - + - add object to list (O(1)) + Enable/Disable sleeping - + - remove object from list, returns true if an element was removed (O(n)) + The maximum number of vertices on a convex polygon. - + - pop element from head of list (O(1)) Note: this does not return the object popped! - There is good reason to this, and it regards the Alloc list variants which guarantee - objects are released to the object pool. You do not want to retrieve an element - through pop or else that object may suddenly be used by another piece of code which - retrieves it from the object pool. + Farseer Physics Engine has a different way of filtering fixtures than Box2d. + We have both FPE and Box2D filtering in the engine. If you are upgrading + from earlier versions of FPE, set this to true and DefaultFixtureCollisionCategories + to Category.All. - + - insert object after 'node' returning an iterator to the inserted object. + This is used by the Fixture constructor as the default value + for Fixture.CollisionCategories member. Note that you may need to change this depending + on the setting of UseFPECollisionCategories, above. - + - removes the element pointed to by 'node' with 'prev' being the previous iterator, - returning an iterator to the element following that of 'node' (O(1)) + This is used by the Fixture constructor as the default value + for Fixture.CollidesWith member. - + - whether the list is empty (O(1)) + This is used by the Fixture constructor as the default value + for Fixture.IgnoreCCDWith member. - + - computes size of list (O(n)) + The maximum number of contact points between two convex shapes. + DO NOT CHANGE THIS VALUE! - + - empty the list (O(1) if CxMixList, O(n) otherwise) + This is used to fatten AABBs in the dynamic tree. This allows proxies + to move by a small amount without triggering a tree adjustment. + This is in meters. - + - returns true if 'value' is an element of the list (O(n)) + This is used to fatten AABBs in the dynamic tree. This is used to predict + the future position based on the current displacement. + This is a dimensionless multiplier. - - Associated polygon at coordinate * - Key of original sub-polygon * + + + A small length used as a collision and constraint tolerance. Usually it is + chosen to be numerically significant, but visually insignificant. + - + - Simple class to maintain a terrain. It can keep track + A small angle used as a collision and constraint tolerance. Usually it is + chosen to be numerically significant, but visually insignificant. - + - World to manage terrain in. + The radius of the polygon/edge shape skin. This should not be modified. Making + this smaller means polygons will have an insufficient buffer for continuous collision. + Making it larger may create artifacts for vertex collision. - + - Center of terrain in world units. + Maximum number of contacts to be handled to solve a TOI impact. - + - Width of terrain in world units. + A velocity threshold for elastic collisions. Any collision with a relative linear + velocity below this threshold will be treated as inelastic. - + - Height of terrain in world units. + The maximum linear position correction used when solving constraints. This helps to + prevent overshoot. - + - Points per each world unit used to define the terrain in the point cloud. + The maximum angular position correction used when solving constraints. This helps to + prevent overshoot. - + - Points per cell. + This scale factor controls how fast overlap is resolved. Ideally this would be 1 so + that overlap is removed in one time step. However using values close to 1 often lead + to overshoot. - + - Points per sub cell. + The time that a body must be still before it will go to sleep. - + - Number of iterations to perform in the Marching Squares algorithm. - Note: More then 3 has almost no effect on quality. + A body cannot sleep if its linear velocity is above this tolerance. - + - Decomposer to use when regenerating terrain. Can be changed on the fly without consequence. - Note: Some decomposerers are unstable. + A body cannot sleep if its angular velocity is above this tolerance. - + - Point cloud defining the terrain. + The maximum linear velocity of a body. This limit is very large and is used + to prevent numerical problems. You shouldn't need to adjust this. - + - Generated bodies. + The maximum angular velocity of a body. This limit is very large and is used + to prevent numerical problems. You shouldn't need to adjust this. - + - Creates a new terrain. + Defines the maximum number of iterations made by the GJK algorithm. - The World - The area of the terrain. - + - Creates a new terrain + This is only for debugging the solver - The World - The position (center) of the terrain. - The width of the terrain. - The height of the terrain. - + - Initialize the terrain for use. + By default, forces are cleared automatically after each call to Step. + The default behavior is modified with this setting. + The purpose of this setting is to support sub-stepping. Sub-stepping is often used to maintain + a fixed sized time step under a variable frame-rate. + When you perform sub-stepping you should disable auto clearing of forces and instead call + ClearForces after all sub-steps are complete in one pass of your game loop. - + - Apply the specified texture data to the terrain. + Friction mixing law. Feel free to customize this. - - + The friction1. + The friction2. + - + - Modify a single point in the terrain. + Restitution mixing law. Feel free to customize this. - World location to modify. Automatically clipped. - -1 = inside terrain, 1 = outside terrain + The restitution1. + The restitution2. + - + - Regenerate the terrain. + Replaces characters not supported by your spritefont. + The font. + The input string. + The string to replace illegal characters with. + - + - The detection type affects the resulting polygon data. + - + - Holes are integrated into the main polygon. + - + - The data of the main polygon and hole polygons is returned separately. + + + + - + - This array is ment to be readonly. - It's not because it is accessed very frequently. + - + - Get or set the polygon detection type. + - + - Will detect texture 'holes' if set to true. Slows down the detection. Default is false. + - + - Will detect texture multiple 'solid' isles if set to true. Slows down the detection. Default is false. + - + - Will optimize the vertex positions along the interpolated normal between two edges about a half pixel (post processing). Default is false. + - + - Can be used for scaling. + - + - Alpha (coverage) tolerance. Default is 20: Every pixel with a coverage value equal or greater to 20 will be counts as solid. + + + - + - Default is 1.5f. + + + + - + - Detects the vertices of the supplied texture data. (PolygonDetectionType.Integrated) + - The texture data. - The texture width. + - + - Detects the vertices of the supplied texture data. + - The texture data. - The texture width. - if set to true it will perform hole detection. + - + - Detects the vertices of the supplied texture data. + - The texture data. - The texture width. - if set to true it will perform hole detection. - The hull tolerance. - The alpha tolerance. - if set to true it will perform multi part detection. + - + - Function to search for an entrance point of a hole in a polygon. It searches the polygon from top to bottom between the polygon edges. + - The polygon to search in. - The last entrance point. - The next holes entrance point. Null if ther are no holes. + + - + - Searches the polygon for the x coordinates of the edges that cross the specified y coordinate. + - Polygon to search in. - Y coordinate to check for edges. - Descending sorted list of x coordinates of edges that cross the specified y coordinate. + + - + - - + + - + - Searches for the next shape. + - Already detected polygons. - Search start coordinate. - Returns the found entrance coordinate. Null if no other shapes found. - True if a new shape was found. + + - + - There were no errors in the polygon + + + + - + - Polygon must have between 3 and Settings.MaxPolygonVertices vertices. + - + - Polygon must be simple. This means no overlapping edges. + + + + - + - Polygon must have a counter clockwise winding. + + + - + - The polygon is concave, it needs to be convex. + + + - + - Polygon area is too small. + + + - + - The polygon has a side that is too short. + + + - + - You can add holes to this collection. - It will get respected by some of the triangulation algoithms, but otherwise not used. + - + - Gets the next index. Used for iterating all the edges with wrap-around. + - The current index - + - Gets the next vertex. Used for iterating all the edges with wrap-around. + - The current index + + - + - Gets the previous index. Used for iterating all the edges with wrap-around. + - The current index + + - + - Gets the previous vertex. Used for iterating all the edges with wrap-around. + - The current index - + - Gets the signed area. - If the area is less than 0, it indicates that the polygon is clockwise winded. + - The signed area - + - Gets the area. + - - + - Gets the centroid. + - - + - Returns an AABB that fully contains this polygon. + - + - Translates the vertices with the specified vector. + - The value. - + - Translates the vertices with the specified vector. + - The vector. - + - Scales the vertices with the specified vector. + - The Value. - + - Scales the vertices with the specified vector. + - The Value. - + - Rotate the vertices with the defined value in radians. - Warning: Using this method on an active set of vertices of a Body, - will cause problems with collisions. Use Body.Rotation instead. - The amount to rotate by in radians. - + - Determines whether the polygon is convex. - O(n^2) running time. - Assumptions: - - The polygon is in counter clockwise order - - The polygon has no overlapping edges - - true if it is convex; otherwise, false. - - + - Indicates if the vertices are in counter clockwise order. - Warning: If the area of the polygon is 0, it is unable to determine the winding. + - + - Forces the vertices to be counter clock wise order. + - + - Checks if the vertices forms an simple polygon by checking for edge crossings. + - - - Checks if the polygon is valid for use in the engine. + + - Performs a full check, for simplicity, convexity, - orientation, minimum angle, and volume. - - From Eric Jordan's convex decomposition library - - PolygonError.NoError if there were no error. + - + - Projects to axis. + - The axis. - The min. - The max. - + - Winding number test for a point in a polygon. + - See more info about the algorithm here: http://softsurfer.com/Archive/algorithm_0103/algorithm_0103.htm - The point to be tested. - -1 if the winding number is zero and the point is outside - the polygon, 1 if the point is inside the polygon, and 0 if the point - is on the polygons edge. - + - Compute the sum of the angles made between the test point and each pair of points making up the polygon. - If this sum is 2pi then the point is an interior point, if 0 then the point is an exterior point. - ref: http://ozviz.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/ - Solution 2 + - + - Transforms the polygon using the defined matrix. + - The matrix to use as transformation. - + - Modes for Decay. Actual Decay must be implemented in inheriting - classes + - + - Forcetypes are used in the decay math to properly get the distance. - They are also used to draw a representation in DebugView + - + - Timing Modes - Switched: Standard on/off mode using the baseclass enabled property - Triggered: When the Trigger() method is called the force is active - for a specified Impulse Length - Curve: Still to be defined. The basic idea is having a Trigger - combined with a curve for the strength + - + - Curve to be used for Decay in Curve mode + - + - The Forcetype of the instance + - + - Provided for reuse to provide Variation functionality in - inheriting classes + - + - Curve used by Curve Mode as an animated multiplier for the force - strength. - Only positions between 0 and 1 are considered as that range is - stretched to have ImpulseLength. + - + - Constructor + - + - Overloaded Contstructor with supplying Timing Mode + - + + + - + - Global Strength of the force to be applied + + + - + - Position of the Force. Can be ignored (left at (0,0) for forces - that are not position-dependent + - + - Maximum speed of the bodies. Bodies that are travelling faster are - supposed to be ignored + - + - Maximum Force to be applied. As opposed to Maximum Speed this is - independent of the velocity of - the affected body + - + - Timing Mode of the force instance + + + - + - Time of the current impulse. Incremented in update till - ImpulseLength is reached + - + - Length of a triggered impulse. Used in both Triggered and Curve Mode + - + - Indicating if we are currently during an Impulse - (Triggered and Curve Mode) + + + - + - Variation of the force applied to each body affected - !! Must be used in inheriting classes properly !! + - + - See DecayModes + - + - Start of the distance based Decay. To set a non decaying area + - + - Maximum distance a force should be applied + - + - Calculate the Decay for a given body. Meant to ease force - development and stick to the DRY principle and provide unified and - predictable decay math. + - The body to calculate decay for - A multiplier to multiply the force with to add decay - support in inheriting classes - + - Triggers the trigger modes (Trigger and Curve) + - + - Inherited from Controller - Depending on the TimingMode perform timing logic and call ApplyForce() + This is the pivot position - - + - Apply the force supplying strength (wich is modified in Update() - according to the TimingMode + - - The strength - + - Controls the rotational drag that the fluid exerts on the bodies within it. Use higher values will simulate thick fluid, like honey, lower values to - simulate water-like fluids. + - + - Density of the fluid. Higher values will make things more buoyant, lower values will cause things to sink. + - + - Controls the linear drag that the fluid exerts on the bodies within it. Use higher values will simulate thick fluid, like honey, lower values to - simulate water-like fluids. + - + - Acts like waterflow. Defaults to 0,0. + 进入绘画模式,整个对象将画到一张RenderTexture上,然后这种贴图将代替原有的显示内容。 + 可以在onPaint回调里对这张纹理进行进一步操作,实现特殊效果。 + 可能有多个地方要求进入绘画模式,这里用requestorId加以区别,取值是1、2、4、8、16以此类推。1024内内部保留。用户自定义的id从1024开始。 + 请求者id + 纹理四周的留空。如果特殊处理后的内容大于原内容,那么这里的设置可以使纹理扩大。 - + - Initializes a new instance of the class. + 离开绘画模式 - Only bodies inside this AABB will be influenced by the controller - Density of the fluid - Linear drag coefficient of the fluid - Rotational drag coefficient of the fluid - The direction gravity acts. Buoyancy force will act in opposite direction of gravity. + - + - Ignores the controller. The controller has no effect on this body. + - The controller type. - + - Restore the controller. The controller affects this body. + 将整个显示对象(如果是容器,则容器包含的整个显示列表)静态化,所有内容被缓冲到一张纹理上。 + DC将保持为1。CPU消耗将降到最低。但对象的任何变化不会更新。 + 当cacheAsBitmap已经为true时,再次调用cacheAsBitmap=true将会刷新一次。 - The controller type. - + - Determines whether this body ignores the the specified controller. + - The controller type. - - true if the body has the specified flag; otherwise, false. - - + - Reference implementation for forces based on AbstractForceController - It supports all features provided by the base class and illustrates proper - usage as an easy to understand example. - As a side-effect it is a nice and easy to use wind force for your projects + - + - Direction of the windforce + + + - + - The amount of Direction randomization. Allowed range is 0-1. + 将舞台坐标转换为本地坐标 + + - + - Ignore the position and apply the force. If off only in the "front" (relative to position and direction) - will be affected + 将本地坐标转换为舞台坐标 + + - + - Put a limit on the linear (translation - the movespeed) and angular (rotation) velocity - of bodies added to this controller. + + + null if to world space + - + - Initializes a new instance of the class. - Sets the max linear velocity to Settings.MaxTranslation - Sets the max angular velocity to Settings.MaxRotation + + + null if to world space + - + - Initializes a new instance of the class. - Pass in 0 or float.MaxValue to disable the limit. - maxAngularVelocity = 0 will disable the angular velocity limit. + - The max linear velocity. - The max angular velocity. - + - Gets or sets the max angular velocity. + FairyBatch is for internal use. - The max angular velocity. - + - Gets or sets the max linear velocity. + - The max linear velocity. - + - Convert units between display and simulation units. + - + - Draw shapes. + - + - Draw joint connections. + - + - Draw axis aligned bounding boxes. + + - + - Draw center of mass frame. + - + - Draw useful debug data such as timings and number of bodies, joints, contacts and more. + - + - Draw contact points between colliding bodies. + - + - Draw contact normals. Need ContactPoints to be enabled first. + - + - Draws the vertices of polygons. + + + + - + - Draws the performance graph. + - + - Draws controllers. + - - Implement and register this class with a World to provide debug drawing of physics - entities in your game. - - + - Gets or sets the debug view flags. + - The flags. + + + - + - Append flags to the current flags. + - The flags. - + - Remove flags from the current flags. + - The flags. - + - Draw a closed polygon provided in CCW order. + - The vertices. - The vertex count. - The red value. - The blue value. - The green value. - + - Draw a solid closed polygon provided in CCW order. + - The vertices. - The vertex count. - The red value. - The blue value. - The green value. + - + + - Draw a circle. + - The center. - The radius. - The red value. - The blue value. - The green value. - + - Draw a solid circle. + - The center. - The radius. - The axis. - The red value. - The blue value. - The green value. - + - Draw a line segment. + - The start. - The end. - The red value. - The blue value. - The green value. - + - Draw a transform. Choose your own length scale. + - The transform. - + - The body type. + - + - Zero velocity, may be manually moved. Note: even static bodies have mass. + - + - Zero mass, non-zero velocity set by user, moved by solver + - + - Positive mass, non-zero velocity determined by forces, moved by solver + - - Scale the gravity applied to this body. - - + - Set the user data. Use this to store your application specific data. + - The user data. - + - Gets the total number revolutions the body has made. + - The revolutions. - + - Gets or sets the body type. - Warning: Calling this mid-update might cause a crash. + - The type of body. - + - Get or sets the linear velocity of the center of mass. + If it is -1, means all elements are active, otherwise, only the specific element is active - The linear velocity. - + - Gets or sets the angular velocity. Radians/second. + - The angular velocity. - + - Gets or sets the linear damping. + - The linear damping. - + - Gets or sets the angular damping. + - The angular damping. - + - Gets or sets a value indicating whether this body should be included in the CCD solver. + - true if this instance is included in CCD; otherwise, false. - + - You can disable sleeping on this body. If you disable sleeping, the - body will be woken. + - true if sleeping is allowed; otherwise, false. - + - Set the sleep state of the body. A sleeping body has very - low CPU cost. + - true if awake; otherwise, false. - + - Set the active state of the body. An inactive body is not - simulated and cannot be collided with or woken up. - If you pass a flag of true, all fixtures will be added to the - broad-phase. - If you pass a flag of false, all fixtures will be removed from - the broad-phase and all contacts will be destroyed. - Fixtures and joints are otherwise unaffected. You may continue - to create/destroy fixtures and joints on inactive bodies. - Fixtures on an inactive body are implicitly inactive and will - not participate in collisions, ray-casts, or queries. - Joints connected to an inactive body are implicitly inactive. - An inactive body is still owned by a b2World object and remains - in the body list. + - true if active; otherwise, false. - + - Set this body to have fixed rotation. This causes the mass - to be reset. + - true if it has fixed rotation; otherwise, false. - + - Gets all the fixtures attached to this body. + - The fixture list. - + - Get the list of all joints attached to this body. + - The joint list. - + - Get the list of all contacts attached to this body. - Warning: this list changes during the time step and you may - miss some collisions if you don't use ContactListener. + - The contact list. - + - Get the world body origin position. + - Return the world position of the body's origin. - + - Get the angle in radians. + - Return the current world rotation angle in radians. - + - Gets or sets a value indicating whether this body is static. + + Inspired by kim ki won (http://mypi.ruliweb.daum.net/mypi.htm?id=newtypekorea) - true if this instance is static; otherwise, false. - + - Gets or sets a value indicating whether this body is kinematic. + - true if this instance is kinematic; otherwise, false. - + - Gets or sets a value indicating whether this body ignores gravity. + - true if it ignores gravity; otherwise, false. - + - Get the world position of the center of mass. + - The world position. - + - Get the local position of the center of mass. + - The local position. - + - Gets or sets the mass. Usually in kilograms (kg). + - The mass. - + - Get or set the rotational inertia of the body about the local origin. usually in kg-m^2. + - The inertia. - - - Body objects can define which categories of bodies they wish to ignore CCD with. - This allows certain bodies to be configured to ignore CCD with objects that - aren't a penetration problem due to the way content has been prepared. - This is compared against the other Body's fixture CollisionCategories within World.SolveTOI(). + + + - + - Resets the dynamics of this body. - Sets torque, force and linear/angular velocity to 0 + + - + - Creates a fixture and attach it to this body. - If the density is non-zero, this function automatically updates the mass of the body. - Contacts are not created until the next time step. - Warning: This function is locked during callbacks. + - The shape. - Application specific data - - + - Destroy a fixture. This removes the fixture from the broad-phase and - destroys all contacts associated with this fixture. This will - automatically adjust the mass of the body if the body is dynamic and the - fixture has positive density. - All fixtures attached to a body are implicitly destroyed when the body is destroyed. - Warning: This function is locked during callbacks. + - The fixture to be removed. - + - Set the position of the body's origin and rotation. - This breaks any contacts and wakes the other bodies. - Manipulating a body's transform may cause non-physical behavior. + points must be in clockwise order, and must start from bottom-left if stretchUV is set. - The world position of the body's local origin. - The world rotation in radians. - + - Set the position of the body's origin and rotation. - This breaks any contacts and wakes the other bodies. - Manipulating a body's transform may cause non-physical behavior. + if you dont want to provide uv, leave it empty. - The world position of the body's local origin. - The world rotation in radians. - + - For teleporting a body without considering new contacts immediately. + - The position. - The angle. - + - Get the body transform for the body's origin. + - The transform of the body's origin. - + - Apply a force at a world point. If the force is not - applied at the center of mass, it will generate a torque and - affect the angular velocity. This wakes up the body. + - The world force vector, usually in Newtons (N). - The world position of the point of application. - + - Applies a force at the center of mass. + - The force. + - + - Applies a force at the center of mass. + - The force. + + - + - Apply a force at a world point. If the force is not - applied at the center of mass, it will generate a torque and - affect the angular velocity. This wakes up the body. + - The world force vector, usually in Newtons (N). - The world position of the point of application. - + - Apply a torque. This affects the angular velocity - without affecting the linear velocity of the center of mass. - This wakes up the body. + - The torque about the z-axis (out of the screen), usually in N-m. - + - Apply an impulse at a point. This immediately modifies the velocity. - This wakes up the body. + - The world impulse vector, usually in N-seconds or kg-m/s. - + - Apply an impulse at a point. This immediately modifies the velocity. - It also modifies the angular velocity if the point of application - is not at the center of mass. - This wakes up the body. + - The world impulse vector, usually in N-seconds or kg-m/s. - The world position of the point of application. - + - Apply an impulse at a point. This immediately modifies the velocity. - This wakes up the body. + - The world impulse vector, usually in N-seconds or kg-m/s. - + - Apply an impulse at a point. This immediately modifies the velocity. - It also modifies the angular velocity if the point of application - is not at the center of mass. - This wakes up the body. + - The world impulse vector, usually in N-seconds or kg-m/s. - The world position of the point of application. - + - Apply an angular impulse. + - The angular impulse in units of kg*m*m/s. - + - This resets the mass properties to the sum of the mass properties of the fixtures. - This normally does not need to be called unless you called SetMassData to override - the mass and you later want to reset the mass. + - + - Get the world coordinates of a point given the local coordinates. + - A point on the body measured relative the the body's origin. - The same point expressed in world coordinates. - + - Get the world coordinates of a point given the local coordinates. + - A point on the body measured relative the the body's origin. - The same point expressed in world coordinates. - + - Get the world coordinates of a vector given the local coordinates. - Note that the vector only takes the rotation into account, not the position. + - A vector fixed in the body. - The same vector expressed in world coordinates. - + - Get the world coordinates of a vector given the local coordinates. + - A vector fixed in the body. - The same vector expressed in world coordinates. - + - Gets a local point relative to the body's origin given a world point. - Note that the vector only takes the rotation into account, not the position. + - A point in world coordinates. - The corresponding local point relative to the body's origin. - + - Gets a local point relative to the body's origin given a world point. + - A point in world coordinates. - The corresponding local point relative to the body's origin. - + - Gets a local vector given a world vector. - Note that the vector only takes the rotation into account, not the position. + - A vector in world coordinates. - The corresponding local vector. - + - Gets a local vector given a world vector. - Note that the vector only takes the rotation into account, not the position. + - A vector in world coordinates. - The corresponding local vector. - + - Get the world linear velocity of a world point attached to this body. + - A point in world coordinates. - The world velocity of a point. - + - Get the world linear velocity of a world point attached to this body. + - A point in world coordinates. - The world velocity of a point. - + - Get the world velocity of a local point. + - A point in local coordinates. - The world velocity of a point. - + - Get the world velocity of a local point. + - A point in local coordinates. - The world velocity of a point. - + - This is used to prevent connected bodies from colliding. - It may lie, depending on the collideConnected flag. + - The other body. - - + - Makes a clone of the body. Fixtures and therefore shapes are not included. - Use DeepClone() to clone the body, as well as fixtures and shapes. + - - - + - Clones the body and all attached fixtures and shapes. Simply said, it makes a complete copy of the body. + - - - + - A type of body that supports multiple fixtures that can break apart. + - + - The force needed to break the body apart. - Default: 500 + - + - Fires when a contact is created + - + - The filter used by the contact manager. + - + - Fires when a contact is deleted + - + - Fires when the broadphase detects that two Fixtures are close to each other. + - + - Fires after the solver has run + - + - Fires before the solver runs + - + - A contact edge is used to connect bodies and contacts together - in a contact graph where each body is a node and each contact - is an edge. A contact edge belongs to a doubly linked list - maintained in each attached body. Each contact has two contact - nodes, one for each attached body. + + - + - The contact + - + - The next contact edge in the body's contact list + - + - Provides quick access to the other body attached. + - + - The previous contact edge in the body's contact list + + - + - The class manages contact between two shapes. A contact exists for each overlapping - AABB in the broad-phase (except if filtered). Therefore a contact object may exist - that has no contact points. + + + - + - Get the contact manifold. Do not modify the manifold unless you understand the - internals of Box2D. + + + + - - Get or set the desired tangent speed for a conveyor belt behavior. In meters per second. - - - Enable/disable this contact. This can be used inside the pre-solve - contact listener. The contact is only disabled for the current - time step (or sub-step in continuous collisions). - NOTE: If you are setting Enabled to a constant true or false, - use the explicit Enable() or Disable() functions instead to - save the CPU from doing a branch operation. - - + - Get the child primitive index for fixture A. + + 1---2 + | / | + 0---3 - The child index A. + - + - Get the child primitive index for fixture B. + - The child index B. + + - + - Determines whether this contact is touching. + - - true if this instance is touching; otherwise, false. - + + + - + - Gets the world manifold. + + + + - + - Update the contact manifold and touching status. - Note: do not assume the fixture AABBs are overlapping or are valid. + - The contact manager. + + + - + - Evaluate this contact with your own manifold and transforms. + - The manifold. - The first transform. - The second transform. + + - + - Evaluate the manifold with supplied transforms. This assumes - modest motion from the original state. This does not change the - point count, impulses, etc. The radii must come from the Shapes - that generated the manifold. + - The manifold. - The transform for A. - The radius for A. - The transform for B. - The radius for B. - World vector pointing from A to B - Torld contact point (point of intersection). + - + - This proxy is used internally to connect fixtures to the broad-phase. + + + - + - A fixture is used to attach a Shape to a body for collision detection. A fixture - inherits its transform from its parent. Fixtures hold additional non-geometric data - such as friction, collision filters, etc. - Fixtures are created via Body.CreateFixture. - Warning: You cannot reuse fixtures. + + - + - Fires after two shapes has collided and are solved. This gives you a chance to get the impact force. + + - + - Fires when two fixtures are close to each other. - Due to how the broadphase works, this can be quite inaccurate as shapes are approximated using AABBs. + - + - Fires when two shapes collide and a contact is created between them. - Note that the first fixture argument is always the fixture that the delegate is subscribed to. + - + - Fires when two shapes separate and a contact is removed between them. - Note: This can in some cases be called multiple times, as a fixture can have multiple contacts. - Note The first fixture argument is always the fixture that the delegate is subscribed to. + - + - Defaults to 0 - - If Settings.UseFPECollisionCategories is set to false: - Collision groups allow a certain group of objects to never collide (negative) - or always collide (positive). Zero means no collision group. Non-zero group - filtering always wins against the mask bits. - If Settings.UseFPECollisionCategories is set to true: - If 2 fixtures are in the same collision group, they will not collide. - + - Defaults to Category.All - The collision mask bits. This states the categories that this - fixture would accept for collision. - Use Settings.UseFPECollisionCategories to change the behavior. - + - The collision categories this fixture is a part of. - If Settings.UseFPECollisionCategories is set to false: - Defaults to Category.Cat1 - - If Settings.UseFPECollisionCategories is set to true: - Defaults to Category.All - + - Get the child Shape. You can modify the child Shape, however you should not change the - number of vertices because this will crash some collision caching mechanisms. + Whether to ignore Unity time scale. - The shape. - + - Gets or sets a value indicating whether this fixture is a sensor. + - true if this instance is a sensor; otherwise, false. - + - Get the parent body of this fixture. This is null if the fixture is not attached. + - The body. - + - Set the user data. Use this to store your application specific data. + - The user data. - + - Set the coefficient of friction. This will _not_ change the friction of - existing contacts. + - The friction. - + - Set the coefficient of restitution. This will _not_ change the restitution of - existing contacts. + - The restitution. - + - Gets a unique ID for this fixture. + - The fixture id. - + - Restores collisions between this fixture and the provided fixture. + - The fixture. + - + - Ignores collisions between this fixture and the provided fixture. + - The fixture. + - + - Determines whether collisions are ignored between this fixture and the provided fixture. + - The fixture. - - true if the fixture is ignored; otherwise, false. - - + - Contacts are persistant and will keep being persistant unless they are - flagged for filtering. - This methods flags all contacts associated with the body for filtering. + 从start帧开始,播放到end帧(-1表示结尾),重复times次(0表示无限循环),循环结束后,停止在endAt帧(-1表示参数end) + + + + + + + + + - + - Test a point for containment in this fixture. + 不参与剪裁 - A point in world coordinates. - - + - Cast a ray against this Shape. + - The ray-cast results. - The ray-cast input parameters. - Index of the child. - - + - Get the fixture's AABB. This AABB may be enlarge and/or stale. - If you need a more accurate AABB, compute it using the Shape and - the body transform. + 当Mesh更新时被调用 - The aabb. - Index of the child. - + - Only compares the values of this fixture, and not the attached shape or body. - This is used for deduplication in serialization only. + - + - Clones the fixture and attached shape onto the specified body. + - The body you wish to clone the fixture onto. - The cloned fixture. - + - This is an internal class. + + + - + - Maintains a fixed angle between two bodies + - + - Constructor for AngleJoint + - The first body - The second body - + - The desired angle between BodyA and BodyB + - + - Gets or sets the bias factor. - Defaults to 0.2 + + - + - Gets or sets the maximum impulse - Defaults to float.MaxValue + - + - Gets or sets the softness of the joint - Defaults to 0 + + - + - A distance joint rains two points on two bodies - to remain at a fixed distance from each other. You can view - this as a massless, rigid rod. + - + - This requires defining an - anchor point on both bodies and the non-zero length of the - distance joint. If you don't supply a length, the local anchor points - is used so that the initial configuration can violate the constraint - slightly. This helps when saving and loading a game. - @warning Do not use a zero or short length. + - The first body - The second body - The first body anchor - The second body anchor - Set to true if you are using world coordinates as anchors. - + - The local anchor point relative to bodyA's origin. + - + - The local anchor point relative to bodyB's origin. + - + - The natural length between the anchor points. - Manipulating the length can lead to non-physical behavior when the frequency is zero. + - + - The mass-spring-damper frequency in Hertz. A value of 0 - disables softness. + - + - The damping ratio. 0 = no damping, 1 = critical damping. + - + - Get the reaction force given the inverse time step. Unit is N. + - - - + - Get the reaction torque given the inverse time step. - Unit is N*m. This is always zero for a distance joint. + - - + + - + - A mouse joint is used to make a point on a body track a - specified world point. This a soft constraint with a maximum - force. This allows the constraint to stretch and without - applying huge forces. - NOTE: this joint is not documented in the manual because it was - developed to be used in the testbed. If you want to learn how to - use the mouse joint, look at the testbed. + + + /// + + - + - This requires a world target point, - tuning parameters, and the time step. + - The body. - The target. + + - + - The local anchor point on BodyA + + + - + - The maximum constraint force that can be exerted - to move the candidate body. Usually you will express - as some multiple of the weight (multiplier * mass * gravity). + + + + + + - + - The response speed. + - + - The damping ratio. 0 = no damping, 1 = critical damping. + - + - Friction joint. This is used for top-down friction. - It provides 2D translational friction and angular friction. + - + - Constructor for FrictionJoint. + - - - - Set to true if you are using world coordinates as anchors. - + - The local anchor point on BodyA + + + - + - The local anchor point on BodyB + + - + - The maximum friction force in N. + - + - The maximum friction torque in N-m. + - - - A gear joint is used to connect two joints together. - Either joint can be a revolute or prismatic joint. - You specify a gear ratio to bind the motions together: - - The ratio can be negative or positive. If one joint is a revolute joint - and the other joint is a prismatic joint, then the ratio will have units - of length or units of 1/length. + + - Warning: You have to manually destroy the gear joint if jointA or jointB is destroyed. - + - + - Requires two existing revolute or prismatic joints (any combination will work). - The provided joints must attach a dynamic body to a static body. + - The first joint. - The second joint. - The ratio. - The first body - The second body - + - The gear ratio. + - + - The first revolute/prismatic joint attached to the gear joint. + - + - The second revolute/prismatic joint attached to the gear joint. + - + - A joint edge is used to connect bodies and joints together - in a joint graph where each body is a node and each joint - is an edge. A joint edge belongs to a doubly linked list - maintained in each attached body. Each joint has two joint - nodes, one for each attached body. + + + + + + + + + - + - The joint. + + + - + - The next joint edge in the body's joint list. + + + + + + + + - + - Provides quick access to the other body attached. + + - + - The previous joint edge in the body's joint list. + + + + + + + - + - Indicate if this join is enabled or not. Disabling a joint - means it is still in the simulation, but inactive. + + + - + - Constructor for fixed joint + + + - + - Gets or sets the type of the joint. + - The type of the joint. + + + + + + + - + - Get the first body attached to this joint. + - + - Get the second body attached to this joint. + - + - Get the anchor point on bodyA in world coordinates. - On some joints, this value indicate the anchor point within the world. + - + - Get the anchor point on bodyB in world coordinates. - On some joints, this value indicate the anchor point within the world. + - + - Set the user data pointer. + - The data. - + - Set this flag to true if the attached bodies should collide. + - + - The Breakpoint simply indicates the maximum Value the JointError can be before it breaks. - The default value is float.MaxValue, which means it never breaks. + - + - Fires when the joint is broken. + - + - Get the reaction force on body at the joint anchor in Newtons. + - The inverse delta time. - + - Get the reaction torque on the body at the joint anchor in N*m. + - The inverse delta time. - + - Return true if the joint is a fixed type. + - + - Solves the position constraints. + - - returns true if the position errors are within tolerance. - + - A motor joint is used to control the relative motion - between two bodies. A typical usage is to control the movement - of a dynamic body with respect to the ground. + 绘制顺序 - + - Constructor for MotorJoint. + 可见性 - The first body - The second body - Set to true if you are using world coordinates as anchors. - + - The maximum amount of force that can be applied to BodyA + - + - The maximum amount of torque that can be applied to BodyA + - + - The linear (translation) offset. + 是否启用 - + - Get or set the angular offset. + 更新顺序 - + - A prismatic joint. This joint provides one degree of freedom: translation - along an axis fixed in bodyA. Relative rotation is prevented. You can - use a joint limit to restrict the range of motion and a joint motor to - drive the motion or to model joint friction. + - + - This requires defining a line of - motion using an axis and an anchor point. The definition uses local - anchor points and a local axis so that the initial configuration - can violate the constraint slightly. The joint translation is zero - when the local anchor points coincide in world space. Using local - anchors and a local axis helps when saving and loading a game. + - The first body. - The second body. - The first body anchor. - The second body anchor. - The axis. - Set to true if you are using world coordinates as anchors. - + - - - - - - + - The local anchor point on BodyA + - + - The local anchor point on BodyB + - + - Get the current joint translation, usually in meters. + - + + - + - Get the current joint translation speed, usually in meters per second. + - + - + - Is the joint limit enabled? + - true if [limit enabled]; otherwise, false. - + - Get the lower joint limit, usually in meters. + - - + - Get the upper joint limit, usually in meters. + - + + - + - Set the joint limits, usually in meters. + - The lower limit - The upper limit + - + - Is the joint motor enabled? + - true if [motor enabled]; otherwise, false. + - + - Set the motor speed, usually in meters per second. + - The speed. + + - + - Set the maximum motor force, usually in N. + - The force. + - + - Get the current motor impulse, usually in N. + - + - + - Gets the motor force. + - The inverse delta time + - + - The axis at which the joint moves. + - + - The axis in local coordinates relative to BodyA + - + - The reference angle. + - + - The pulley joint is connected to two bodies and two fixed world points. - The pulley supports a ratio such that: - - Yes, the force transmitted is scaled by the ratio. - Warning: the pulley joint can get a bit squirrelly by itself. They often - work better when combined with prismatic joints. You should also cover the - the anchor points with static shapes to prevent one side from going to zero length. - + - Constructor for PulleyJoint. + - The first body. - The second body. - The anchor on the first body. - The anchor on the second body. - The world anchor for the first body. - The world anchor for the second body. - The ratio. - Set to true if you are using world coordinates as anchors. - + - The local anchor point on BodyA + Base class for all kind of fonts. - + - The local anchor point on BodyB + The name of this font object. - + - Get the first world anchor. + Character info. - - + - Get the second world anchor. + - - + - Get the current length of the segment attached to body1. + - - + - Get the current length of the segment attached to body2. + - - + - The current length between the anchor point on BodyA and WorldAnchorA + Can this font be tinted? Will be true for dynamic font and fonts generated by BMFont. - + - The current length between the anchor point on BodyB and WorldAnchorB + - + - Get the pulley ratio. + The texture of this font object. - - + - A revolute joint constrains to bodies to share a common point while they - are free to rotate about the point. The relative rotation about the shared - point is the joint angle. You can limit the relative rotation with - a joint limit that specifies a lower and upper angle. You can use a motor - to drive the relative rotation about the shared point. A maximum motor torque - is provided so that infinite forces are not generated. + - + - Constructor of RevoluteJoint. + - The first body. - The second body. - The first body anchor. - The second anchor. - Set to true if you are using world coordinates as anchors. - + - Constructor of RevoluteJoint. + 代表图片资源url。 - The first body. - The second body. - The shared anchor. - - + - The local anchor point on BodyA + 图片宽度。不设置(0)则表示使用原始宽度。 - + - The local anchor point on BodyB + 图片高度。不设置(0)则表示使用原始高度。 - + - The referance angle computed as BodyB angle minus BodyA angle. + + + + - + - Get the current joint angle in radians. + + - + - Get the current joint angle speed in radians per second. + - + - Is the joint limit enabled? + - true if [limit enabled]; otherwise, false. + + - + - Get the lower joint limit in radians. + + - + - Get the upper joint limit in radians. + + + - + - Set the joint limits, usually in meters. + - The lower limit - The upper limit - + - Is the joint motor enabled? + - true if [motor enabled]; otherwise, false. - + - Get or set the motor speed in radians per second. + - + - Get or set the maximum motor torque, usually in N-m. + - + - Get or set the current motor impulse, usually in N-m. + - + - Gets the motor torque in N-m. + - The inverse delta time - + - A rope joint enforces a maximum distance between two points on two bodies. It has no other effect. - It can be used on ropes that are made up of several connected bodies, and if there is a need to support a heavy body. - This joint is used for stabiliation of heavy objects on soft constraint joints. - Warning: if you attempt to change the maximum length during the simulation you will get some non-physical behavior. - Use the DistanceJoint instead if you want to dynamically control the length. - + - Constructor for RopeJoint. + - The first body - The second body - The anchor on the first body - The anchor on the second body - Set to true if you are using world coordinates as anchors. - + - The local anchor point on BodyA + - + - The local anchor point on BodyB + 接收用户输入的文本控件。因为支持直接输入表情,所以从RichTextField派生。 - + - Get or set the maximum length of the rope. - By default, it is the distance between the two anchor points. + - + - Gets the state of the joint. + - + - A weld joint essentially glues two bodies together. A weld joint may - distort somewhat because the island constraint solver is approximate. - The joint is soft constraint based, which means the two bodies will move - relative to each other, when a force is applied. To combine two bodies - in a rigid fashion, combine the fixtures to a single body instead. - + - You need to specify an anchor point where they are attached. - The position of the anchor point is important for computing the reaction torque. + - The first body - The second body - The first body anchor. - The second body anchor. - Set to true if you are using world coordinates as anchors. - + - The local anchor point on BodyA + - + - The local anchor point on BodyB + - + - The bodyB angle minus bodyA angle in the reference state (radians). + - + - The frequency of the joint. A higher frequency means a stiffer joint, but - a too high value can cause the joint to oscillate. - Default is 0, which means the joint does no spring calculations. + - + - The damping on the joint. The damping is only used when - the joint has a frequency (> 0). A higher value means more damping. + - + - A wheel joint. This joint provides two degrees of freedom: translation - along an axis fixed in bodyA and rotation in the plane. You can use a - joint limit to restrict the range of motion and a joint motor to drive - the rotation or to model rotational friction. - This joint is designed for vehicle suspensions. + - + - Constructor for WheelJoint + - The first body - The second body - The anchor point - The axis - Set to true if you are using world coordinates as anchors. - + - The local anchor point on BodyA + - + - The local anchor point on BodyB + - + - The axis at which the suspension moves. + - + - The axis in local coordinates relative to BodyA + + + -1 means the rest count from start - + - The desired motor speed in radians per second. + + - + - The maximum motor torque, usually in N-m. + + - + - Suspension frequency, zero indicates no suspension + 通过本地坐标获得字符索引位置 + 本地坐标 + - + - Suspension damping ratio, one indicates critical damping + 获得字符的坐标。这个坐标是容器的坐标,不是文本里的坐标。 + + - + - Gets the translation along the axis + - + - Gets the angular velocity of the joint + - + - Enable/disable the joint motor. + - + - Gets the torque of the motor + - inverse delta time - + - This is an internal structure. + - + - Time step (Delta time) + - + - dt * inv_dt0 + - + - Inverse time step (0 if dt == 0). + - - This is an internal structure. - - - This is an internal structure. + + + + - - Solver Data + + + + - + - The world class manages all physics entities, dynamic simulation, - and asynchronous queries. + - + - Fires whenever a body has been added + - + - Fires whenever a body has been removed + - + - Fires whenever a fixture has been added + - + - Fires whenever a fixture has been removed + - + - Fires whenever a joint has been added + - + - Fires whenever a joint has been removed + - + - Fires every time a controller is added to the World. + 立刻重建文本 - + - Fires every time a controlelr is removed form the World. + + + + + + + - + - Initializes a new instance of the class. + 行的宽度 - + - Get the number of broad-phase proxies. + 行的高度 - The proxy count. - + - Change the global gravity vector. + 行内文本的高度 - The gravity. - + - Get the contact manager for testing. + 行的y轴位置 - The contact manager. - + - Get the world body list. + 行的y轴位置的备份 - Thehead of the world body list. - + - Get the world joint list. + - The joint list. + - + - Get the world contact list. With the returned contact, use Contact.GetNext to get - the next contact in the world list. A null contact indicates the end of the list. + - The head of the world contact list. + - + - If false, the whole simulation stops. It still processes added and removed geometries. + + - + - Add a rigid body. + - + - Destroy a rigid body. - Warning: This automatically deletes all associated shapes and joints. + - The body. + - + - Create a joint to constrain bodies together. This may cause the connected bodies to cease colliding. + - The joint. + - + - Destroy a joint. This may cause the connected bodies to begin colliding. + - The joint. - + - All adds and removes are cached by the World duing a World step. - To process the changes before the world updates again, call this method. + 字符索引 - + - Take a time step. This performs collision detection, integration, - and consraint solution. + 字符所在的行索引 - The amount of time to simulate, this should not vary. - + - Call this after you are done with time steps to clear the forces. You normally - call this after each call to Step, unless you are performing sub-steps. By default, - forces will be automatically cleared, so you don't need to call this function. + 字符的x偏移 - + - Query the world for all fixtures that potentially overlap the provided AABB. - Inside the callback: - Return true: Continues the query - Return false: Terminate the query - A user implemented callback class. - The aabb query box. - + - Query the world for all fixtures that potentially overlap the provided AABB. - Use the overload with a callback for filtering and better performance. + - The aabb query box. - A list of fixtures that were in the affected area. - + - Ray-cast the world for all fixtures in the path of the ray. Your callback - controls whether you get the closest point, any point, or n-points. - The ray-cast ignores shapes that contain the starting point. - Inside the callback: - return -1: ignore this fixture and continue - return 0: terminate the ray cast - return fraction: clip the ray to this point - return 1: don't clip the ray and continue - A user implemented callback class. - The ray starting point. - The ray ending point. - + - Returns a list of fixtures that are at the specified point. + - The point. - - - - Shift the world origin. Useful for large worlds. - The body shift formula is: position -= newOrigin - @param newOrigin the new origin with respect to the old origin - Warning: Calling this method mid-update might cause a crash. - + - This delegate is called when a contact is deleted + - + - This delegate is called when a contact is created + - + - Creates a capsule. - Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices) + - - + - Creates a rounded rectangle. - Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices) + - The world. - The width. - The height. - The x radius. - The y radius. - The segments. - The density. - The position. - - + - Creates a breakable body. You would want to remove collinear points before using this. + - The world. - The vertices. - The density. - The position. - - + - An easy to use factory for creating bodies + - + - An easy to use factory for using joints. + - + - Creates a revolute joint and adds it to the world + - - - - - + - + - Creates a rope joint and adds it to the world + + + - + - Creates a prismatic joint and adds it to the world + - - - - - - + - + - Creates a Wheel Joint and adds it to the world + - + - Creates an angle joint. + - The world. - The first body. - The second body. - - + - Creates a chain. + - The world. - The start. - The end. - The width. - The height. - if set to true [fix start]. - if set to true [fix end]. - The number of links. - The link density. - - + - If true, all collision callbacks have to return the same value, and agree - if there was a collision or not. Swtich this to false to revert to the - collision agreement used in FPE 3.3.x + / - + - Enabling diagnistics causes the engine to gather timing information. - You can see how much time it took to solve the contacts, solve CCD - and update the controllers. - NOTE: If you are using a debug view that shows performance counters, - you might want to enable this. + / - + - Set this to true to skip sanity checks in the engine. This will speed up the - tools by removing the overhead of the checks, but you will need to handle checks - yourself where it is needed. + - + - The number of velocity iterations used in the solver. + - + - The number of position iterations used in the solver. + - + - Enable/Disable Continuous Collision Detection (CCD) + - + - If true, it will run a GiftWrap convex hull on all polygon inputs. - This makes for a more stable engine when given random input, - but if speed of the creation of polygons are more important, - you might want to set this to false. + - + - The number of velocity iterations in the TOI solver + - + - The number of position iterations in the TOI solver + - + - Maximum number of sub-steps per contact in continuous physics simulation. + + + - + - Enable/Disable warmstarting + + + - + - Enable/Disable sleeping + + + - + - The maximum number of vertices on a convex polygon. + + + - + - Farseer Physics Engine has a different way of filtering fixtures than Box2d. - We have both FPE and Box2D filtering in the engine. If you are upgrading - from earlier versions of FPE, set this to true and DefaultFixtureCollisionCategories - to Category.All. + - + - This is used by the Fixture constructor as the default value - for Fixture.CollisionCategories member. Note that you may need to change this depending - on the setting of UseFPECollisionCategories, above. + + - + - This is used by the Fixture constructor as the default value - for Fixture.CollidesWith member. + + + - + - This is used by the Fixture constructor as the default value - for Fixture.IgnoreCCDWith member. + + + - + - The maximum number of contact points between two convex shapes. - DO NOT CHANGE THIS VALUE! + + + - + - This is used to fatten AABBs in the dynamic tree. This allows proxies - to move by a small amount without triggering a tree adjustment. - This is in meters. + + + + - + - This is used to fatten AABBs in the dynamic tree. This is used to predict - the future position based on the current displacement. - This is a dimensionless multiplier. + + + - + - A small length used as a collision and constraint tolerance. Usually it is - chosen to be numerically significant, but visually insignificant. + + + + + - + - A small angle used as a collision and constraint tolerance. Usually it is - chosen to be numerically significant, but visually insignificant. + + + + - + - The radius of the polygon/edge shape skin. This should not be modified. Making - this smaller means polygons will have an insufficient buffer for continuous collision. - Making it larger may create artifacts for vertex collision. + + + + - + - Maximum number of contacts to be handled to solve a TOI impact. + - + - A velocity threshold for elastic collisions. Any collision with a relative linear - velocity below this threshold will be treated as inelastic. + - + - The maximum linear position correction used when solving constraints. This helps to - prevent overshoot. + + - + - The maximum angular position correction used when solving constraints. This helps to - prevent overshoot. + + - + - This scale factor controls how fast overlap is resolved. Ideally this would be 1 so - that overlap is removed in one time step. However using values close to 1 often lead - to overshoot. + + - + - The time that a body must be still before it will go to sleep. + + - + - A body cannot sleep if its linear velocity is above this tolerance. + + - + - A body cannot sleep if its angular velocity is above this tolerance. + + - + - The maximum linear velocity of a body. This limit is very large and is used - to prevent numerical problems. You shouldn't need to adjust this. + + - + - The maximum angular velocity of a body. This limit is very large and is used - to prevent numerical problems. You shouldn't need to adjust this. + + - + - Defines the maximum number of iterations made by the GJK algorithm. + - + - This is only for debugging the solver + - + - By default, forces are cleared automatically after each call to Step. - The default behavior is modified with this setting. - The purpose of this setting is to support sub-stepping. Sub-stepping is often used to maintain - a fixed sized time step under a variable frame-rate. - When you perform sub-stepping you should disable auto clearing of forces and instead call - ClearForces after all sub-steps are complete in one pass of your game loop. + - + - Friction mixing law. Feel free to customize this. + - The friction1. - The friction2. - + - Restitution mixing law. Feel free to customize this. + - The restitution1. - The restitution2. + - + + + - + + - + - - - + + - + + - + - + - + - + x position in stage coordinates. - + - + y position in stage coordinates. - + - + - - - + - - - - + - - - + - - - + - + -1-none,0-left,1-right,2-middle - - - + - - - + - - - + - - - - + - - - + - - - - + - + - + Changes the saturation. Typical values are in the range (-1, 1). + Values above zero will raise, values below zero will reduce the saturation. + '-1' will produce a grayscale image. - - - + - + - + Changes the contrast. Typical values are in the range (-1, 1). + Values above zero will raise, values below zero will reduce the contrast. - - + - + - + Changes the brightness. Typical values are in the range (-1, 1). + Values above zero will make the image brighter, values below zero will make it darker. - - + - + + + Changes the hue of the image. Typical values are in the range (-1, 1). + + + + - + Tints the image in a certain color, analog to what can be done in Adobe Animate. - - + the RGB color with which the image should be tinted. + the intensity with which tinting should be applied. Range (0, 1). - + - + Changes the filter matrix back to the identity matrix - - - + + - + - + - - - + - - - + - + - + Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected - + - + This class contains a C# port of the easing equations created by Robert Penner (http://robertpenner.com/easing). - + - + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in: accelerating from zero velocity. + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + + The eased value. + - + - + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity. + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + + The eased value. + - + - + Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration. + + Current time (in frames or seconds). + + + Expected easing duration (in frames or seconds). + + + The eased value. + - + - + - + - + - + - + - + - + + - + + + - + + + + - + + + - + - + - + + - + - + + + - + - + + + - + + + + + + - + + - + + - + - - - - + - - + + + + - + + + + + - + + + + + - + + + + + - + - - + + + + - + + + + + - + + + - + - - + + + + - + + + - + + + + - + + - + + + - + + + + - + + + - - - This is the pivot position - - - + + + + - + - + - + + - - - 进入绘画模式,整个对象将画到一张RenderTexture上,然后这种贴图将代替原有的显示内容。 - 可以在onPaint回调里对这张纹理进行进一步操作,实现特殊效果。 - 可能有多个地方要求进入绘画模式,这里用requestorId加以区别,取值是1、2、4、8、16以此类推。1024内内部保留。用户自定义的id从1024开始。 - - 请求者id - 纹理四周的留空。如果特殊处理后的内容大于原内容,那么这里的设置可以使纹理扩大。 - - - - 离开绘画模式 - - - - + - - - 将整个显示对象(如果是容器,则容器包含的整个显示列表)静态化,所有内容被缓冲到一张纹理上。 - DC将保持为1。CPU消耗将降到最低。但对象的任何变化不会更新。 - 当cacheAsBitmap已经为true时,再次调用cacheAsBitmap=true将会刷新一次。 - - - + + - + + - + - - - - - - 将舞台坐标转换为本地坐标 - - - - - - - 将本地坐标转换为舞台坐标 - - - + - + - - null if to world space - - + - - null if to world space + - - - - - - - - FairyBatch is for internal use. - - - + - + + + - + - + + + - + - + + - + + + - + + + - + + + + - + - + - - + - + + + - + + + - + - - - + + - + + + + - + - + + + - + - - - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + - + - + - + - + - If it is -1, means all elements are active, otherwise, only the specific element is active + - + - + - + + + - + + - + + - + - + - + - + - + - + - + - + - + - Inspired by kim ki won (http://mypi.ruliweb.daum.net/mypi.htm?id=newtypekorea) - + - + - + + + - + - + - + Controller class. + 控制器类。控制器的创建和设计需通过编辑器完成,不建议使用代码创建。 + 最常用的方法是通过selectedIndex获得或改变控制器的活动页面。如果要获得控制器页面改变的通知,使用onChanged事件。 - + - + Name of the controller + 控制器名称。 - + - + When controller page changed. + 当控制器活动页面改变时,此事件被触发。 - + - + Current page index. + 获得或设置当前活动页面索引。 - - + - + Set current page index, no onChanged event. + 通过索引设置当前活动页面,和selectedIndex的区别在于,这个方法不会触发onChanged事件。 + Page index - + - + Set current page by name, no onChanged event. + 通过页面名称设置当前活动页面,和selectedPage的区别在于,这个方法不会触发onChanged事件。 + Page name - + - points must be in clockwise order, and must start from bottom-left if stretchUV is set. + Current page name. + 获得当前活动页面名称 - + - if you dont want to provide uv, leave it empty. + Previouse page index. + 获得上次活动页面索引 - + - + Previous page name. + 获得上次活动页面名称。 - + - + Page count of this controller. + 获得页面数量。 - + - + Get page name by an index. + 通过页面索引获得页面名称。 + Page index + Page Name - + - + Get page id by name - + + - + - + Add a new page to this controller. - - + Page name - + - + Add a new page to this controller at a certain index. + Page name + Insert position - + - + Remove a page. + Page name - + - + Removes a page at a certain index. + - + - + Remove all pages. - + - + Check if the controller has a page. + Page name. + - + - + Helper for drag and drop. + 这是一个提供特殊拖放功能的功能类。与GObject.draggable不同,拖动开始后,他使用一个替代的图标作为拖动对象。 + 当玩家释放鼠标/手指,目标组件会发出一个onDrop事件。 - + - + Loader object for real dragging. + 用于实际拖动的Loader对象。你可以根据实际情况设置loader的大小,对齐等。 - + - + Is dragging? + 返回当前是否正在拖动。 - + - + Start dragging. + 开始拖动。 + Source object. This is the object which initiated the dragging. + Icon to be used as the dragging sign. + Custom data. You can get it in the onDrop event data. + Copy the touchId from InputEvent to here, if has one. - + - + Cancel dragging. + 取消拖动。 - + - + - + - + The Image will be filled Horizontally - + - + The Image will be filled Vertically. - + - + The Image will be filled Radially with the radial center in one of the corners. - + - + The Image will be filled Radially with the radial center in one of the edges. - + - + The Image will be filled Radially with the radial center at the center. - + - + - + - + - + - + - + GButton class. - + - + The button will be in down status in these pages. - + - + Play sound when button is clicked. - + - + Volume of the click sound. (0-1) - + - + For radio or checkbox. if false, the button will not change selected status on click. Default is true. + 如果为true,对于单选和多选按钮,当玩家点击时,按钮会自动切换状态。设置为false,则不会。默认为true。 - + - + Show a popup on click. + 可以为按钮设置一个关联的组件,当按钮被点击时,此组件被自动弹出。 - + - + Dispatched when the button status was changed. + 如果为单选或多选按钮,当按钮的选中状态发生改变时,此事件触发。 - + - + Icon of the button. - + - + Title of the button - + - + Same of the title. - - + - + Icon value on selected status. - + - + Title value on selected status. - + - + Title color. - + - - + - - - + - + If the button is in selected status. - - - - + - - 1---2 - | / | - 0---3 + Button mode. - + - + - + A controller is connected to this button, the activate page of this controller will change while the button status changed. + 对应编辑器中的单选控制器。 - - - + - + Simulates a click on this button. + 模拟点击这个按钮。 - - - + If the down effect will simulate too. - + - - - + - + - + GComboBox class. - - - - + - + Visible item count of the drop down list. - - - + - - + - + Dispatched when selection was changed. - - - + - + Icon of the combobox. - - + - + Title of the combobox. - - + - + Same of the title. - + - + Text color - + - + - + Items to build up drop down list. - + - + Values, should be same size of the items. - + - + Selected index. - + - Whether to ignore Unity time scale. + - + - + Selected value. - + - + + - + - + Component - + - + Root container. - + - + Content container. If the component is not clipped, then container==rootContainer. - + - + ScrollPane of the component. If the component is not scrollable, the value is null. - - + - + Dispatched when an object was dragged and dropped to this component. - - + - + If true, mouse/touch events cannot pass through the empty area of the component. Default is true. - + - 从start帧开始,播放到end帧(-1表示结尾),重复times次(0表示无限循环),循环结束后,停止在endAt帧(-1表示参数end) + Add a child to the component. It will be at the frontmost position. - - - - + A child object + GObject - + - + Adds a child to the component at a certain index. + A child object + Index + GObject - + - 不参与剪裁 + Removes a child from the component. If the object is not a child, nothing happens. + A child object + GObject - + - + Removes a child from the component. If the object is not a child, nothing happens. + A child object + If true, the child will be disposed right away. + GObject - + - 当Mesh更新时被调用 + Removes a child at a certain index. Children above the child will move down. + Index + GObject - + - + Removes a child at a certain index. Children above the child will move down. + Index + If true, the child will be disposed right away. + GObject - + - + Remove all children. - + - + Removes a range of children from the container (endIndex included). - - + Begin index. + End index.(Included). + If true, the child will be disposed right away. - + - + Returns a child object at a certain index. If index out of bounds, exception raised. + Index + A child object. - + - + Returns a child object with a certain name. + Name + A child object. Null if not found. - + - + Returns a visible child object with a certain name. + Name + A child object. Null if not found. - + - + Returns a child object belong to a group with a certain name. - + A group object + Name + A child object. Null if not found. - + - + Returns a copy of all children with an array. + An array contains all children - + - + Returns the index of a child within the container, or "-1" if it is not found. - + A child object + Index of the child. -1 If not found. - + - + Moves a child to a certain index. Children at and after the replaced position move up. + A Child + Index - + - + Moves a child to a certain position which is in front of the child previously at given index. + 与SetChildIndex不同的是,如果child原来在index的前面,那么child插入的位置是index-1,即保证排在原来占据index的对象的前面。 + + - + - + Swaps the indexes of two children. + A child object + A child object - + - + Swaps the indexes of two children. + index of first child + index of second child - + - + The number of children of this component. - + + + - + - + Adds a controller to the container. + Controller object - + - + Returns a controller object at a certain index. + Index + Controller object. - + - + Returns a controller object with a certain name. - - + Name + Controller object. Null if not found. - + - + Removes a controller from the container. - - /// - - + Controller object. - + - + Returns controller list. - - + Controller list - + - + Returns a transition object at a certain index. - - + Index + transition object. - + - + Returns a transition object at a certain name. - - - - - + Name + Transition Object - + - + The mask of the component. - + - + - + Test if a child is in view. + A child object + True if in view - + - + Notify the component the bounds should recaculate. - + - + Make sure the bounds of the component is correct. + Bounds of the component is not updated on every changed. For example, you add a new child to the list, children in the list will be rearranged in next frame. + If you want to access the correct child position immediatelly, call this function first. - - - + - + Viwe port width of the container. - - + - + View port height of the container. - + - + Method for extensions to override - + - + 每帧调用的一个回调。如果你要override,请记住以下两点: + 1、记得调用base.onUpdate; + 2、不要在方法里进行任何会更改显示列表的操作,例如AddChild、RemoveChild、visible等。 - + - + Gear is a connection between object and controller. - + - + Gear is a connection between object and controller. - + - + Gear is a connection between object and controller. - + - + Controller object. - + - + Call when controller active page changed. - + - + Call when object's properties changed. - - - - + - + Use tween to apply change. - - - + - + Ease type. - - - - - - - - + - + Tween duration in seconds. - - + - + Tween delay in seconds. - - - - - - - + - + Gear is a connection between object and controller. - - - + - + Gear is a connection between object and controller. - - - + - + Pages involed in this gear. - - - - - - - - + - + Gear is a connection between object and controller. - + - + Gear is a connection between object and controller. - + - + Gear is a connection between object and controller. - + - + - + - + - + - + + - + - + Gear is a connection between object and controller. - + - + GGraph class. + 对应编辑器里的图形对象。图形有两个用途,一是用来显示简单的图形,例如矩形等;二是作为一个占位的用途, + 可以将本对象替换为其他对象,或者在它的前后添加其他对象,相当于一个位置和深度的占位;还可以直接将内容设置 + 为原生对象。 - + - + Replace this object to another object in the display list. + 在显示列表中,将指定对象取代这个图形对象。这个图形对象相当于一个占位的用途。 + Target object. - + - 绘制顺序 + Add another object before this object. + 在显示列表中,将另一个对象插入到这个对象的前面。 + Target object. - + - 可见性 + Add another object after this object. + 在显示列表中,将另一个对象插入到这个对象的后面。 + Target object. - + - + 设置内容为一个原生对象。这个图形对象相当于一个占位的用途。 + 原生对象 - + - + - 是否启用 + Get the shape object. It can be used for drawing. + 获取图形的原生对象,可用于绘制图形。 - + - 更新顺序 + Draw a rectangle. + 画矩形。 + Width + Height + Line size + Line color + Fill color - + + + + + - + + + + - + + + + + - + - + GGroup class. + 组对象,对应编辑器里的高级组。 - + - + Group layout type. - + - - - + - - + - + Update group bounds. + 更新组的包围. - + - + GImage class. - + - + Color of the image. - - - + - + Flip type. - + - + - + Fill method. - + - + - + Fill origin. - - + + + + + - + - + Fill clockwise if true. - - + - + Fill amount. (0~1) - - + - + Set texture directly. The image wont own the texture. - - + - + GLabel class. - + - + Icon of the label. - + - + Title of the label. - + - + Same of the title. - + - + If title is input text. - + - Base class for all kind of fonts. + Title color of the label - + - The name of this font object. + - + - Character info. + - + + - + - + Callback function when an item is needed to update its look. + Item index. + Item object. - + + + - + - Can this font be tinted? Will be true for dynamic font and fonts generated by BMFont. + GList class. - + - + Resource url of the default item. - + - The texture of this font object. + 如果true,当item不可见时自动折叠,否则依然占位 - + - + List selection mode + + + + + + Callback function when an item is needed to update its look. + + + + + Callback funtion to return item resource url. - + - + - 代表图片资源url。 + Dispatched when a list item being clicked. - + - 图片宽度。不设置(0)则表示使用原始宽度。 + Dispatched when a list item being clicked with right button. - + - 图片高度。不设置(0)则表示使用原始高度。 + List layout type. - + - - - - + - - + - + - - - + - - + - - - + - + If the item will resize itself to fit the list width/height. - + - + + + - + - + Add a item to list, same as GetFromPool+AddChild + Item object - + - + Add a item to list, same as GetFromPool+AddChild + Item resource url + Item object - + + + + - + + + + - + + - + + - + - 接收用户输入的文本控件。因为支持直接输入表情,所以从RichTextField派生。 + - + + + - + - + - + + - + + + - + + - + - + - + - + - + + - + - + Resize to list size to fit specified item count. + If list layout is single column or flow horizontally, the height will change to fit. + If list layout is single row or flow vertically, the width will change to fit. + Item count - + - + Resize to list size to fit specified item count. + If list layout is single column or flow horizontally, the height will change to fit. + If list layout is single row or flow vertically, the width will change to fit. + >Item count + If the result size if smaller than minSize, then use minSize. - + - + - + Scroll the list to make an item with certain index visible. - - -1 means the rest count from start + Item index - + - + Scroll the list to make an item with certain index visible. - + Item index + True to scroll smoothly, othewise immdediately. - + - + Scroll the list to make an item with certain index visible. - + Item index + True to scroll smoothly, othewise immdediately. + If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view. - + - 通过本地坐标获得字符索引位置 + 获取当前点击哪个item - 本地坐标 - - + - 获得字符的坐标。这个坐标是容器的坐标,不是文本里的坐标。 + Get first child in view. - - + - + Set the list to be virtual list. + 设置列表为虚拟列表模式。在虚拟列表模式下,列表不会为每一条列表数据创建一个实体对象,而是根据视口大小创建最小量的显示对象,然后通过itemRenderer指定的回调函数设置列表数据。 + 在虚拟模式下,你不能通过AddChild、RemoveChild等方式管理列表,只能通过设置numItems设置列表数据的长度。 + 如果要刷新列表,可以通过重新设置numItems,或者调用RefreshVirtualList完成。 + ‘单行’或者‘单列’的列表布局可支持不等高的列表项目。 + 除了‘页面’的列表布局,其他布局均支持使用不同资源构建列表项目,你可以在itemProvider里返回。如果不提供,默认使用defaultItem。 - + - + Set the list to be virtual list, and has loop behavior. - + - + Set the list item count. + If the list is not virtual, specified number of items will be created. + If the list is virtual, only items in view will be created. - + - + GLoader class - + - + Display an error sign if the loader fails to load the content. + UIConfig.loaderErrorSign muse be set. - + - + - + - + - + - + - + - + - + - + - + + - + - - - 立刻重建文本 - - - + - - - - - - - - - - 行的宽度 - - + - 行的高度 + - + - 行内文本的高度 + - + - 行的y轴位置 + - + - 行的y轴位置的备份 + - + - - + - - + - - + - - + - + GMovieClip class. - - + - - + - + - 字符索引 + - + - 字符所在的行索引 + - + - 字符的x偏移 + - + - + - + - + + - + + - + - + Play from the start to end, repeat times, set to endAt on complete. + 从start帧开始,播放到end帧(-1表示结尾),重复times次(0表示无限循环),循环结束后,停止在endAt帧(-1表示参数end) + Start frame + End frame. -1 indicates the last frame. + Repeat times. 0 indicates infinite loop. + Stop frame. -1 indicates to equal to the end parameter. - + - + GObject的id,仅作为内部使用。与name不同,id值是不会相同的。 + id is for internal use only. - + - + Name of the object. - + - + User defined data. - + - + The source width of the object. - + - + The source height of the object. - + - + The initial width of the object. - - + - + The initial height of the object. - - - + - - + - + - + - + - / + Relations Object. - + - / + Restricted range of dragging. - + - + Parent object. - + - + Lowlevel display object. - + - + 当前全局正在被拖动的对象 - + - + - + Dispatched when the object or its child was clicked. - + - + Dispatched when the object or its child was clicked by right mouse button. Web only. - + - + Dispatched when the finger touched the object or its child just now. - + - - - + - + Dispatched when the finger was lifted from the screen or from the mouse button. - - - + - + The cursor or finger hovers over an object. - - - + - + The cursor or finger leave an object. - - - + - + Dispatched when the object was added to the stage. - + - + Dispatched when the object was removed from the stage. - - + - + Dispatched on key pressed when the object is in focus. - - - + - + Dispatched when links in the object or its child was clicked. - - - + - + Dispatched when the object was moved. - - - + - + Dispatched when the object was resized. - - - - + - + Dispatched when drag start. - - - + - + Dispatched when dragging. - - - - - + - + Dispatched when drag end. - - - - + - - - - + - + The x coordinate of the object relative to the local coordinates of the parent. - + - + The y coordinate of the object relative to the local coordinates of the parent. - + - + The z coordinate of the object relative to the local coordinates of the parent. - - + - + The x and y coordinates of the object relative to the local coordinates of the parent. - - + - + The x,y,z coordinates of the object relative to the local coordinates of the parent. - - + - + change the x and y coordinates of the object relative to the local coordinates of the parent. - + x value. + y value. - + - + + + - + - + change the x,y,z coordinates of the object relative to the local coordinates of the parent. - + x value. + y value. + z value. - + - + Set the object in middle of the parent or GRoot if the parent is not set. - - + - + Set the object in middle of the parent or GRoot if the parent is not set. - + Add relations to maintain the center state. - + - + 设置对象为全屏大小(逻辑屏幕)。 - + - + The width of the object in pixels. - + - + The height of the object in pixels. - + - + The size of the object in pixels. - - + - + actualWidth = width * scalex - - - + - + actualHeight = height * scaleY - - - + - + Change size. - + Width value. + Height value. - + - + Change size. - - + Width value. + Height value. + If pivot is set, the object's positon will change when its size change. Set ignorePivot=true to keep the position. - + - - + - + - + The horizontal scale factor. '1' means no scale, cannt be negative. - + - x position in stage coordinates. + The vertical scale factor. '1' means no scale, cannt be negative. - + - y position in stage coordinates. + The scale factor. - + - + Change the scale factor. + The horizontal scale factor. + The vertical scale factor - + - + - + The x coordinate of the object's origin in its own coordinate space. - + - + The y coordinate of the object's origin in its own coordinate space. - + - + The x and y coordinates of the object's origin in its own coordinate space. - + - -1-none,0-left,1-right,2-middle + Change the x and y coordinates of the object's origin in its own coordinate space. + x value in ratio + y value in ratio - + - + Change the x and y coordinates of the object's origin in its own coordinate space. + x value in ratio + y value in ratio + If use the pivot as the anchor position - + - + If the object can touch or click. GImage/GTextField is not touchable even it is true. - + - + If true, apply a grayed effect on this object. - + - + Enabled is shortcut for grayed and !touchable combination. - + - + The rotation around the z axis of the object in degrees. - + - + The rotation around the x axis of the object in degrees. - + - Changes the saturation. Typical values are in the range (-1, 1). - Values above zero will raise, values below zero will reduce the saturation. - '-1' will produce a grayscale image. + The rotation around the y axis of the object in degrees. - - + - Changes the contrast. Typical values are in the range (-1, 1). - Values above zero will raise, values below zero will reduce the contrast. + The opacity of the object. 0 = transparent, 1 = opaque. - - + - Changes the brightness. Typical values are in the range (-1, 1). - Values above zero will make the image brighter, values below zero will make it darker. + The visibility of the object. An invisible object will be untouchable. - - - - - Changes the hue of the image. Typical values are in the range (-1, 1). - - - + - Tints the image in a certain color, analog to what can be done in Adobe Animate. + By default(when sortingOrder==0), object added to component is arrange by the added roder. + The bigger is the sorting order, the object is more in front. - the RGB color with which the image should be tinted. - the intensity with which tinting should be applied. Range (0, 1). - + - Changes the filter matrix back to the identity matrix + If the object can be focused? - + - + If the object is focused. Focused object can receive key events. - - + - + Request focus on this object. - + - + Tooltips of this object. UIConfig.tooltipsWin must be set first. - + - + - + - Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected + If the object has lowlevel displayobject and the displayobject has a container parent? - + - This class contains a C# port of the easing equations created by Robert Penner (http://robertpenner.com/easing). + If the object is on stage. - + - Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in: accelerating from zero velocity. + Resource url of this object. - - Current time (in frames or seconds). - - - Expected easing duration (in frames or seconds). - - - The eased value. - - + - Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity. + Gear to xy controller. - - Current time (in frames or seconds). - - - Expected easing duration (in frames or seconds). - - - The eased value. - - + - Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration. + Gear to size controller. - - Current time (in frames or seconds). - - - Expected easing duration (in frames or seconds). - - - The eased value. - - + - + Gear to look controller. - + + + - + + + + - + + + - + - + - + Group belonging to. - + - + - - + - - - + - - - - + - - - + + - + - + - - + - + Transforms a point from the local coordinate system to global (Stage) coordinates. + + - + - + Transforms a point from global (Stage) coordinates to the local coordinate system. - + - + + + - + - + - + - + Transforms a point from the local coordinate system to GRoot coordinates. - - - - - + + + - + - + Transforms a point from the GRoot coordinate to local coordinates system. - + + + - - + + + + - + + + + - + - + GObjectPool is use for GObject pooling. - - - - - + - + Callback function when a new object is creating. - - - - + - + - + Callback function when a new object is creating. - - - - - + - + 需要设置一个manager,加入池里的对象都成为这个manager的孩子 - - - - - + - + Dispose all objects in the pool. - - - - - + - - - - - + - + - + - - - - + - + - + GProgressBar class. - - - + - - - - + - - + - - - + - + 动态改变进度值。 - - - + + - + - - + - + - + GRichTextField class. - - - - + - + - + - + GRoot is a topmost component of UI display list.You dont need to create GRoot. It is created automatically. - - + - + This is called after screen size changed. - + - + Display a window. - + - + - + Call window.Hide + 关闭一个窗口。将调用Window.Hide方法。 - + - + + + Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. + 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。 + + + + - + Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. + 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。 - + + True to dispose the window. - + - + 将一个窗口提到所有窗口的最前面 + - + - + Display a modal layer and a waiting sign in the front. + 显示一个半透明层和一个等待标志在最前面。半透明层的颜色可以通过UIConfig.modalLayerColor设定。 + 等待标志的资源可以通过UIConfig.globalModalWaiting。等待标志组件会设置为屏幕大小,请内部做好关联。 - - - + - + Hide modal layer and waiting sign. - + - + Close all windows except modal windows. - - - + - + Close all windows. - + - + Get window on top. - - + - - - + - + Return true if a modal window is on stage. - - - + - + Return true if modal waiting layer is on stage. - - - + + + Get current touch target. (including hover) + + + - - + - + - + Show a popup object. + 显示一个popup。 + popup的特点是点击popup对象外的区域,popup对象将自动消失。 + - + - + Show a popup object along with the specific target object. + 显示一个popup。将popup显示在指定对象的上边或者下边。 + popup的特点是点击popup对象外的区域,popup对象将自动消失。 - - + + - + - + Show a popup object along with the specific target object. + 显示一个popup。将popup显示在指定对象的上方或者下方。 + popup的特点是点击popup对象外的区域,popup对象将自动消失。 - - + + + True to display downwards, false to display upwards, null to display automatically. - + - + + + - + - + If a popup is showing, then close it; otherwise, open it. - - + - + - - - + + - + + + + - + - + Close all popups. - - - + - + Close a popup. + - + - - - + - - + - + - - + - + - - - + - - - + - + GScrollBar class. - - - + - - + + - + - + - + - + - + - + - + - + - - - + - - + - - + - + - + + + + - + - + - + - + - + - + - + - + - + - - - + - + - Controller class. - 控制器类。控制器的创建和设计需通过编辑器完成,不建议使用代码创建。 - 最常用的方法是通过selectedIndex获得或改变控制器的活动页面。如果要获得控制器页面改变的通知,使用onChanged事件。 + - + - Name of the controller - 控制器名称。 + - + - When controller page changed. - 当控制器活动页面改变时,此事件被触发。 + - + - Current page index. - 获得或设置当前活动页面索引。 + - + - Set current page index, no onChanged event. - 通过索引设置当前活动页面,和selectedIndex的区别在于,这个方法不会触发onChanged事件。 + - Page index - + - Set current page by name, no onChanged event. - 通过页面名称设置当前活动页面,和selectedPage的区别在于,这个方法不会触发onChanged事件。 + - Page name - + - Current page name. - 获得当前活动页面名称 + - + - Previouse page index. - 获得上次活动页面索引 + - + - Previous page name. - 获得上次活动页面名称。 + - + - Page count of this controller. - 获得页面数量。 + - + - Get page name by an index. - 通过页面索引获得页面名称。 + - Page index - Page Name - + - Get page id by name + - - - + - Add a new page to this controller. + - Page name - + - Add a new page to this controller at a certain index. + - Page name - Insert position - + - Remove a page. + - Page name - + - Removes a page at a certain index. + - - + - Remove all pages. + - + - Check if the controller has a page. + - Page name. - + + - + - Helper for drag and drop. - 这是一个提供特殊拖放功能的功能类。与GObject.draggable不同,拖动开始后,他使用一个替代的图标作为拖动对象。 - 当玩家释放鼠标/手指,目标组件会发出一个onDrop事件。 + + - + - Loader object for real dragging. - 用于实际拖动的Loader对象。你可以根据实际情况设置loader的大小,对齐等。 + - + - Is dragging? - 返回当前是否正在拖动。 + - + - Start dragging. - 开始拖动。 + - Source object. This is the object which initiated the dragging. - Icon to be used as the dragging sign. - Custom data. You can get it in the onDrop event data. - Copy the touchId from InputEvent to here, if has one. - + - Cancel dragging. - 取消拖动。 + - + - + - + - The Image will be filled Horizontally + - + - The Image will be filled Vertically. + - + - The Image will be filled Radially with the radial center in one of the corners. + + - + - The Image will be filled Radially with the radial center in one of the edges. + - + - The Image will be filled Radially with the radial center at the center. + - + - + - + - + - + - + - GButton class. + - + - The button will be in down status in these pages. + + - + - Play sound when button is clicked. + + + + - + - Volume of the click sound. (0-1) + + + + - + - For radio or checkbox. if false, the button will not change selected status on click. Default is true. - 如果为true,对于单选和多选按钮,当玩家点击时,按钮会自动切换状态。设置为false,则不会。默认为true。 + + + + + - + - Show a popup on click. - 可以为按钮设置一个关联的组件,当按钮被点击时,此组件被自动弹出。 + + + + + - + - Dispatched when the button status was changed. - 如果为单选或多选按钮,当按钮的选中状态发生改变时,此事件触发。 + - + - Icon of the button. + + + - + - Title of the button + + + - + - Same of the title. + + + - + - Icon value on selected status. + + + - + - Title value on selected status. + + + - + - Title color. + + + - + + + - + + + - + - If the button is in selected status. + - + - Button mode. + - - + - A controller is connected to this button, the activate page of this controller will change while the button status changed. - 对应编辑器中的单选控制器。 + - + - Simulates a click on this button. - 模拟点击这个按钮。 + - If the down effect will simulate too. - + - - + - GComboBox class. + + + - + - Visible item count of the drop down list. + - + + + - + - Dispatched when selection was changed. + + + + - + - Icon of the combobox. + + + - + - Title of the combobox. + + + - + - Same of the title. + + - + - Text color + - + + - + - Items to build up drop down list. + - + - Values, should be same size of the items. + + + + - + - Selected index. + - + - + - Selected value. + - + - + - - + - Component + - + - Root container. + - + - Content container. If the component is not clipped, then container==rootContainer. + - + - ScrollPane of the component. If the component is not scrollable, the value is null. + - + - Dispatched when an object was dragged and dropped to this component. + + + - + - If true, mouse/touch events cannot pass through the empty area of the component. Default is true. + + + - + - Add a child to the component. It will be at the frontmost position. + - A child object - GObject - + - Adds a child to the component at a certain index. + - A child object - Index - GObject + + - + - Removes a child from the component. If the object is not a child, nothing happens. + - A child object - GObject - + - Removes a child from the component. If the object is not a child, nothing happens. + 当前被拖拽的滚动面板。同一时间只能有一个在进行此操作。 - A child object - If true, the child will be disposed right away. - GObject - + - Removes a child at a certain index. Children above the child will move down. + - Index - GObject - + - Removes a child at a certain index. Children above the child will move down. + Dispatched when scrolling. + 在滚动时派发该事件。 - Index - If true, the child will be disposed right away. - GObject - + - Remove all children. + 在滚动结束时派发该事件。 - + - Removes a range of children from the container (endIndex included). + 向下拉过上边缘后释放则派发该事件。 - Begin index. - End index.(Included). - If true, the child will be disposed right away. - + - Returns a child object at a certain index. If index out of bounds, exception raised. + 向上拉过下边缘后释放则派发该事件。 - Index - A child object. - + - Returns a child object with a certain name. + - Name - A child object. Null if not found. - + - Returns a visible child object with a certain name. + - Name - A child object. Null if not found. - + - Returns a child object belong to a group with a certain name. + - A group object - Name - A child object. Null if not found. - + - Returns a copy of all children with an array. + - An array contains all children - + - Returns the index of a child within the container, or "-1" if it is not found. + - A child object - Index of the child. -1 If not found. - + - Moves a child to a certain index. Children at and after the replaced position move up. + 滚动到达边缘时是否允许回弹效果。 - A Child - Index - + - Moves a child to a certain position which is in front of the child previously at given index. - 与SetChildIndex不同的是,如果child原来在index的前面,那么child插入的位置是index-1,即保证排在原来占据index的对象的前面。 + 是否允许拖拽内容区域进行滚动。 - - - + - Swaps the indexes of two children. + 是否允许惯性滚动。 - A child object - A child object - + - Swaps the indexes of two children. + 是否允许在左/上边缘显示虚化效果。 - index of first child - index of second child - + - The number of children of this component. + 当调用ScrollPane.scrollUp/Down/Left/Right时,或者点击滚动条的上下箭头时,滑动的距离。 + 鼠标滚轮触发一次滚动的距离设定为defaultScrollStep*2 - + - + 滚动位置是否保持贴近在某个元件的边缘。 - - - + - Adds a controller to the container. + 是否页面滚动模式。 - Controller object - + - Returns a controller object at a certain index. + - Index - Controller object. - + - Returns a controller object with a certain name. + 是否允许使用鼠标滚轮进行滚动。 - Name - Controller object. Null if not found. - + - Removes a controller from the container. + 当处于惯性滚动时减速的速率。默认值是UIConfig.defaultScrollDecelerationRate。 + 越接近1,减速越慢,意味着滑动的时间和距离更长。 - Controller object. - + - Returns controller list. + 当前X轴滚动位置百分比,0~1(包含)。 - Controller list - + - Returns a transition object at a certain index. + 设置当前X轴滚动位置百分比,0~1(包含)。 - Index - transition object. + + 是否使用缓动到达目标。 - + - Returns a transition object at a certain name. + 当前Y轴滚动位置百分比,0~1(包含)。 - Name - Transition Object - + - The mask of the component. + 设置当前Y轴滚动位置百分比,0~1(包含)。 + + 是否使用缓动到达目标。 - + - + 当前X轴滚动位置,值范围是viewWidth与contentWidth之差。 - + - Test if a child is in view. + 设置当前X轴滚动位置。 - A child object - True if in view + + 是否使用缓动到达目标。 - + - Notify the component the bounds should recaculate. + 当前Y轴滚动位置,值范围是viewHeight与contentHeight之差。 - + - Make sure the bounds of the component is correct. - Bounds of the component is not updated on every changed. For example, you add a new child to the list, children in the list will be rearranged in next frame. - If you want to access the correct child position immediatelly, call this function first. + 设置当前Y轴滚动位置。 + + 是否使用缓动到达目标。 - + - Viwe port width of the container. + 返回当前滚动位置是否在最下边。 - + - View port height of the container. + 返回当前滚动位置是否在最右边。 - + - Method for extensions to override + 如果处于分页模式,返回当前在X轴的页码。 - + - 每帧调用的一个回调。如果你要override,请记住以下两点: - 1、记得调用base.onUpdate; - 2、不要在方法里进行任何会更改显示列表的操作,例如AddChild、RemoveChild、visible等。 + 如果处于分页模式,可设置X轴的页码。 + + 是否使用缓动到达目标。 - + - Gear is a connection between object and controller. + 如果处于分页模式,返回当前在Y轴的页码。 - + - Gear is a connection between object and controller. + 如果处于分页模式,可设置Y轴的页码。 + + 是否使用缓动到达目标。 - + - Gear is a connection between object and controller. + 这个值与PosX不同在于,他反映的是实时位置,而PosX在有缓动过程的情况下只是终值。 - + - Controller object. + 这个值与PosY不同在于,他反映的是实时位置,而PosY在有缓动过程的情况下只是终值。 - + - Call when controller active page changed. + 显示内容宽度。 - + - Call when object's properties changed. + 显示内容高度。 - + - Use tween to apply change. + 显示区域宽度。 - + - Ease type. + 显示区域高度。 - + - Tween duration in seconds. + - + - Tween delay in seconds. + + - + - Gear is a connection between object and controller. + - + - Gear is a connection between object and controller. + + - + - Pages involed in this gear. + - + - Gear is a connection between object and controller. + + + - + - Gear is a connection between object and controller. + - + - Gear is a connection between object and controller. + + + - + - + + + - + - + + + - + + obj can be any object on stage, not limited to the direct child of this container. - + - + obj can be any object on stage, not limited to the direct child of this container. + If moving to target position with animation - + - Gear is a connection between object and controller. + + obj can be any object on stage, not limited to the direct child of this container. + If moving to target position with animation + If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view. - + - GGraph class. - 对应编辑器里的图形对象。图形有两个用途,一是用来显示简单的图形,例如矩形等;二是作为一个占位的用途, - 可以将本对象替换为其他对象,或者在它的前后添加其他对象,相当于一个位置和深度的占位;还可以直接将内容设置 - 为原生对象。 + + Rect in local coordinates + If moving to target position with animation + If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view. - + - Replace this object to another object in the display list. - 在显示列表中,将指定对象取代这个图形对象。这个图形对象相当于一个占位的用途。 + - Target object. + obj must be the direct child of this container + - + - Add another object before this object. - 在显示列表中,将另一个对象插入到这个对象的前面。 + 当滚动面板处于拖拽滚动状态或即将进入拖拽状态时,可以调用此方法停止或禁止本次拖拽。 - Target object. - + - Add another object after this object. - 在显示列表中,将另一个对象插入到这个对象的后面。 + 设置Header固定显示。如果size为0,则取消固定显示。 - Target object. + Header显示的大小 - + - 设置内容为一个原生对象。这个图形对象相当于一个占位的用途。 + 设置Footer固定显示。如果size为0,则取消固定显示。 - 原生对象 + - + - + 内部使用。由虚拟列表调用。在滚动时修改显示内容的大小,需要进行修正,避免滚动跳跃。 + + + + - + - Get the shape object. It can be used for drawing. - 获取图形的原生对象,可用于绘制图形。 + 对当前的滚动位置进行循环滚动边界检查。当到达边界时,回退一半内容区域(循环滚动内容大小通常是真实内容大小的偶数倍)。 + - + - Draw a rectangle. - 画矩形。 + 对目标位置进行循环滚动边界检查。当到达边界时,回退一半内容区域(循环滚动内容大小通常是真实内容大小的偶数倍)。 - Width - Height - Line size - Line color - Fill color + - + - + 从oldPos滚动至pos,调整pos位置对齐页面、对齐item等(如果需要)。 - - - - + + - + - + 从oldPos滚动至pos,调整目标位置到对齐页面。 - - - + + + + - + - + 根据当前速度,计算滚动的目标位置,以及到达时间。 - - - - + + - + - GGroup class. - 组对象,对应编辑器里的高级组。 + 根据修改后的tweenChange重新计算减速时间。 - + - Group layout type. + - + - + - + - Update group bounds. - 更新组的包围. + 动效的名称。在编辑器里设定。 - + - GImage class. + - + - Color of the image. + + - + - Flip type. + - + + + - + - Fill method. + - + + + + + - + - Fill origin. + - - - - - - + - Fill clockwise if true. + + - + - Fill amount. (0~1) + + + + - + - Set texture directly. The image wont own the texture. + + - + - GLabel class. + 设置动效是否自动播放。 + + + - + - Icon of the label. + - + - Title of the label. + + + - + - Same of the title. + + - + - If title is input text. + - + - Title color of the label + + + - + + + - + - + - + + - + - Callback function when an item is needed to update its look. + - Item index. - Item object. + + - + - + - + - GList class. + - + - Resource url of the default item. + - + - 如果true,当item不可见时自动折叠,否则依然占位 + - + - List selection mode + - - + - Callback function when an item is needed to update its look. + - + - Callback funtion to return item resource url. + - + - + - Dispatched when a list item being clicked. + - + - Dispatched when a list item being clicked with right button. + + - + - List layout type. + - + - + - + + + - + + + + - + + + - + + + - + - If the item will resize itself to fit the list width/height. + + + - + + + - + - + - + - Add a item to list, same as GetFromPool+AddChild + - Item object + - + - Add a item to list, same as GetFromPool+AddChild + - Item resource url - Item object + - + - - + - - - + + - + - + + - + - - + - + - + TreeView使用的List对象 - - - + - + TreeView的顶层节点,这是个虚拟节点,也就是他不会显示出来。 - + - + TreeView每级的缩进,单位像素。 - + - + 当TreeNode需要创建对象的显示对象时回调 - - + - + 当TreeNode需要更新时回调 - - - + - + 当TreeNode即将展开或者收缩时回调。可以在回调中动态增加子节点。 - - + - + 点击任意TreeNode时触发 - + - + 右键点击任意TreeNode时触发 - + + - + + - + - + - + - Resize to list size to fit specified item count. - If list layout is single column or flow horizontally, the height will change to fit. - If list layout is single row or flow vertically, the width will change to fit. + - Item count + + - + - Resize to list size to fit specified item count. - If list layout is single column or flow horizontally, the height will change to fit. - If list layout is single row or flow vertically, the width will change to fit. + - >Item count - If the result size if smaller than minSize, then use minSize. + - + - + - Scroll the list to make an item with certain index visible. + - Item index + + - + - Scroll the list to make an item with certain index visible. + - Item index - True to scroll smoothly, othewise immdediately. + - + - Scroll the list to make an item with certain index visible. + - Item index - True to scroll smoothly, othewise immdediately. - If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view. + - + - 获取当前点击哪个item + + - + - Get first child in view. + - + - + - Set the list to be virtual list. - 设置列表为虚拟列表模式。在虚拟列表模式下,列表不会为每一条列表数据创建一个实体对象,而是根据视口大小创建最小量的显示对象,然后通过itemRenderer指定的回调函数设置列表数据。 - 在虚拟模式下,你不能通过AddChild、RemoveChild等方式管理列表,只能通过设置numItems设置列表数据的长度。 - 如果要刷新列表,可以通过重新设置numItems,或者调用RefreshVirtualList完成。 - ‘单行’或者‘单列’的列表布局可支持不等高的列表项目。 - 除了‘页面’的列表布局,其他布局均支持使用不同资源构建列表项目,你可以在itemProvider里返回。如果不提供,默认使用defaultItem。 + + - + - Set the list to be virtual list, and has loop behavior. + + - + - Set the list item count. - If the list is not virtual, specified number of items will be created. - If the list is virtual, only items in view will be created. + + + - + - GLoader class + + - + - Display an error sign if the loader fails to load the content. - UIConfig.loaderErrorSign muse be set. + + - + + - + + - + + + + - + + - + + - + - + Global configs. These options should be set before any UI construction. - + - + Dynamic Font Support. + set defaultFont to system font name(or names joint with comma). e.g. defaultFont="Microsoft YaHei, SimHei" - + - + Resource using in Window.ShowModalWait for locking the window. - + - + Resource using in GRoot.ShowModalWait for locking the screen. - + - + When a modal window is in front, the background becomes dark. - + - + Default button click sound. - - + - + Default button click sound volume. - + - + Resource url of horizontal scrollbar - + - + Resource url of vertical scrollbar - + - + Scrolling step in pixels + 当调用ScrollPane.scrollUp/Down/Left/Right时,或者点击滚动条的上下箭头时,滑动的距离。 + 鼠标滚轮触发一次滚动的距离设定为defaultScrollStep*2 - + - + Deceleration ratio of scrollpane when its in touch dragging. + 当手指拖动并释放滚动区域后,内容会滑动一定距离后停下,这个速率就是减速的速率。 + 越接近1,减速越慢,意味着滑动的时间和距离更长。 + 这个是全局设置,也可以通过ScrollPane.decelerationRate进行个性设置。 - + - + Scrollbar display mode. Recommended 'Auto' for mobile and 'Visible' for web. - + - + Allow dragging anywhere in container to scroll. - + - + The "rebound" effect in the scolling container. + + + + + Resources url of PopupMenu. - + - + Resource url of menu seperator. - + - + In case of failure of loading content for GLoader, use this sign to indicate an error. - + - GMovieClip class. + Resource url of tooltips. - + - + The number of visible items in ComboBox. - + - + Pixel offsets of finger to trigger scrolling - + - + Pixel offsets of finger to trigger dragging - + - + Pixel offsets of mouse pointer to trigger dragging. - + - + Allow softness on top or left side for scrollpane. - + - + When click the window, brings to front automatically. - + - + - + - - + + + if RenderTexture using in paiting mode has depth support. + + + - - + - Play from the start to end, repeat times, set to endAt on complete. - 从start帧开始,播放到end帧(-1表示结尾),重复times次(0表示无限循环),循环结束后,停止在endAt帧(-1表示参数end) + - Start frame - End frame. -1 indicates the last frame. - Repeat times. 0 indicates infinite loop. - Stop frame. -1 indicates to equal to the end parameter. - + - GObject的id,仅作为内部使用。与name不同,id值是不会相同的。 - id is for internal use only. + - + - Name of the object. + - + - User defined data. + - + - The source width of the object. + Set content scale factor. + Design resolution of x axis. + Design resolution of y axis. - + - The source height of the object. + Set content scale factor. + Design resolution of x axis. + Design resolution of y axis. + Match mode. - + - The initial width of the object. + - + - The initial height of the object. + - + + + - + + + - + + - + + - + - Relations Object. + + + - + - Restricted range of dragging. + + + - + - Parent object. + Package id. It is generated by the Editor, or set by customId. - + - Lowlevel display object. + Package name. - + - 当前全局正在被拖动的对象 + The path relative to the content folder. - + - + Return a UIPackage with a certain id. + ID of the package. + UIPackage - + - Dispatched when the object or its child was clicked. + Return a UIPackage with a certain name. + Name of the package. + UIPackage - + - Dispatched when the object or its child was clicked by right mouse button. Web only. + Add a UI package from a path relative to Unity Resources path. + Path relative to resources path. + UIPackage - + - Dispatched when the finger touched the object or its child just now. + Remove a package. All resources in this package will be disposed. + + - + - + - Dispatched when the finger was lifted from the screen or from the mouse button. + + - + - The cursor or finger hovers over an object. + Create a UI object. + Package name. + Resource name. + A UI object. - + - The cursor or finger leave an object. + Create a UI object. + Package name. + Resource name. + Custom implementation of this object. + A UI object. - + - Dispatched when the object was added to the stage. + Create a UI object. + Resource url. + A UI object. - + - Dispatched when the object was removed from the stage. + Create a UI object. + Resource url. + Custom implementation of this object. + A UI object. - + - Dispatched on key pressed when the object is in focus. + Get a asset with a certain name. + Package name. + Resource name. + If resource is atlas, returns NTexture; If resource is sound, returns AudioClip. - + - Dispatched when links in the object or its child was clicked. + Get a asset with a certain name. + Resource url. + If resource is atlas, returns NTexture; If resource is sound, returns AudioClip. - + - Dispatched when the object was moved. + Get url of an item in package. + Package name. + Resource name. + Url. - + - Dispatched when the object was resized. + 将'ui://包名/组件名'转换为以内部id表达的url格式。如果传入的url本身就是内部id格式,则直接返回。 + 同时这个方法还带格式检测,如果传入不正确的url,会返回null。 + + - + - Dispatched when drag start. + Set strings source. + - + - Dispatched when dragging. + Set a custom id for package, then you can use it in GetById. - + - Dispatched when drag end. + 获得本包依赖的包的id列表 - + - + - The x coordinate of the object relative to the local coordinates of the parent. + + + - + - The y coordinate of the object relative to the local coordinates of the parent. + + + + - + - The z coordinate of the object relative to the local coordinates of the parent. + + + - + - The x and y coordinates of the object relative to the local coordinates of the parent. + Window class. + 窗口使用前首先要设置窗口中需要显示的内容,这通常是在编辑器里制作好的,可以直接使用Window.contentPane进行设置。 + 建议把设置contentPane等初始化操作放置到Window.onInit方法中。 + 另外,FairyGUI还提供了一套机制用于窗口动态创建。动态创建是指初始时仅指定窗口需要使用的资源,等窗口需要显示时才实际开始构建窗口的内容。 + 首先需要在窗口的构造函数中调用Window.addUISource。这个方法需要一个IUISource类型的参数,而IUISource是一个接口, + 用户需要自行实现载入相关UI包的逻辑。当窗口第一次显示之前,IUISource的加载方法将会被调用,并等待载入完成后才返回执行Window.OnInit,然后窗口才会显示。 + + 如果你需要窗口显示时播放动画效果,那么覆盖doShowAnimation编写你的动画代码,并且在动画结束后调用onShown。覆盖onShown编写其他需要在窗口显示时处理的业务逻辑。 + 如果你需要窗口隐藏时播放动画效果,那么覆盖doHideAnimation编写你的动画代码,并且在动画结束时调用Window.hideImmediately(注意不是直接调用onHide!)。覆盖onHide编写其他需要在窗口隐藏时处理的业务逻辑。 - + - The x,y,z coordinates of the object relative to the local coordinates of the parent. + - + - change the x and y coordinates of the object relative to the local coordinates of the parent. + Set a UISource to this window. It must call before the window is shown. When the window is first time to show, + UISource.Load is called. Only after all UISource is loaded, the window will continue to init. + 为窗口添加一个源。这个方法建议在构造函数调用。当窗口第一次显示前,UISource的Load方法将被调用,然后只有所有的UISource + 都ready后,窗口才会继续初始化和显示。 - x value. - y value. + - + - - - - + - change the x,y,z coordinates of the object relative to the local coordinates of the parent. + - x value. - y value. - z value. - + - Set the object in middle of the parent or GRoot if the parent is not set. + - + - Set the object in middle of the parent or GRoot if the parent is not set. + - Add relations to maintain the center state. - + - 设置对象为全屏大小(逻辑屏幕)。 + - + - The width of the object in pixels. + - + - The height of the object in pixels. + - + - The size of the object in pixels. + + - + - actualWidth = width * scalex + - + - actualHeight = height * scaleY + Hide window immediately, no OnHide will be called. - + - Change size. + Make the window be center of the screen. - Width value. - Height value. + + Add relations to ensure keeping center on screen size changed. - + - Change size. + Switch show and hide status. - Width value. - Height value. - If pivot is set, the object's positon will change when its size change. Set ignorePivot=true to keep the position. - + - + - - - The horizontal scale factor. '1' means no scale, cannt be negative. - - - - - The vertical scale factor. '1' means no scale, cannt be negative. - - - - - The scale factor. - - - + - Change the scale factor. + - The horizontal scale factor. - The vertical scale factor - + - + - The x coordinate of the object's origin in its own coordinate space. + - + - The y coordinate of the object's origin in its own coordinate space. + Display a modal waiting sign in the front. + 显示一个等待标志在最前面。等待标志的资源可以通过UIConfig.windowModalWaiting。等待标志组件会设置为屏幕大小,请内部做好关联。 + 还可以设定一个requestingCmd作为等待的命令字,在CloseModalWait里传入相同的命令字ModalWait将结束,否则CloseModalWait无效。 + - + - The x and y coordinates of the object's origin in its own coordinate space. + + - + - Change the x and y coordinates of the object's origin in its own coordinate space. + Close modal waiting. If rquestingCmd is equal to the value you transfer in ShowModalWait, mowal wait will be closed. + Otherwise, this function has no effect. + 关闭模式等待。如果requestingCmd和ShowModalWait传入的不相同,则这个函数没有任何动作,立即返回。 - x value in ratio - y value in ratio + + - + - Change the x and y coordinates of the object's origin in its own coordinate space. + - x value in ratio - y value in ratio - If use the pivot as the anchor position - + - If the object can touch or click. GImage/GTextField is not touchable even it is true. + - + - If true, apply a grayed effect on this object. + - + - Enabled is shortcut for grayed and !touchable combination. + - + - The rotation around the z axis of the object in degrees. + - + - The rotation around the x axis of the object in degrees. + - + - The rotation around the y axis of the object in degrees. + - + - The opacity of the object. 0 = transparent, 1 = opaque. + - + - The visibility of the object. An invisible object will be untouchable. + - + - By default(when sortingOrder==0), object added to component is arrange by the added roder. - The bigger is the sorting order, the object is more in front. + - + - If the object can be focused? + - + - If the object is focused. Focused object can receive key events. + + + + - + - Request focus on this object. + - + - Tooltips of this object. UIConfig.tooltipsWin must be set first. + - + - + - + - If the object has lowlevel displayobject and the displayobject has a container parent? + + + - + - If the object is on stage. + + - + - Resource url of this object. + + + + + - + - Gear to xy controller. + + + - + - Gear to size controller. + + - + - Gear to look controller. + + - + - - + - + - - - + - + - - + - + + - + - Group belonging to. + + - + + - + + - + + - + + - + + + - + - + - + + - + + - + - Transforms a point from the local coordinate system to global (Stage) coordinates. + - + + - + - Transforms a point from global (Stage) coordinates to the local coordinate system. + - - - + - - - + - - - + - Transforms a point from the local coordinate system to GRoot coordinates. + - - - - + - Transforms a point from the GRoot coordinate to local coordinates system. + - - - - + - - - - + - - - - + - GObjectPool is use for GObject pooling. + - + - Callback function when a new object is creating. + - - + - Callback function when a new object is creating. + - + - 需要设置一个manager,加入池里的对象都成为这个manager的孩子 + - + - Dispose all objects in the pool. + - + - + - - - + - - + - GProgressBar class. + - + - + - + - + + - 动态改变进度值。 + - - - + - - + - GRichTextField class. + Determines whether floats are normalized to zero. If the minimal value is flushed to zero we use a slightly bigger number for Epsilon instead. - + - + - + A simplest and readonly XML class - + - GRoot is a topmost component of UI display list.You dont need to create GRoot. It is created automatically. + - + - This is called after screen size changed. + - + - Display a window. + - - + - Call window.Hide - 关闭一个窗口。将调用Window.Hide方法。 + - - - - Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. - 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。 - - + + @interval in seconds + @repeat 0 indicate loop infinitely, otherwise the run count + - + - Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. - 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。 + Cancels a ticket. + You should cancel your ticket when you close the game or leave a server. - - True to dispose the window. - + - 将一个窗口提到所有窗口的最前面 + We're trying to connect! - - + - Display a modal layer and a waiting sign in the front. - 显示一个半透明层和一个等待标志在最前面。半透明层的颜色可以通过UIConfig.modalLayerColor设定。 - 等待标志的资源可以通过UIConfig.globalModalWaiting。等待标志组件会设置为屏幕大小,请内部做好关联。 + Client is connected. They move from connecting to Connections - + - Hide modal layer and waiting sign. + The connection has been closed remotely or disconnected locally. Check data.State for details. - + - Close all windows except modal windows. + Default behaviour is to accept every connection - + - Close all windows. + Client is connected. They move from connecting to Connections - + - Get window on top. + The connection has been closed remotely or disconnected locally. Check data.State for details. - - - + + High level connection status + + + Dummy value used to indicate an error condition in the API. + Specified connection doesn't exist or has already been closed. + + + We are trying to establish whether peers can talk to each other, + whether they WANT to talk to each other, perform basic auth, + and exchange crypt keys. - + - For connections on the "client" side (initiated locally): + We're in the process of trying to establish a connection. + Depending on the connection type, we might not know who they are. + Note that it is not possible to tell if we are waiting on the + network to complete handshake packets, or for the application layer + to accept the connection. + + - For connections on the "server" side (accepted through listen socket): + We have completed some basic handshake and the client has presented + some proof of identity. The connection is ready to be accepted + using AcceptConnection(). + + In either case, any unreliable packets sent now are almost certain + to be dropped. Attempts to receive packets are guaranteed to fail. + You may send messages if the send mode allows for them to be queued. + but if you close the connection before the connection is actually + established, any queued messages will be discarded immediately. + (We will not attempt to flush the queue and confirm delivery to the + remote host, which ordinarily happens when a connection is closed.) - + + Some connection types use a back channel or trusted 3rd party + for earliest communication. If the server accepts the connection, + then these connections switch into the rendezvous state. During this + state, we still have not yet established an end-to-end route (through + the relay network), and so if you send any messages unreliable, they + are going to be discarded. + + + We've received communications from our peer (and we know + who they are) and are all good. If you close the connection now, + we will make our best effort to flush out any reliable sent data that + has not been acknowledged by the peer. (But note that this happens + from within the application process, so unlike a TCP connection, you are + not totally handing it off to the operating system to deal with it.) + + + Connection has been closed by our peer, but not closed locally. + The connection still exists from an API perspective. You must close the + handle to free up resources. If there are any messages in the inbound queue, + you may retrieve them. Otherwise, nothing may be done with the connection + except to close it. + + This stats is similar to CLOSE_WAIT in the TCP state machine. + + + A disruption in the connection has been detected locally. (E.g. timeout, + local internet connection disrupted, etc.) + + The connection still exists from an API perspective. You must close the + handle to free up resources. + + Attempts to send further messages will fail. Any remaining received messages + in the queue are available. + + + We've disconnected on our side, and from an API perspective the connection is closed. + No more data may be sent or received. All reliable data has been flushed, or else + we've given up and discarded it. We do not yet know for sure that the peer knows + the connection has been closed, however, so we're just hanging around so that if we do + get a packet from them, we can send them the appropriate packets so that they can + know why the connection was closed (and not have to rely on a timeout, which makes + it appear as if something is wrong). + + + We've disconnected on our side, and from an API perspective the connection is closed. + No more data may be sent or received. From a network perspective, however, on the wire, + we have not yet given any indication to the peer that the connection is closed. + We are in the process of flushing out the last bit of reliable data. Once that is done, + we will inform the peer that the connection has been closed, and transition to the + FinWait state. + + Note that no indication is given to the remote host that we have closed the connection, + until the data has been flushed. If the remote host attempts to send us data, we will + do whatever is necessary to keep the connection alive until it can be closed properly. + But in fact the data will be discarded, since there is no way for the application to + read it back. Typically this is not a problem, as application protocols that utilize + the lingering functionality are designed for the remote host to wait for the response + before sending any more data. + + + Connection is completely inactive and ready to be destroyed + + - Return true if a modal window is on stage. + The score is just a simple numerical value - + - Return true if modal waiting layer is on stage. + The score represents a time, in seconds - + - Get current touch target. (including hover) + The score represents a time, in milliseconds - + - + The top-score is the lowest number - - - + - Show a popup object. - 显示一个popup。 - popup的特点是点击popup对象外的区域,popup对象将自动消失。 + The top-score is the highest number - - + + + Send the message unreliably. Can be lost. Messages *can* be larger than a + single MTU (UDP packet), but there is no retransmission, so if any piece + of the message is lost, the entire message will be dropped. + + The sending API does have some knowledge of the underlying connection, so + if there is no NAT-traversal accomplished or there is a recognized adjustment + happening on the connection, the packet will be batched until the connection + is open again. + + + - Show a popup object along with the specific target object. - 显示一个popup。将popup显示在指定对象的上边或者下边。 - popup的特点是点击popup对象外的区域,popup对象将自动消失。 + Disable Nagle's algorithm. + By default, Nagle's algorithm is applied to all outbound messages. This means + that the message will NOT be sent immediately, in case further messages are + sent soon after you send this, which can be grouped together. Any time there + is enough buffered data to fill a packet, the packets will be pushed out immediately, + but partially-full packets not be sent until the Nagle timer expires. - - - + - Show a popup object along with the specific target object. - 显示一个popup。将popup显示在指定对象的上方或者下方。 - popup的特点是点击popup对象外的区域,popup对象将自动消失。 + If the message cannot be sent very soon (because the connection is still doing some initial + handshaking, route negotiations, etc), then just drop it. This is only applicable for unreliable + messages. Using this flag on reliable messages is invalid. - - - True to display downwards, false to display upwards, null to display automatically. - + + Reliable message send. Can send up to 0.5mb in a single message. + Does fragmentation/re-assembly of messages under the hood, as well as a sliding window for + efficient sends of large chunks of data. + + - + True if unlocked - - - - - + - If a popup is showing, then close it; otherwise, open it. + Should hold the unlock time if State is true - - + - + Gets the icon of the achievement. This can return a null image even though the image exists if the image + hasn't been downloaded by Steam yet. You can use GetIconAsync if you want to wait for the image to be downloaded. - - - + - + Gets the icon of the achievement, waits for it to load if we have to - - - - + - Close all popups. + Returns the fraction (0-1) of users who have unlocked the specified achievement, or -1 if no data available. - + - Close a popup. + Make this achievement earned - - + - + Reset this achievement to not achieved - + - + Accept an incoming connection that has been received on a listen socket. - - + - + Disconnects from the remote host and invalidates the connection handle. Any unread data on the connection is discarded.. + reasonCode is defined and used by you. - - + - + Get/Set connection user data - + - + A name for the connection, used mostly for debugging - + - GScrollBar class. + Flush any messages waiting on the Nagle timer and send them at the next transmission opportunity (often that means right now). - + - + the name of a leaderboard - - - + - + Submit your score and replace your old score even if it was better - + - + Submit your new score, but won't replace your high score if it's lower - + - + Attaches a piece of user generated content the user's entry on a leaderboard - + - + Used to query for a sequential range of leaderboard entries by leaderboard Sort. - + - + Used to retrieve leaderboard entries relative a user's entry. If there are not enough entries in the leaderboard + before or after the user's entry, Steam will adjust the range to try to return the number of entries requested. + For example, if the user is #1 on the leaderboard and start is set to -2, end is set to 2, Steam will return the first + 5 entries in the leaderboard. If The current user has no entry, this will return null. - + - + Used to retrieve all leaderboard entries for friends of the current user - + - + Try to join this room. Will return RoomEnter.Success on success, + and anything else is a failure - + - + Leave a lobby; this will take effect immediately on the client side + other users in the lobby will be notified by a LobbyChatUpdate_t callback - + - + Invite another user to the lobby + will return true if the invite is successfully sent, whether or not the target responds + returns false if the local user is not connected to the Steam servers - + - + returns the number of users in the specified lobby - + - + Returns current members. Need to be in the lobby to see the users. - + - + Get data associated with this lobby - + - + Get data associated with this lobby - - - - + - + Removes a metadata key from the lobby - + - + Get all data for this lobby - + - + Gets per-user metadata for someone in this lobby - + - + Sets per-user metadata (for the local user implicitly) - + - + Sends a string to the chat room - + - + Sends bytes the the chat room + this isn't exposed because there's no way to read raw bytes atm, + and I figure people can send json if they want something more advanced - + - + Refreshes metadata for a lobby you're not necessarily in right now + you never do this for lobbies you're a member of, only if your + this will send down all the metadata associated with a lobby + this is an asynchronous call + returns false if the local user is not connected to the Steam servers + results will be returned by a LobbyDataUpdate_t callback + if the specified lobby doesn't exist, LobbyDataUpdate_t::m_bSuccess will be set to false - + - + Max members able to join this lobby. Cannot be over 250. + Can only be set by the owner - + - + You must be the lobby owner to set the owner - + - + only lobbies in the same immediate region will be returned - + - + only lobbies in the same immediate region will be returned - + - + only lobbies in the same immediate region will be returned - + - + returns only lobbies with the specified number of slots available - + - + sets how many results to return, the lower the count the faster it is to download the lobby results - + - + Run the query, get the matching lobbies - + - + Any IP, specific port - + - + Localhost IP, specific port - + - + Specific IP, specific port - + - + Specific IP, specific port - + - + A server query packet. - + - + Target IP address - + - + Target port - + - + This data is pooled. Make a copy if you don't use it immediately. + This buffer is also quite large - so pay attention to Size. - + - + Size of the data - - + + + + Object that describes a "location" on the Internet with sufficient + detail that we can reasonably estimate an upper bound on the ping between + the two hosts, even if a direct route between the hosts is not possible, + and the connection must be routed through the Steam Datagram Relay network. + This does not contain any information that identifies the host. Indeed, + if two hosts are in the same building or otherwise have nearly identical + networking characteristics, then it's valid to use the same location + object for both of them. + + NOTE: This object should only be used in the same process! Do not serialize it, + send it over the wire, or persist it in a file or database! If you need + to do that, convert it to a string representation using the methods in + ISteamNetworkingUtils(). + + + + + Estimate the round-trip latency between two arbitrary locations, in + milliseconds. This is a conservative estimate, based on routing through + the relay network. For most basic relayed connections, this ping time + will be pretty accurate, since it will be based on the route likely to + be actually used. + + If a direct IP route is used (perhaps via NAT traversal), then the route + will be different, and the ping time might be better. Or it might actually + be a bit worse! Standard IP routing is frequently suboptimal! + + But even in this case, the estimate obtained using this method is a + reasonable upper bound on the ping time. (Also it has the advantage + of returning immediately and not sending any packets.) + + In a few cases we might not able to estimate the route. In this case + a negative value is returned. k_nSteamNetworkingPing_Failed means + the reason was because of some networking difficulty. (Failure to + ping, etc) k_nSteamNetworkingPing_Unknown is returned if we cannot + currently answer the question for some other reason. + Do you need to be able to do this from a backend/matchmaking server? + You are looking for the "ticketgen" library. + + + + Tags a user as being visible in the screenshot - + - + Tags a user as being visible in the screenshot - + - + Tags a user as being visible in the screenshot - + - + Gets the individual tags for this server - - - + - + Add this server to our history list + If we're already in the history list, weill set the last played time to now - - + - + If this server responds to source engine style queries, we'll be able to get a list of rules here - + - + Remove this server from our history list - + - + Add this server to our favourite list - + - + Remove this server from our favourite list - + - + Destroy a listen socket. All the connections that were accepting on the listen + socket are closed ungracefully. - + - + Which app we're querying. Defaults to the current app. - + - + When a new server is added, this function will get called - + - + Called for every responsive server - + - + A list of servers that responded. If you're only interested in servers that responded since you + last updated, then simply clear this list. - - + - + A list of servers that were in the master list but didn't respond. - + - + Query the server list. Task result will be true when finished + - + - + Exposes a wide range of information and actions for applications and Downloadable Content (DLC). - + - + posted after the user gains ownership of DLC and that DLC is installed - + - + posted after the user gains executes a Steam URL with command line or query parameters + such as steam://run/appid//-commandline/?param1=value1(and)param2=value2(and)param3=value3 etc + while the game is already running. The new params can be queried + with GetLaunchQueryParam and GetLaunchCommandLine - + - + Checks if the active user is subscribed to the current App ID - + - + Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID - + - + Checks if the license owned by the user provides low violence depots. + Low violence depots are useful for copies sold in countries that have content restrictions - + - + Checks whether the current App ID license is for Cyber Cafes. - - + - + CChecks if the user has a VAC ban on their account - - - - + - + Gets the current language that the user has set. + This falls back to the Steam UI language if the user hasn't explicitly picked a language for the title. - - - - + - + Gets a list of the languages the current app supports. - - - - - + - + Checks if the active user is subscribed to a specified AppId. + Only use this if you need to check ownership of another game related to yours, a demo for example. - - - - - + - + Checks if the user owns a specific DLC and if the DLC is installed - + - + Returns the time of the purchase of the app - - - + - + Checks if the user is subscribed to the current app through a free weekend + This function will return false for users who have a retail or other type of license + Before using, please ask your Valve technical contact how to package and secure your free weekened - - - + - + Returns metadata for all available DLC - - - + - + Install/Uninstall control for optional DLC - - - + - + Install/Uninstall control for optional DLC - - - + - + Returns null if we're not on a beta branch, else the name of the branch - - - - + + + Allows you to force verify game content on next launch. - - - + If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a server), + you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit. + - + - + Gets a list of all installed depots for a given App ID in mount order - - - + - + Gets the install folder for a specific AppID. + This works even if the application is not installed, based on where the game would be installed with the default Steam library location. - + - + The app may not actually be owned by the current user, they may have it left over from a free weekend, etc. - + - + Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed.. - + - + Gets the associated launch parameter if the game is run via steam://run/appid/?param1=value1;param2=value2;param3=value3 etc. + Parameter names starting with the character '@' are reserved for internal use and will always return an empty string. + Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game, + but it is advised that you not param names beginning with an underscore for your own features. - + - + Gets the download progress for optional DLC. - + - + Gets the buildid of this app, may change at any time based on backend updates to the game. + Defaults to 0 if you're not running a build downloaded from steam. - - - + - + Asynchronously retrieves metadata details about a specific file in the depot manifest. + Currently provides: - + - + Get command line if game was launched via Steam URL, e.g. steam://run/appid//command line/. + This method of passing a connect string (used when joining via rich presence, accepting an + invite, etc) is preferable to passing the connect string on the operating system command + line, which is a security risk. In order for rich presence joins to go through this + path and not be placed on the OS command line, you must set a value in your app's + configuration on Steam. Ask Valve for help with this. - - - + - + Checks if the current user's Steam client is connected to the Steam servers. + If it's not then no real-time services provided by the Steamworks API will be enabled. The Steam + client will automatically be trying to recreate the connection as often as possible. When the + connection is restored a SteamServersConnected_t callback will be posted. + You usually don't need to check for this yourself. All of the API calls that rely on this will + check internally. Forcefully disabling stuff when the player loses access is usually not a + very good experience for the player and you could be preventing them from accessing APIs that do not + need a live connection to Steam. - - - - + - + Gets the Steam ID of the account currently logged into the Steam client. This is + commonly called the 'current user', or 'local user'. + A Steam ID is a unique identifier for a Steam accounts, Steam groups, Lobbies and Chat + rooms, and used to differentiate users in all parts of the Steamworks API. - - - + - + returns the local players name - guaranteed to not be NULL. + this is the same name as on the users community profile page - - - + - + gets the status of the current user - - + - + returns the appID of the current process - + - + Undocumented Parental Settings - - + - + Called when chat message has been received from a friend. You'll need to turn on + ListenForFriendsMessages to recieve this. (friend, msgtype, message) - + - + called when a friends' status changes - - - - + - + Called when the user tries to join a game from their friends list + rich presence will have been set with the "connect" key which is set here - + - + Posted when game overlay activates or deactivates + the game can use this to be pause or resume single player games - + - + Called when the user tries to join a different game server from their friends list + game client should attempt to connect to specified server when this is received - + - + Called when the user tries to join a lobby from their friends list + game client should attempt to connect to specified lobby when this is received - + - + Callback indicating updated data about friends rich presence information - + - + The dialog to open. Valid options are: + "friends", + "community", + "players", + "settings", + "officialgamegroup", + "stats", + "achievements". - + - + "steamid" - Opens the overlay web browser to the specified user or groups profile. + "chat" - Opens a chat window to the specified user, or joins the group chat. + "jointrade" - Opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API. + "stats" - Opens the overlay web browser to the specified user's stats. + "achievements" - Opens the overlay web browser to the specified user's achievements. + "friendadd" - Opens the overlay in minimal mode prompting the user to add the target user as a friend. + "friendremove" - Opens the overlay in minimal mode prompting the user to remove the target friend. + "friendrequestaccept" - Opens the overlay in minimal mode prompting the user to accept an incoming friend invite. + "friendrequestignore" - Opens the overlay in minimal mode prompting the user to ignore an incoming friend invite. - + - + Activates the Steam Overlay to the Steam store page for the provided app. - + - + Activates Steam Overlay web browser directly to the specified URL. - + - + Activates the Steam Overlay to open the invite dialog. Invitations sent from this dialog will be for the provided lobby. - - - + - + Mark a target user as 'played with'. + NOTE: The current user must be in game with the other player for the association to work. - - - + - + Requests the persona name and optionally the avatar of a specified user. + NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them. + returns true if we're fetching the data, false if we already have it - + - + Find a rich presence value by key for current user. Will be null if not found. - - - + - + Sets a rich presence value by key for current user. - + - 当前被拖拽的滚动面板。同一时间只能有一个在进行此操作。 + Clears all of the current user's rich presence data. - + - + Listens for Steam friends chat messages. + You can then show these chats inline in the game. For example with a Blizzard style chat message system or the chat system in Dota 2. + After enabling this you will receive callbacks when ever the user receives a chat message. - + - Dispatched when scrolling. - 在滚动时派发该事件。 + Undocumented Parental Settings - + - 在滚动结束时派发该事件。 + Call this if you're going to want to access definition information. You should be able to get + away with calling this once at the start if your game, assuming your items don't change all the time. + This will trigger OnDefinitionsUpdated at which point Definitions should be set. - + - 向下拉过上边缘后释放则派发该事件。 + Will call LoadItemDefinitions and wait until Definitions is not null - + - 向上拉过下边缘后释放则派发该事件。 + Try to find the definition that matches this definition ID. + Uses a dictionary so should be about as fast as possible. - + - + We will try to keep this list of your items automatically up to date. - + - + Update the list of Items[] - + - + Get all items and return the InventoryResult - + - + This is used to grant a specific item to the user. This should + only be used for development prototyping, from a trusted server, + or if you don't care about hacked clients granting arbitrary items. + This call can be disabled by a setting on Steamworks. - + - + Crafting! Uses the passed items to buy the target item. + You need to have set up the appropriate exchange rules in your item + definitions. This assumes all the items passed in aren't stacked. - + - 滚动到达边缘时是否允许回弹效果。 + Crafting! Uses the passed items to buy the target item. + You need to have set up the appropriate exchange rules in your item + definitions. This assumes all the items passed in aren't stacked. - + - 是否允许拖拽内容区域进行滚动。 + Deserializes a result set and verifies the signature bytes. + This call has a potential soft-failure mode where the Result is expired, it will + still succeed in this mode.The "expired" + result could indicate that the data may be out of date - not just due to timed + expiration( one hour ), but also because one of the items in the result set may + have been traded or consumed since the result set was generated.You could compare + the timestamp from GetResultTimestamp to ISteamUtils::GetServerRealTime to determine + how old the data is. You could simply ignore the "expired" result code and + continue as normal, or you could request the player with expired data to send + an updated result set. + You should call CheckResultSteamID on the result handle when it completes to verify + that a remote player is not pretending to have a different user's inventory. - + - 是否允许惯性滚动。 + Grant all promotional items the user is eligible for - + - 是否允许在左/上边缘显示虚化效果。 + Trigger an item drop for this user. This is for timed drops. - + - 当调用ScrollPane.scrollUp/Down/Left/Right时,或者点击滚动条的上下箭头时,滑动的距离。 - 鼠标滚轮触发一次滚动的距离设定为defaultScrollStep*2 + Trigger a promo item drop. You can call this at startup, it won't + give users multiple promo drops. - + - 滚动位置是否保持贴近在某个元件的边缘。 + Start buying a cart load of items. This will return a positive result is the purchase has + begun. You should listen out for SteamUser.OnMicroTxnAuthorizationResponse for a success. - + - 是否页面滚动模式。 + Functions for clients to access matchmaking services, favorites, and to operate on game lobbies - + - + Someone invited you to a lobby - + - 是否允许使用鼠标滚轮进行滚动。 + The lobby metadata has changed - + - 当处于惯性滚动时减速的速率。默认值是UIConfig.defaultScrollDecelerationRate。 - 越接近1,减速越慢,意味着滑动的时间和距离更长。 + The lobby member metadata has changed - + - 当前X轴滚动位置百分比,0~1(包含)。 + The lobby member joined - + - 设置当前X轴滚动位置百分比,0~1(包含)。 + The lobby member left the room - - 是否使用缓动到达目标。 - + - 当前Y轴滚动位置百分比,0~1(包含)。 + The lobby member left the room - + - 设置当前Y轴滚动位置百分比,0~1(包含)。 + The lobby member was kicked. The 3rd param is the user that kicked them. - - 是否使用缓动到达目标。 - + - 当前X轴滚动位置,值范围是viewWidth与contentWidth之差。 + The lobby member was banned. The 3rd param is the user that banned them. - + - 设置当前X轴滚动位置。 + A chat message was recieved from a member of a lobby - - 是否使用缓动到达目标。 - + - 当前Y轴滚动位置,值范围是viewHeight与contentHeight之差。 + Creates a new invisible lobby. Call lobby.SetPublic to take it online. - + - 设置当前Y轴滚动位置。 + Get a list of servers that are on your favorites list - - 是否使用缓动到达目标。 - + - 返回当前滚动位置是否在最下边。 + Get a list of servers that you have added to your play history - + - 返回当前滚动位置是否在最右边。 + Functions to control music playback in the steam client. + This gives games the opportunity to do things like pause the music or lower the volume, + when an important cut scene is shown, and start playing afterwards. + Nothing uses Steam Music though so this can probably get fucked - + - 如果处于分页模式,返回当前在X轴的页码。 + Playback status changed - + - 如果处于分页模式,可设置X轴的页码。 + Volume changed, parameter is new volume - - 是否使用缓动到达目标。 - + - 如果处于分页模式,返回当前在Y轴的页码。 + Checks if Steam Music is enabled - + - 如果处于分页模式,可设置Y轴的页码。 + true if a song is currently playing, paused, or queued up to play; otherwise false. - - 是否使用缓动到达目标。 - + - 这个值与PosX不同在于,他反映的是实时位置,而PosX在有缓动过程的情况下只是终值。 + Gets the current status of the Steam Music player - + - 这个值与PosY不同在于,他反映的是实时位置,而PosY在有缓动过程的情况下只是终值。 + Have the Steam Music player play the previous song. - + - 显示内容宽度。 + Have the Steam Music player skip to the next song - + - 显示内容高度。 + Gets/Sets the current volume of the Steam Music player - + - 显示区域宽度。 + This SteamId wants to send you a message. You should respond by calling AcceptP2PSessionWithUser + if you want to recieve their messages - + - 显示区域高度。 + Called when packets can't get through to the specified user. + All queued packets unsent at this point will be dropped, further attempts + to send will retry making the connection (but will be dropped if we fail again). - + - + This should be called in response to a OnP2PSessionRequest - + - + This should be called when you're done communicating with a user, as this will + free up all of the resources allocated for the connection under-the-hood. + If the remote user tries to send data to you again, a new OnP2PSessionRequest + callback will be posted - - + - + Checks if a P2P packet is available to read, and gets the size of the message if there is one. - + - + Reads in a packet that has been sent from another user via SendP2PPacket.. - - + - + Sends a P2P packet to the specified user. + This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections. + NOTE: The first packet send may be delayed as the NAT-traversal code runs. - + - + Creates a "server" socket that listens for clients to connect to by calling + Connect, over ordinary UDP (IPv4 or IPv6) - - - + - + Connect to a socket created via CreateListenSocketIP - + - + Creates a server that will be relayed via Valve's network (hiding the IP and improving ping) - - - + - + Connect to a relay server - + - + Undocumented Parental Settings - - - - + + + Return location info for the current host. + + It takes a few seconds to initialize access to the relay network. If + you call this very soon after startup the data may not be available yet. + This always return the most up-to-date information we have available + right now, even if we are in the middle of re-calculating ping times. + + + + + Same as PingLocation.EstimatePingTo, but assumes that one location is the local host. + This is a bit faster, especially if you need to calculate a bunch of + these in a loop to find the fastest one. - + - + If you need ping information straight away, wait on this. It will return + immediately if you already have up to date ping data - - - + - + [0 - 100] - Randomly discard N pct of packets - obj can be any object on stage, not limited to the direct child of this container. - + - + [0 - 100] - Randomly discard N pct of packets - obj can be any object on stage, not limited to the direct child of this container. - If moving to target position with animation - + - + Delay all packets by N ms - obj can be any object on stage, not limited to the direct child of this container. - If moving to target position with animation - If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view. - + - + Delay all packets by N ms - Rect in local coordinates - If moving to target position with animation - If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view. - + - + Undocumented Parental Settings - obj must be the direct child of this container - - + - 当滚动面板处于拖拽滚动状态或即将进入拖拽状态时,可以调用此方法停止或禁止本次拖拽。 + Parental Settings Changed - + - 设置Header固定显示。如果size为0,则取消固定显示。 + - Header显示的大小 - + - 设置Footer固定显示。如果size为0,则取消固定显示。 + - - + - 内部使用。由虚拟列表调用。在滚动时修改显示内容的大小,需要进行修正,避免滚动跳跃。 + - - - - - + - 对当前的滚动位置进行循环滚动边界检查。当到达边界时,回退一半内容区域(循环滚动内容大小通常是真实内容大小的偶数倍)。 + - - + - 对目标位置进行循环滚动边界检查。当到达边界时,回退一半内容区域(循环滚动内容大小通常是真实内容大小的偶数倍)。 + - - + - 从oldPos滚动至pos,调整pos位置对齐页面、对齐item等(如果需要)。 + - - - + - 从oldPos滚动至pos,调整目标位置到对齐页面。 + The list of possible Party beacon locations has changed - - - - - + - 根据当前速度,计算滚动的目标位置,以及到达时间。 + The list of active beacons may have changed - - - + - 根据修改后的tweenChange重新计算减速时间。 + Undocumented Parental Settings - + - + Creates a new file, writes the bytes to the file, and then closes the file. + If the target file already exists, it is overwritten - + - + Opens a binary file, reads the contents of the file into a byte array, and then closes the file. - + - + Checks whether the specified file exists. - + - 动效的名称。在编辑器里设定。 + Checks if a specific file is persisted in the steam cloud. - + - + Gets the specified file's last modified date/time. - + - + Gets the specified files size in bytes. 0 if not exists. - - + - + Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API. - - - - + - + Deletes a file from the local disk, and propagates that delete to the cloud. - - - - - - + - + Number of bytes total - + - + Number of bytes used - - + - + Number of bytes remaining until your quota is used - - - - + - + returns true if IsCloudEnabledForAccount AND IsCloudEnabledForApp - - + - 设置动效是否自动播放。 + Checks if the account wide Steam Cloud setting is enabled for this user + or if they disabled it in the Settings->Cloud dialog. - - - - + + Checks if the per game Steam Cloud setting is enabled for this user + or if they disabled it in the Game Properties->Update dialog. + This must only ever be set as the direct result of the user explicitly + requesting that it's enabled or not. This is typically accomplished with + a checkbox within your in-game options - + - + Gets the total number of local files synchronized by Steam Cloud. - - - + - + Get a list of filenames synchronized by Steam Cloud - - + - + Undocumented Parental Settings - + - + A screenshot has been requested by the user from the Steam screenshot hotkey. + This will only be called if HookScreenshots has been enabled, in which case Steam + will not take the screenshot itself. - - - + - + A screenshot successfully written or otherwise added to the library and can now be tagged. - - - + - + A screenshot attempt failed - + - + Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format. + The return value is a handle that is valid for the duration of the game process and can be used to apply tags. - - - + - + Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio + as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format. + The return value is a handle that is valid for the duration of the game process and can be used to apply tags. + JPEG, TGA, and PNG formats are supported. - - - + - + Causes the Steam overlay to take a screenshot. + If screenshots are being hooked by the game then a + ScreenshotRequested callback is sent back to the game instead. - - - + - + Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them. + Hooking is disabled by default, and only ever enabled if you do so with this function. + If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the hotkey or + when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or AddScreenshotToLibrary in response. - + - + Provides the core of the Steam Game Servers API - + - + User has been authed or rejected - + - + Called when a connections to the Steam back-end has been established. + This means the server now is logged on and has a working connection to the Steam master server. - + - + This will occur periodically if the Steam client is not connected, and has failed when retrying to establish a connection (result, stilltrying) - + - + Disconnected from Steam - + - + Run the callbacks. This is also called in Async callbacks. - + - + Sets whether this should be marked as a dedicated server. + If not, it is assumed to be a listen server. - + - + Gets or sets the current MaxPlayers. + This doesn't enforce any kind of limit, it just updates the master server. - - + - + Gets or sets the current BotCount. + This doesn't enforce any kind of limit, it just updates the master server. - + - + Gets or sets the current Map Name. - + - + Gets or sets the current ModDir - + - + Gets the current product - - - + - + Gets or sets the current Product - - - - + - + Gets or sets the current ServerName - - - + - + Set whether the server should report itself as passworded - - - + - + Gets or sets the current GameTags. This is a comma seperated list of tags for this server. + When querying the server list you can filter by these tags. - - - + - + Log onto Steam anonymously. - - - + - + Log onto Steam anonymously. - - - + - + Returns true if the server is connected and registered with the Steam master server + You should have called LogOnAnonymous etc on startup. - - + - + To the best of its ability this tries to get the server's + current public ip address. Be aware that this is likely to return + null for the first few seconds after initialization. - - + - + Enable or disable heartbeats, which are sent regularly to the master server. + Enabled by default. - - - + - + Set heartbeat interval, if automatic heartbeats are enabled. + You can leave this at the default. - - - + - + Force send a heartbeat to the master server instead of waiting + for the next automatic update (if you've left them enabled) - - - + - + Update this connected player's information. You should really call this + any time a player's name or score changes. This keeps the information shown + to server queries up to date. - + + Sets a Key Value. These can be anything you like, and are accessible + when querying servers from the server list. + Information describing gamemodes are common here. - + - TreeView使用的List对象 + Remove all key values - + - TreeView的顶层节点,这是个虚拟节点,也就是他不会显示出来。 + Start authorizing a ticket. This user isn't authorized yet. Wait for a call to OnAuthChange. - + - TreeView每级的缩进,单位像素。 + Forget this guy. They're no longer in the game. - + - 当TreeNode需要创建对象的显示对象时回调 + If true, Steam wants to send a packet. You should respond by sending + this packet in an unconnected way to the returned Address and Port. + Packet to send. The Data passed is pooled - so use it immediately. + True if we want to send a packet - + - 当TreeNode需要更新时回调 + We have received a server query on our game port. Pass it to Steam to handle. - + - 当TreeNode即将展开或者收缩时回调。可以在回调中动态增加子节点。 + We have received a server query on our game port. Pass it to Steam to handle. - + - 点击任意TreeNode时触发 + Downloads stats for the user + If the user has no stats will return fail + these stats will only be auto-updated for clients playing on the server - + - 右键点击任意TreeNode时触发 + Set the named stat for this user. Setting stats should follow the rules + you defined in Steamworks. - + - + Set the named stat for this user. Setting stats should follow the rules + you defined in Steamworks. - - + - + Get the named stat for this user. If getting the stat failed, will return + defaultValue. You should have called Refresh for this userid - which downloads + the stats from the backend. If you didn't call it this will always return defaultValue. - - + - + Get the named stat for this user. If getting the stat failed, will return + defaultValue. You should have called Refresh for this userid - which downloads + the stats from the backend. If you didn't call it this will always return defaultValue. - - + - + Unlocks the specified achievement for the specified user. Must have called Refresh on a steamid first. + Remember to use Commit after use. - - - + - + Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid first. + Remember to use Commit after use. - - + - + Return true if available, exists and unlocked - + - + Once you've set a stat change on a user you need to commit your changes. + You can do that using this function. The callback will let you know if + your action succeeded, but most of the time you can fire and forget. - - - + - + Functions for accessing and manipulating Steam user information. + This is also where the APIs for Steam Voice are exposed. - - + - + Utility function to fetch a single item. Internally this uses Ugc.FileQuery - + which you can use to query multiple items if you need to. - - + - + Functions for accessing and manipulating Steam user information. + This is also where the APIs for Steam Voice are exposed. - - + - + Called when a connections to the Steam back-end has been established. + This means the Steam client now has a working connection to the Steam servers. + Usually this will have occurred before the game has launched, and should only be seen if the + user has dropped connection due to a networking issue or a Steam server update. - - + - + Called when a connection attempt has failed. + This will occur periodically if the Steam client is not connected, + and has failed when retrying to establish a connection. - - + - + Called if the client has lost connection to the Steam servers. + Real-time services will be disabled until a matching OnSteamServersConnected has been posted. - - + - + Sent by the Steam server to the client telling it to disconnect from the specified game server, + which it may be in the process of or already connected to. + The game client should immediately disconnect upon receiving this message. + This can usually occur if the user doesn't have rights to play on the game server. - - - + - + Called whenever the users licenses (owned packages) changes. - - + - + Called when an auth ticket has been validated. + The first parameter is the steamid of this user + The second is the Steam ID that owns the game, this will be different from the first + if the game is being borrowed via Steam Family Sharing - - + - + Used internally for GetAuthSessionTicketAsync - - + - + Called when a user has responded to a microtransaction authorization request. + ( appid, orderid, user authorized ) - - + - + Sent to your game in response to a steam://gamewebcallback/ command from a user clicking a link in the Steam overlay browser. + You can use this to add support for external site signups where you want to pop back into the browser after some web page + signup sequence, and optionally get back some detail about that. - - - - + - + Starts/Stops voice recording. + Once started, use GetAvailableVoice and GetVoice to get the data, and then call StopVoiceRecording + when the user has released their push-to-talk hotkey or the game session has completed. - - + - + Returns true if we have voice data waiting to be read - - + - Global configs. These options should be set before any UI construction. + Reads the voice data and returns the number of bytes written. + The compressed data can be transmitted by your application and decoded back into raw audio data using + DecompressVoice on the other side. The compressed data provided is in an arbitrary format and is not meant to be played directly. + This should be called once per frame, and at worst no more than four times a second to keep the microphone input delay as low as + possible. Calling this any less may result in gaps in the returned stream. - + - Dynamic Font Support. - set defaultFont to system font name(or names joint with comma). e.g. defaultFont="Microsoft YaHei, SimHei" + Reads the voice data and returns the bytes. You should obviously ideally be using + ReadVoiceData because it won't be creating a new byte array every call. But this + makes it easier to get it working, so let the babies have their bottle. - + - Resource using in Window.ShowModalWait for locking the window. + Decodes the compressed voice data returned by GetVoice. + The output data is raw single-channel 16-bit PCM audio.The decoder supports any sample rate from 11025 to 48000. - + - Resource using in GRoot.ShowModalWait for locking the screen. + Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you. - + - When a modal window is in front, the background becomes dark. + Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you. + This waits for a positive response from the backend before returning the ticket. This means + the ticket is definitely ready to go as soon as it returns. Will return null if the callback + times out or returns negatively. - + - Default button click sound. + Checks if the current users looks like they are behind a NAT device. + This is only valid if the user is connected to the Steam servers and may not catch all forms of NAT. - + - Default button click sound volume. + Gets the Steam level of the user, as shown on their Steam community profile. - + - Resource url of horizontal scrollbar + Requests a URL which authenticates an in-game browser for store check-out, and then redirects to the specified URL. + As long as the in-game browser accepts and handles session cookies, Steam microtransaction checkout pages will automatically recognize the user instead of presenting a login page. + NOTE: The URL has a very short lifetime to prevent history-snooping attacks, so you should only call this API when you are about to launch the browser, or else immediately navigate to the result URL using a hidden browser window. + NOTE: The resulting authorization cookie has an expiration time of one day, so it would be a good idea to request and visit a new auth URL every 12 hours. - + - Resource url of vertical scrollbar + Checks whether the current user has verified their phone number. - + - Scrolling step in pixels - 当调用ScrollPane.scrollUp/Down/Left/Right时,或者点击滚动条的上下箭头时,滑动的距离。 - 鼠标滚轮触发一次滚动的距离设定为defaultScrollStep*2 + Checks whether the current user has Steam Guard two factor authentication enabled on their account. - + - Deceleration ratio of scrollpane when its in touch dragging. - 当手指拖动并释放滚动区域后,内容会滑动一定距离后停下,这个速率就是减速的速率。 - 越接近1,减速越慢,意味着滑动的时间和距离更长。 - 这个是全局设置,也可以通过ScrollPane.decelerationRate进行个性设置。 + Checks whether the user's phone number is used to uniquely identify them. - + - Scrollbar display mode. Recommended 'Auto' for mobile and 'Visible' for web. + Checks whether the current user's phone number is awaiting (re)verification. - + - Allow dragging anywhere in container to scroll. + Requests an application ticket encrypted with the secret "encrypted app ticket key". + The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app. + There can only be one call pending, and this call is subject to a 60 second rate limit. + This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/ - + - The "rebound" effect in the scolling container. - + Requests an application ticket encrypted with the secret "encrypted app ticket key". + The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app. + There can only be one call pending, and this call is subject to a 60 second rate limit. + This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/ + - + - Resources url of PopupMenu. + called when the achivement icon is loaded - + - Resource url of menu seperator. + called when the latests stats and achievements have been received + from the server - + - In case of failure of loading content for GLoader, use this sign to indicate an error. + result of a request to store the user stats for a game - + - Resource url of tooltips. + result of a request to store the achievements for a game, or an + "indicate progress" call. If both m_nCurProgress and m_nMaxProgress + are zero, that means the achievement has been fully unlocked - + - The number of visible items in ComboBox. + Callback indicating that a user's stats have been unloaded - + - Pixel offsets of finger to trigger scrolling + Get the available achievements - + - Pixel offsets of finger to trigger dragging + Tries to get the number of players currently playing this game. + Or -1 if failed. - + - Pixel offsets of mouse pointer to trigger dragging. + Send the changed stats and achievements data to the server for permanent storage. + If this fails then nothing is sent to the server. It's advisable to keep trying until the call is successful. + This call can be rate limited. Call frequency should be on the order of minutes, rather than seconds.You should only be calling this during major state changes such as the end of a round, the map changing, or the user leaving a server. This call is required to display the achievement unlock notification dialog though, so if you have called SetAchievement then it's advisable to call this soon after that. + If you have stats or achievements that you have saved locally but haven't uploaded with this function when your application process ends then this function will automatically be called. + You can find additional debug information written to the %steam_install%\logs\stats_log.txt file. + This function returns true upon success if : + RequestCurrentStats has completed and successfully returned its callback AND + the current game has stats associated with it in the Steamworks Partner backend, and those stats are published. - + - Allow softness on top or left side for scrollpane. + Asynchronously request the user's current stats and achievements from the server. + You must always call this first to get the initial status of stats and achievements. + Only after the resulting callback comes back can you start calling the rest of the stats + and achievement functions for the current user. - + - When click the window, brings to front automatically. + Gets a leaderboard by name, it will create it if it's not yet created. + Leaderboards created with this function will not automatically show up in the Steam Community. + You must manually set the Community Name field in the App Admin panel of the Steamworks website. + As such it's generally recommended to prefer creating the leaderboards in the App Admin panel on + the Steamworks website and using FindLeaderboard unless you're expected to have a large amount of + dynamically created leaderboards. - + - + Adds this amount to the named stat. Internally this calls Get() and adds + to that value. Steam doesn't provide a mechanism for atomically increasing + stats like this, this functionality is added here as a convenience. - + - + Adds this amount to the named stat. Internally this calls Get() and adds + to that value. Steam doesn't provide a mechanism for atomically increasing + stats like this, this functionality is added here as a convenience. - + - + Set a stat value. This will automatically call StoreStats() after a successful call + unless you pass false as the last argument. - + - if RenderTexture using in paiting mode has depth support. + Set a stat value. This will automatically call StoreStats() after a successful call + unless you pass false as the last argument. - + - + Get a Int stat value - + - + Get a float stat value - + - + Practically wipes the slate clean for this user. If includeAchievements is true, will wipe + any achievements too. + - + - + Interface which provides access to a range of miscellaneous utility functions - + - + The country of the user changed - + - Set content scale factor. + Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute + The parameter is the number of minutes left - Design resolution of x axis. - Design resolution of y axis. - + - Set content scale factor. + Called when Steam wants to shutdown - Design resolution of x axis. - Design resolution of y axis. - Match mode. - + - + Big Picture gamepad text input has been closed. Parameter is true if text was submitted, false if cancelled etc. - + - + Returns the number of seconds since the application was active - + - + Returns the number of seconds since the user last moved the mouse etc - - - + - + Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time) - - - + - + returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) + e.g "US" or "UK". - - + - + returns true if the image exists, and the buffer was successfully filled out + results are returned in RGBA format + the destination buffer size should be 4 * height * width * sizeof(char) - - + - + returns the image in RGBA format - - - + - + Returns true if we're using a battery (ie, a laptop not plugged in) - - - + - Package id. It is generated by the Editor, or set by customId. + Returns battery power [0-1] - + - Package name. + Sets the position where the overlay instance for the currently calling game should show notifications. + This position is per-game and if this function is called from outside of a game context it will do nothing. - + - The path relative to the content folder. + Returns true if the overlay is running and the user can access it. The overlay process could take a few seconds to + start and hook the game process, so this function will initially return false while the overlay is loading. - + + + Normally this call is unneeded if your game has a constantly running frame loop that calls the + D3D Present API, or OGL SwapBuffers API every frame. + + However, if you have a game that only refreshes the screen on an event driven basis then that can break + the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also + need to Present() to the screen any time an even needing a notification happens or when the overlay is + brought up over the game by a user. You can use this API to ask the overlay if it currently need a present + in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you + refresh the screen with Present or SwapBuffers to allow the overlay to do it's work. + + + - Return a UIPackage with a certain id. + Asynchronous call to check if an executable file has been signed using the public key set on the signing tab + of the partner site, for example to refuse to load modified executable files. - ID of the package. - UIPackage - + - Return a UIPackage with a certain name. + Activates the Big Picture text input dialog which only supports gamepad input - Name of the package. - UIPackage - + - Add a UI package from a path relative to Unity Resources path. + Returns previously entered text - Path relative to resources path. - UIPackage - + - Remove a package. All resources in this package will be disposed. + returns the language the steam client is running in, you probably want + Apps.CurrentGameLanguage instead, this is for very special usage cases - - - + - + returns true if Steam itself is running in VR mode - + - + Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition - - + - Create a UI object. + returns true if Steam and the Steam Overlay are running in Big Picture mode + Games much be launched through the Steam client to enable the Big Picture overlay. During development, + a game can be added as a non-steam game to the developers library to test this feature - Package name. - Resource name. - A UI object. - + - Create a UI object. + ask SteamUI to create and render its OpenVR dashboard - Package name. - Resource name. - Custom implementation of this object. - A UI object. - + - Create a UI object. + Set whether the HMD content will be streamed via Steam In-Home Streaming + If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed. + If this is set to false, then the application window will be streamed instead, and remote input will be allowed. + The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game. + (this is useful for games that have asymmetric multiplayer gameplay) - Resource url. - A UI object. - + - Create a UI object. + Undocumented Parental Settings - Resource url. - Custom implementation of this object. - A UI object. - + - Get a asset with a certain name. + Return true if currently using Steam's live broadcasting - Package name. - Resource name. - If resource is atlas, returns NTexture; If resource is sound, returns AudioClip. - + - Get a asset with a certain name. + If we're broadcasting, will return the number of live viewers - Resource url. - If resource is atlas, returns NTexture; If resource is sound, returns AudioClip. - + - Get url of an item in package. + Returns true if this is the local user - Package name. - Resource name. - Url. - + - 将'ui://包名/组件名'转换为以内部id表达的url格式。如果传入的url本身就是内部id格式,则直接返回。 - 同时这个方法还带格式检测,如果传入不正确的url,会返回null。 + Return true if this is a friend - - - + - Set strings source. + Returns true if you have this user blocked - - + - Set a custom id for package, then you can use it in GetById. + Return true if this user is playing the game we're running - + - 获得本包依赖的包的id列表 + Returns true if this friend is online - + - + Sometimes we don't know the user's name. This will wait until we have + downloaded the information on this user. - + - + Returns true if this friend is marked as away - - - + - + Returns true if this friend is marked as busy - - - - + - + Returns true if this friend is marked as snoozing - - - + - Window class. - 窗口使用前首先要设置窗口中需要显示的内容,这通常是在编辑器里制作好的,可以直接使用Window.contentPane进行设置。 - 建议把设置contentPane等初始化操作放置到Window.onInit方法中。 - 另外,FairyGUI还提供了一套机制用于窗口动态创建。动态创建是指初始时仅指定窗口需要使用的资源,等窗口需要显示时才实际开始构建窗口的内容。 - 首先需要在窗口的构造函数中调用Window.addUISource。这个方法需要一个IUISource类型的参数,而IUISource是一个接口, - 用户需要自行实现载入相关UI包的逻辑。当窗口第一次显示之前,IUISource的加载方法将会被调用,并等待载入完成后才返回执行Window.OnInit,然后窗口才会显示。 - - 如果你需要窗口显示时播放动画效果,那么覆盖doShowAnimation编写你的动画代码,并且在动画结束后调用onShown。覆盖onShown编写其他需要在窗口显示时处理的业务逻辑。 - 如果你需要窗口隐藏时播放动画效果,那么覆盖doHideAnimation编写你的动画代码,并且在动画结束时调用Window.hideImmediately(注意不是直接调用onHide!)。覆盖onHide编写其他需要在窗口隐藏时处理的业务逻辑。 + Invite this friend to the game that we are playing - + - + Sends a message to a Steam friend. Returns true if success - + - Set a UISource to this window. It must call before the window is shown. When the window is first time to show, - UISource.Load is called. Only after all UISource is loaded, the window will continue to init. - 为窗口添加一个源。这个方法建议在构造函数调用。当窗口第一次显示前,UISource的Load方法将被调用,然后只有所有的UISource - 都ready后,窗口才会继续初始化和显示。 + Shortcut to call GetProperty( "name" ) - - + - + Shortcut to call GetProperty( "description" ) - + - + Shortcut to call GetProperty( "icon_url" ) - + - + Shortcut to call GetProperty( "icon_url_large" ) - + - + Shortcut to call GetProperty( "price_category" ) - + - + Shortcut to call GetProperty( "type" ) - + - + Returns true if this is an item that generates an item, rather + than something that is actual an item - + - + Shortcut to call GetProperty( "exchange" ) - + - + Get a list of exchanges that are available to make this item - - + - + Shortcut to call GetBoolProperty( "marketable" ) - + - Hide window immediately, no OnHide will be called. + Shortcut to call GetBoolProperty( "tradable" ) - + - Make the window be center of the screen. + Gets the property timestamp - - Add relations to ensure keeping center on screen size changed. - + - Switch show and hide status. + Gets the property modified - + - + Get a specific property by name - + - + Read a raw property from the definition schema - + - + Read a raw property from the definition schema - + - + Gets a list of all properties on this item - + - + Returns the price of this item in the local currency (SteamInventory.Currency) - + - Display a modal waiting sign in the front. - 显示一个等待标志在最前面。等待标志的资源可以通过UIConfig.windowModalWaiting。等待标志组件会设置为屏幕大小,请内部做好关联。 - 还可以设定一个requestingCmd作为等待的命令字,在CloseModalWait里传入相同的命令字ModalWait将结束,否则CloseModalWait无效。 + If the price has been discounted, LocalPrice will differ from LocalBasePrice + (assumed, this isn't documented) - - + - + Return a list of recepies that contain this item - - + - Close modal waiting. If rquestingCmd is equal to the value you transfer in ShowModalWait, mowal wait will be closed. - Otherwise, this function has no effect. - 关闭模式等待。如果requestingCmd和ShowModalWait传入的不相同,则这个函数没有任何动作,立即返回。 + Only available if the result set was created with the getproperties - - - + - + This item is account-locked and cannot be traded or given away. + This is an item status flag which is permanently attached to specific item instances - + - + The item has been destroyed, traded away, expired, or otherwise invalidated. + This is an action confirmation flag which is only set one time, as part of a result set. - + - + The item quantity has been decreased by 1 via ConsumeItem API. + This is an action confirmation flag which is only set one time, as part of a result set. - + - + Consumes items from a user's inventory. If the quantity of the given item goes to zero, it is permanently removed. + Once an item is removed it cannot be recovered.This is not for the faint of heart - if your game implements item removal at all, + a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain item definitions or fully + blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother borrowed my laptop and deleted all of my rare items". - + - + Split stack into two items - + - + Add x units of the target item to this item - + - + Will try to return the date that this item was aquired. You need to have for the items + with their properties for this to work. - + - + Tries to get the origin property. Need properties for this to work. + Will return a string like "market" - + - + Small utility class to describe an item with a quantity - + - + A structured description of an item exchange - + - + The definition ID of the ingredient. - + - + If we don't know about this item definition this might be null. + In which case, DefinitionId should still hold the correct id. - - - - + - + The amount of this item needed. Generally this will be 1. - + - + The item that this will create. - + - + The items, with quantity required to create this item. - + - + Checks whether an inventory result handle belongs to the specified Steam ID. + This is important when using Deserialize, to verify that a remote player is not pretending to have a different user's inventory - + - + Serialized result sets contain a short signature which can't be forged or replayed across different game sessions. + A result set can be serialized on the local client, transmitted to other players via your game networking, and + deserialized by the remote players.This is a secure way of preventing hackers from lying about posessing + rare/high-value items. Serializes a result set with signature bytes to an output buffer.The size of a serialized + result depends on the number items which are being serialized.When securely transmitting items to other players, + it is recommended to use GetItemsByID first to create a minimal result set. + Results have a built-in timestamp which will be considered "expired" after an hour has elapsed.See DeserializeResult + for expiration handling. - - - + - + Creator of the beacon - - + - + Creator of the beacon - - - - - + - + Will attempt to join the party. If successful will return a connection string. + If failed, will return null - - - + - + When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your game a ReservationNotification callback. + When that user joins your party, call OnReservationCompleted to notify Steam that the user has joined successfully - - + - + To cancel a reservation (due to timeout or user input), call this. + Steam will open a new reservation slot. + Note: The user may already be in-flight to your game, so it's possible they will still connect and try to join your party. - - + - + Turn off the beacon - - + - + Used to set up the server. + The variables in here are all required to be set, and can't be changed once the server is created. - - + - + The version string is usually in the form x.x.x.x, and is used by the master server to detect when the server is out of date. + If you go into the dedicated server tab on steamworks you'll be able to server the latest version. If this version number is + less than that latest version then your server won't show. - - + - + This should be the same directory game where gets installed into. Just the folder name, not the whole path. I.e. "Rust", "Garrysmod". - - + - + The game description. Setting this to the full name of your game is recommended. - - + - + Is a dedicated server - - + - + Set the Steam quert port - - + + If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE into usQueryPort, then it causes the game server API to use + "GameSocketShare" mode, which means that the game is responsible for sending and receiving UDP packets for the master + server updater. + More info about this here: https://partner.steamgames.com/doc/api/ISteamGameServer#HandleIncomingPacket - - + - + Create a Normal Workshop item that can be subscribed to - - + - + Workshop item that is meant to be voted on for the purpose of selling in-game - - - + - + https://partner.steamgames.com/doc/features/workshop/implementation#Legal - - + - + The actual ID of this file - - + - + The given title of this item - - + - + The description of this item, in your local language if available - - - - + - + A list of tags for this item, all lowercase - + - + App Id of the app that created this item - + - + App Id of the app that will consume this item. - + - + User who created this content - + - + The bayesian average for up votes / total votes, between [0,1] - + - + Time when the published item was created - + - + Time when the published item was last updated - + - + True if this is publically visible - + - + True if this item is only visible by friends of the creator - + - + True if this is only visible to the creator - + - + True if this item has been banned - + - + Whether the developer of this app has specifically flagged this item as accepted in the Workshop - + - + Start downloading this item. + If this returns false the item isn#t getting downloaded. - + - + A case insensitive check for tag - + - + Allows the user to rate a workshop item up or down. - + - + Return a URL to view this item online - + - + The URl to view this item's changelog - + - + The URL to view the comments on this item - + - + The URL to discuss this item - - + - + The URL to view this items stats online - + - + The URL to the preview image for this item - + - Determines whether floats are normalized to zero. If the minimal value is flushed to zero we use a slightly bigger number for Epsilon instead. + Edit this item - + - + Found items must have at least one of the defined tags - + - A simplest and readonly XML class + Found items must have all defined tags - + - + Returns the current Unix Epoch - + - + Convert an epoch to a datetime - + - + Convert a DateTime to a unix time - + - + Returns a StringBuilder. This will get returned and reused later on. - - @interval in seconds - @repeat 0 indicate loop infinitely, otherwise the run count - + + + Returns a StringBuilder. This will get returned and reused later on. + diff --git a/CLEditor/Project Templates/CLEngine.Windows.exe b/CLEditor/Project Templates/CLEngine.Windows.exe index 4ec5b60ee77a0b7b68cf9e35753cbc44378442b6..2ab75f6e0796a9daa987d271d76de7f13706264d 100644 Binary files a/CLEditor/Project Templates/CLEngine.Windows.exe and b/CLEditor/Project Templates/CLEngine.Windows.exe differ diff --git a/CLEditor/Project Templates/Xceed.Wpf.Toolkit.dll b/CLEditor/Project Templates/Xceed.Wpf.Toolkit.dll index 8b678143967747d3f0d3bbce2368d9c78e251eef..19e725ba92fe4db9507c6ec9af7741b382d227fd 100644 Binary files a/CLEditor/Project Templates/Xceed.Wpf.Toolkit.dll and b/CLEditor/Project Templates/Xceed.Wpf.Toolkit.dll differ diff --git a/CLEditor/Properties/Settings.Designer.cs b/CLEditor/Properties/Settings.Designer.cs index bfa16b677e43413232ebe61b7f8d2b87d75a579c..7b354c15424dc476607cb14edf27494b09befcf7 100644 --- a/CLEditor/Properties/Settings.Designer.cs +++ b/CLEditor/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace CLEngine.Editor.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -157,7 +157,8 @@ namespace CLEngine.Editor.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute(".jpg|.png|.jpeg|.gif|.bmp|.txt|.scene|.sln|.ini|.cs|.state|.mp3|.wav|.fnt|.lua")] + [global::System.Configuration.DefaultSettingValueAttribute(".jpg|.png|.jpeg|.gif|.bmp|.txt|.scene|.sln|.ini|.cs|.state|.mp3|.wav|.fnt|.lua|.v" + + "isual")] public string AcceptedExtensions { get { return ((string)(this["AcceptedExtensions"])); diff --git a/CLEditor/Properties/Settings.settings b/CLEditor/Properties/Settings.settings index 2380747747ebf4869ca1dcda2ba4e250087fcec2..1439abf47cbbe0c9913c025f9bcc308f7edfb634 100644 --- a/CLEditor/Properties/Settings.settings +++ b/CLEditor/Properties/Settings.settings @@ -36,7 +36,7 @@ True - .jpg|.png|.jpeg|.gif|.bmp|.txt|.scene|.sln|.ini|.cs|.state|.mp3|.wav|.fnt|.lua + .jpg|.png|.jpeg|.gif|.bmp|.txt|.scene|.sln|.ini|.cs|.state|.mp3|.wav|.fnt|.lua|.visual diff --git a/CLEditor/README.md b/CLEditor/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0f8841e2c99c7709efa0e1dde5b29988b9acc1d2 --- /dev/null +++ b/CLEditor/README.md @@ -0,0 +1,31 @@ +# 编辑器目录 +这里存放编辑器所有核心代码/功能。主要用于可视化开发,文件结构可能会不断的发生变化 + +## 目录结构 + +- bmfont + - 字体文件生成工具 +- content + - 编辑器所用到的资源 +- controls + - 编辑器的自定义控件 +- core + - 编辑器的核心功能 +- graphics_device + - 编辑器可视化界面 +- Layout + - 编辑器布局文件 +- model + - 编辑器的模型数据 +- Project Templates + - 游戏模板 +- theme + - 编辑器主题 +- Tutorials + - 编辑器教程 +- viewmodel + - 编辑器视图模型层 +- windows + - 编辑器窗口 +- 必装运行库 + - 游戏开发所必要的文件 \ No newline at end of file diff --git a/CLEditor/core/BraceFoldingStrategy.cs b/CLEditor/core/BraceFoldingStrategy.cs deleted file mode 100644 index 88332c34a8e449a2d8c86906b2de973f40f52f75..0000000000000000000000000000000000000000 --- a/CLEditor/core/BraceFoldingStrategy.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Collections.Generic; -using ICSharpCode.AvalonEdit.Document; -using ICSharpCode.AvalonEdit.Folding; - -namespace CLEngine.Editor.core -{ - public class BraceFoldingStrategy : AbstractFoldingStrategy - { - public char OpeningBrace { get; set; } - - public char ClosingBrace { get; set; } - - public BraceFoldingStrategy() - { - this.OpeningBrace = '{'; - this.ClosingBrace = '}'; - } - - public override IEnumerable CreateNewFoldings(TextDocument document, out int firstErrorOffset) - { - firstErrorOffset = -1; - return CreateNewFoldings(document); - } - - public IEnumerable CreateNewFoldings(ITextSource document) - { - List newFoldings = new List(); - - Stack startOffsets = new Stack(); - int lastNewLineOffset = 0; - char openingBrace = this.OpeningBrace; - char closingBrace = this.ClosingBrace; - for (int i = 0; i < document.TextLength; i++) - { - char c = document.GetCharAt(i); - if (c == openingBrace) - { - startOffsets.Push(i); - } - else if (c == closingBrace && startOffsets.Count > 0) - { - int startOffset = startOffsets.Pop(); - if (startOffset < lastNewLineOffset) - { - newFoldings.Add(new NewFolding(startOffset, i + 1)); - } - } - else if (c == '\n' || c == '\r') - { - lastNewLineOffset = i + 1; - } - } - newFoldings.Sort((a, b) => a.StartOffset.CompareTo(b.StartOffset)); - return newFoldings; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/windows/PicturePreview.xaml b/CLEditor/nodeNetwork/NodeScriptWindow.xaml similarity index 31% rename from Editor/CLEngine.Editor/windows/PicturePreview.xaml rename to CLEditor/nodeNetwork/NodeScriptWindow.xaml index c7757a7c0cc2dfbe82f11b839b7955d6449c1b7d..b99c0fdefe0d9bb659db60499d5260c98eb7a91c 100644 --- a/Editor/CLEngine.Editor/windows/PicturePreview.xaml +++ b/CLEditor/nodeNetwork/NodeScriptWindow.xaml @@ -1,13 +1,20 @@ - + Title="可视化代码" Height="450" Width="800" + Background="{DynamicResource PanelBackground}"> - + + + + + + diff --git a/CLEditor/nodeNetwork/NodeScriptWindow.xaml.cs b/CLEditor/nodeNetwork/NodeScriptWindow.xaml.cs new file mode 100644 index 0000000000000000000000000000000000000000..bec2fddb482cf5aaa4f50a7d5949ae5cebafa5b5 --- /dev/null +++ b/CLEditor/nodeNetwork/NodeScriptWindow.xaml.cs @@ -0,0 +1,57 @@ +using System; +using System.Reactive.Linq; +using System.Windows; +using DynamicData; +using NodeNetwork.Toolkit.NodeList; +using NodeNetwork.Toolkit.ValueNode; +using NodeNetwork.ViewModels; +using ReactiveUI; + +namespace CLEngine.Editor.nodeNetwork +{ + /// + /// NodeScriptWindow.xaml 的交互逻辑 + /// + public partial class NodeScriptWindow : Window + { + public NodeListViewModel ListViewModel { get; set; } + + public NodeScriptWindow() + { + InitializeComponent(); + + initNodeView(); + } + + private void initNodeView() + { + var network = new NetworkViewModel(); + + var node1 = new NodeViewModel(); + node1.Name = "节点 1"; + network.Nodes.Add(node1); + ListViewModel.AddNodeType(() => node1); + + var node1Input = new ValueNodeInputViewModel(); + node1Input.Name = "节点 1 输入"; + node1.Inputs.Add(node1Input); + + node1Input.ValueChanged.Subscribe(newValue => + { + Console.WriteLine(newValue); + }); + + var node2 = new NodeViewModel(); + node2.Name = "节点 2"; + network.Nodes.Add(node2); + ListViewModel.AddNodeType(() => node2); + + var node2Output = new ValueNodeOutputViewModel(); + node2Output.Value = Observable.Return("测试字符串"); + node2Output.Name = "节点 2 输出"; + node2.Outputs.Add(node2Output); + + networkView.ViewModel = network; + } + } +} diff --git a/CLEditor/nodeNetwork/README.md b/CLEditor/nodeNetwork/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b8cbca77b952a45001fde86854d20bfff8c7e9b7 --- /dev/null +++ b/CLEditor/nodeNetwork/README.md @@ -0,0 +1,5 @@ +# 蓝图设计 +结合API无需代码 + +## 文档 +https://wouterdek.github.io/NodeNetwork/doc \ No newline at end of file diff --git a/CLEditor/notify/README.md b/CLEditor/notify/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7ec0b88cd948d19cde926cb77070d1b28312e30e --- /dev/null +++ b/CLEditor/notify/README.md @@ -0,0 +1,163 @@ +# 编辑器新版提示 +优化原有的提示功能,修改`MessageBox.Show` 为 `NotificationMessageManager`. + +## 基础使用 +在窗口XAML中,放置NotificationMessageContainer控件。 您可以将管理器绑定到视图模型,并通过DI或其他机制获取管理器; 或者可以从后端分配管理器实例。 + +```cs +this.Manager = new NotificationMessageManager(); +``` + +```xml + +``` + +### 简单的“信息”通知 + +```cs +manager.CreateMessage() + .Accent("#1751C3") + .Background("#333") + .HasBadge("信息") + .HasMessage("将在下次应用程序重新启动时安装更新.") + .Dismiss().WithButton("现在更新", button => { }) + .Dismiss().WithButton("更新日志", button => { }) + .Dismiss().WithButton("稍后", button => { }) + .Queue(); +``` + +管理器上的`CreateMessage`创建一个空通知消息。 然后我们设置重点和背景画笔。 `HasBadge`和`HasMessage`将填充通知标记和消息内容。 + +`WithButton`将创建一个具有指定内容的按钮(内容不必是字符串),并在单击时指定操作回调。 如果您在WithButton之前放置Dismiss,您的按钮回调将首先被解雇通知操作拦截 - 通知将在用户输入时被取消。 + +队列将排队消息。 这会将消息传播到通知消息容器控件,然后显示消息(当显示多条消息时,新消息排队到堆栈的底部) + +### 简单的“警告”通知 + +```cs +manager.CreateMessage() + .Accent("#E0A030") + .Background("#333") + .HasBadge("警告") + .HasMessage("无法检索数据.") + .WithButton("重试", button => { }) + .Dismiss().WithButton("忽略", button => { }) + .Queue(); +``` + +### 启用通知消息动画(选择加入功能) + +```cs +manager + ... + .Animates(true) + .AnimationInDuration(0.75) + .AnimationOutDuration(2) + ... +``` + +## 高级用法 + +### 自定义控件叠加通知 + +```cs +manager.CreateMessage() + .Accent("#F15B19") + .Background("#F15B19") + .HasHeader("丢失了与服务器的连接") + .HasMessage("重连中...") + .WithOverlay(new ProgressBar + { + VerticalAlignment = VerticalAlignment.Bottom, + HorizontalAlignment = HorizontalAlignment.Stretch, + Height = 3, + BorderThickness = new Thickness(0), + Foreground = new SolidColorBrush(Color.FromArgb(128, 255, 255, 255)), + Background = Brushes.Transparent, + IsIndeterminate = true, + IsHitTestVisible = false + }) + .Queue(); +``` + +`WithOverlay`允许您设置自定义叠加内容。 在此示例中,进度条位于通知控件的底部。 请注意,`IsHitTextVisible`设置为`false`,以便通知消息按钮不会因为覆盖控件位于按钮底部而失去焦点 + +### 自定义附加通知内容 + +```cs +manager.CreateMessage() + .Accent("#1751C3") + .Background("#333") + .HasBadge("信息") + .HasHeader("可用更新") + .HasMessage("将在下次应用程序重新启动时安装更新.") + .Dismiss().WithButton("现在更新", button => { }) + .Dismiss().WithButton("稍后", button => { }) + .WithAdditionalContent(ContentLocation.Bottom, + new Border + { + BorderThickness = new Thickness(0,1,0,0), + BorderBrush = new SolidColorBrush(Color.FromArgb(128, 28, 28, 28)), + Child = new CheckBox + { + Margin = new Thickness(12, 8, 12, 8), + HorizontalAlignment = HorizontalAlignment.Left, + Content = "不再显示" + } + }) + .Queue(); +``` + +在此示例中,自定义“不再显示”复选框位于邮件的底部。 + +您可以将其他内容添加到以下位置:Top,Bottom,Left,Right,Main,AboveBadge。 + +### 多个通知 + +通知消息容器具有内置支持,可同时显示多个通知。 新通知将显示在邮件堆栈的底部。 + +#### 不喜欢扩展方法? + +扩展方法不包含用于实例化通知的任何复杂逻辑,因此您仍然可以直接使用`NotificationMessageBuilder`类来构建通知消息,而无需扩展方法。 + +```cs +var builder = NotificationMessageBuilder.CreateMessage(); +builder.Manager = this.Manager; +builder.Message = this.Manager.Factory.GetMessage(); +builder.SetAccent(Brushes.DodgerBlue); +builder.SetBackground(Brushes.DimGray); +builder.SetBadge("信息"); +builder.HasMessage("此通知不使用扩展方法构建."); + +var notificationButton = this.Manager.Factory.GetButton(); +notificationButton.Content = "内容"; +notificationButton.Callback = (button) => +{ + this.Manager.Dismiss(builder.Message); + // ... 做其余的事 +}; + +builder.AddButton(notificationButton); +builder.Manager.Queue(builder.Message); +``` + +#### 不喜欢builder? +也支持标准控件实例化。 + +```cs +this.Manager.Queue(new NotificationMessage +{ + Message = "没有消息构建器的Works事件", + BadgeText = "消息", + AccentBrush = Brushes.Orange, + Background = Brushes.Black, + Buttons = new ObservableCollection + { + new NotificationMessageButton() + { + Content = "很棒!", + Callback = button => { } + } + } +}); +``` \ No newline at end of file diff --git a/CLEditor/packages.config b/CLEditor/packages.config index 1370a074251e176d50ab293d5c5d034723402c9a..396118427954b38c56a0c699d414e6b08aec92e9 100644 --- a/CLEditor/packages.config +++ b/CLEditor/packages.config @@ -1,12 +1,20 @@  + + + - + + + + + + @@ -16,4 +24,19 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CLEditor/scriptEditor/README.md b/CLEditor/scriptEditor/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0d2143f8117bf215dc8e6194d9980b2fd4a4177e --- /dev/null +++ b/CLEditor/scriptEditor/README.md @@ -0,0 +1,18 @@ +# 新版本编辑器 +对Lime编辑器进行重写 + +## 未来设计 +### C# + - 智能感知 + - 颜色标注 + - 文本缩进 + - 函数展开/收缩 + +### Lua + - 颜色标注 + - 文本缩进 + - 函数展开/收缩 + +## 文档 + +https://github.com/icsharpcode/AvalonEdit \ No newline at end of file diff --git a/CLEditor/viewmodel/MainViewModel.cs b/CLEditor/viewmodel/MainViewModel.cs index c2861d860e284bd4bb890dfd30cbce5879831eed..46c79bca472a3e115b5a55ff58f10bb86a0b3c84 100644 --- a/CLEditor/viewmodel/MainViewModel.cs +++ b/CLEditor/viewmodel/MainViewModel.cs @@ -3,6 +3,7 @@ using CLEngine.Core.components; using CLEngine.Editor.core; using CLEngine.Editor.model; using CLEngine.Editor.windows; +using Enterwell.Clients.Wpf.Notifications; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using Microsoft.Xna.Framework; @@ -45,6 +46,11 @@ namespace CLEngine.Editor.ViewModel public RelayCommand CompileCommand { get; set; } public RelayCommand DebugCommand { get; set; } public RelayCommand ClearTextureBuffCommand { get; set; } + /// + /// Ϸݿ + /// + public RelayCommand DataBaseCommand { get; set; } + public NotificationMessageManager Manager { get; set; } = App.Manager; public MainViewModel() { @@ -67,6 +73,17 @@ namespace CLEngine.Editor.ViewModel CompileCommand = new RelayCommand(CompileAction); DebugCommand = new RelayCommand(DebugAction); ClearTextureBuffCommand = new RelayCommand(ClearTextureBuffAction); + DataBaseCommand = new RelayCommand(OpenDataBaseAction, CanDataBaseAction); + } + + private void OpenDataBaseAction() + { + new DataBaseWindow().ShowDialog(); + } + + private bool CanDataBaseAction() + { + return false; } private void ClearTextureBuffAction() diff --git a/Editor/CLEngine.Editor/windows/WindowsFormsHostOverlay.xaml b/CLEditor/windows/DataBaseWindow.xaml similarity index 47% rename from Editor/CLEngine.Editor/windows/WindowsFormsHostOverlay.xaml rename to CLEditor/windows/DataBaseWindow.xaml index a2fcb019fe7b3db22a934c7c0fba4db785640297..4ec111a5a340cfb95df0c4ac87caadd00be80b6e 100644 --- a/Editor/CLEngine.Editor/windows/WindowsFormsHostOverlay.xaml +++ b/CLEditor/windows/DataBaseWindow.xaml @@ -1,10 +1,15 @@ - - + Title="游戏数据库" Height="450" Width="800" Background="{DynamicResource PanelBackground}"> + + + + + + diff --git a/Editor/CLEngine.Editor/windows/WindowsFormsHostOverlay.xaml.cs b/CLEditor/windows/DataBaseWindow.xaml.cs similarity index 76% rename from Editor/CLEngine.Editor/windows/WindowsFormsHostOverlay.xaml.cs rename to CLEditor/windows/DataBaseWindow.xaml.cs index 86a5751e0b81dd81b8da90df425c558c4f15b4aa..2503dccb42d5723805ea25265b447925742e5346 100644 --- a/Editor/CLEngine.Editor/windows/WindowsFormsHostOverlay.xaml.cs +++ b/CLEditor/windows/DataBaseWindow.xaml.cs @@ -15,11 +15,11 @@ using System.Windows.Shapes; namespace CLEngine.Editor.windows { /// - /// WindowsFormsHostOverlay.xaml 的交互逻辑 + /// DataBaseWindow.xaml 的交互逻辑 /// - public partial class WindowsFormsHostOverlay : Window + public partial class DataBaseWindow : Window { - public WindowsFormsHostOverlay() + public DataBaseWindow() { InitializeComponent(); } diff --git a/CLEditor/windows/ProjectExplorerTreeView.xaml.cs b/CLEditor/windows/ProjectExplorerTreeView.xaml.cs index 078abde7bd9d56ee464e90c89d39b1d40a5d6778..2cf0ce536a4ac82b82603fda1c6ff3a241369728 100644 --- a/CLEditor/windows/ProjectExplorerTreeView.xaml.cs +++ b/CLEditor/windows/ProjectExplorerTreeView.xaml.cs @@ -14,6 +14,7 @@ using CLEngine.Editor.controls; using CLEngine.Editor.core; using CLEngine.Editor.model; using CLEngine.Core; +using CLEngine.Editor.nodeNetwork; using Microsoft.Win32; // ReSharper disable All @@ -249,6 +250,8 @@ namespace CLEngine.Editor.windows MenuItem sceneItem = EditorUtils.CreateMenuItem("游戏场景", (ImageSource)FindResource("SceneIcon")); MenuItem scriptItem = EditorUtils.CreateMenuItem("C#脚本", (ImageSource)FindResource("CSFileIcon")); MenuItem luaScriptItem = EditorUtils.CreateMenuItem("Lua脚本", (ImageSource) FindResource("LuaFileIcon")); + MenuItem visualScriptItem = EditorUtils.CreateMenuItem("可视化脚本"); + visualScriptItem.IsEnabled = false; MenuItem createFolderItem = EditorUtils.CreateMenuItem("创建文件夹", (ImageSource)FindResource("FolderAddIcon")); MenuItem addFromFolderItem = EditorUtils.CreateMenuItem("从文件夹中添加"); MenuItem renameItem = EditorUtils.CreateMenuItem("重命名", (ImageSource)FindResource("RenameIcon")); @@ -261,6 +264,7 @@ namespace CLEngine.Editor.windows createItem.Items.Add(new Separator()); createItem.Items.Add(scriptItem); createItem.Items.Add(luaScriptItem); + createItem.Items.Add(visualScriptItem); // other directories @@ -278,6 +282,7 @@ namespace CLEngine.Editor.windows scriptItem.Click += scriptItem_Click; luaScriptItem.Click += LuaScriptItemOnClick; + visualScriptItem.Click += VisualScriptItemOnClick; sceneItem.Click += createSceneItem_Click; createFolderItem.Click += createFolderItem_Click; addFromFolderItem.Click += addFromFolder_Click; @@ -329,6 +334,27 @@ namespace CLEngine.Editor.windows watcher.Renamed += WatcherEventRaise; } + private void VisualScriptItemOnClick(object sender, RoutedEventArgs e) + { + string tname = "Script"; int c = 1; + while (File.Exists((SelectedItem as ExplorerTreeViewItem)?.FullPath + "\\" + tname + ".visual")) + { + tname = "Script" + c; + c++; + } + + tname += ".visual"; + + ExplorerTreeViewItem node = AddNode(SelectedItem as ExplorerTreeViewItem, tname, 10); + ((ExplorerTreeViewItem)SelectedItem).IsExpanded = true; + node.IsSelected = true; + node.Tag = "file"; + node.ContextMenu = fileContextMenu; + + BeginEditTextOnSelected(); + beforeEditingPath = ".visual"; + } + private void TimerOnTick(object sender, EventArgs e) { if (SceneManager.GameProject.ProjectPath != watcher.Path) @@ -730,6 +756,10 @@ namespace CLEngine.Editor.windows File.WriteAllText(destination, script); } + else if (Path.GetExtension(beforeEditingPath).ToLower().Equals(".visual")) + { + File.WriteAllText(destination, ""); + } if (Path.GetExtension(beforeEditingPath).ToLower().Equals(".cs")) { @@ -985,6 +1015,9 @@ namespace CLEngine.Editor.windows //EditorHandler.EditorSplitterContainer.Panel2Collapsed = true; EditorHandler.ChangeSelectedObjects(); break; + case ".visual": + new NodeScriptWindow().ShowDialog(); + break; case ".lua": case ".cs": // TODO: 添加打开.cs文件的行为 diff --git a/CLEditor/windows/ScriptingEditorWindow.xaml.cs b/CLEditor/windows/ScriptingEditorWindow.xaml.cs index 59be07af06a82fb3d80e1ef3de11d3e67b929473..80291528fc66b4473e38da014198c6302f74facf 100644 --- a/CLEditor/windows/ScriptingEditorWindow.xaml.cs +++ b/CLEditor/windows/ScriptingEditorWindow.xaml.cs @@ -182,8 +182,6 @@ namespace CLEngine.Editor.windows if (srcFileOpen == -1) // not found { FoldingManager foldingManager; - AbstractFoldingStrategy foldingStrategy; - foldingStrategy = new BraceFoldingStrategy(); TextEditor textEditor = new TextEditor(); textEditor.TextArea.IndentationStrategy = new ICSharpCode.AvalonEdit.Indentation.CSharp.CSharpIndentationStrategy(textEditor.Options); @@ -200,7 +198,6 @@ namespace CLEngine.Editor.windows textEditor.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; foldingManager = FoldingManager.Install(textEditor.TextArea); - foldingStrategy.UpdateFoldings(foldingManager, textEditor.Document); TabItem tabItem = new TabItem(); tabItem.Style = FindResource("TabItemStyle") as Style; diff --git a/Editor/CLEngine.Editor/App.config b/Editor/CLEngine.Editor/App.config deleted file mode 100644 index 20ef5c37e7c7306393592fb1747f52ef4745def9..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/App.config +++ /dev/null @@ -1,70 +0,0 @@ - - - - -
- -
- - - - - - - - Default - - - False - - - False - - - animatedsprite - - - Lime - - - - - - - - - True - - - True - - - True - - - True - - - .jpg|.png|.jpeg|.gif|.bmp|.txt|.scene|.sln|.ini|.cs|.state|.mp3|.wav|.fnt|.lua - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/App.xaml b/Editor/CLEngine.Editor/App.xaml deleted file mode 100644 index 924328099b8ddc10e4f1dcbed683efff8aa94a60..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/App.xaml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/App.xaml.cs b/Editor/CLEngine.Editor/App.xaml.cs deleted file mode 100644 index 8264919c7063fd858ce8a834cf2c7562fe25c4ad..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/App.xaml.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Windows; -using System.Windows.Forms; -using System.Windows.Threading; -using CLEngine.Core; -using Exceptionless; - -namespace CLEngine.Editor -{ - /// - /// App.xaml 的交互逻辑 - /// - public partial class App - { - protected override async void OnStartup(StartupEventArgs e) - { - base.OnStartup(e); - - if (SceneManager.GameProject != null && - SceneManager.GameProject.EditorSettings != null && - !SceneManager.GameProject.EditorSettings.CatchError) - { - return; - } - - ExceptionlessClient.Default.Register(); - - DispatcherUnhandledException += Target; - } - - private void Target(object sender, DispatcherUnhandledExceptionEventArgs e) - { - if (SceneManager.GameProject != null && - SceneManager.GameProject.EditorSettings != null && - !SceneManager.GameProject.EditorSettings.CatchError) - { - e.Handled = true; - return; - } - - e.Exception.ToExceptionless().Submit(); - e.Handled = true; - } - } -} diff --git a/Editor/CLEngine.Editor/CLEngine.Editor.csproj b/Editor/CLEngine.Editor/CLEngine.Editor.csproj deleted file mode 100644 index 2bd0edc12a6c67f11fa7d4a7b846916bc79109d1..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/CLEngine.Editor.csproj +++ /dev/null @@ -1,862 +0,0 @@ - - - - - Debug - AnyCPU - {3B8DB573-565B-49FD-B0C6-6B82AB9A746F} - WinExe - CLEngine.Editor - CLEngine.Editor - v4.7.2 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - true - true - - - - - x64 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - 7.1 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - 7.1 - - - clengine.ico - - - true - bin\Release\ - DEBUG;TRACE - full - AnyCPU - 7.1 - prompt - MinimumRecommendedRules.ruleset - false - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - 7.1 - prompt - MinimumRecommendedRules.ruleset - true - - - - ..\packages\CommonServiceLocator.2.0.2\lib\net47\CommonServiceLocator.dll - - - True - - - True - - - ..\packages\Exceptionless.Signed.4.3.2027\lib\net45\Exceptionless.Signed.dll - - - ..\packages\Exceptionless.Wpf.Signed.4.3.2027\lib\net45\Exceptionless.Wpf.Signed.dll - - - ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll - - - ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll - - - ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll - - - False - .\ICSharpCode.AvalonEdit.dll - - - ..\packages\Lidgren.Network.1.0.2\lib\net451\Lidgren.Network.dll - - - ..\packages\log4net.2.0.3\lib\net40-full\log4net.dll - - - - - - ..\packages\MonoGame.Framework.WpfInterop.1.7.1\lib\net452\MonoGame.Framework.WpfInterop.dll - - - ..\engine-core\NAudio.dll - - - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - - - - - ..\packages\SharpDX.4.0.1\lib\net45\SharpDX.dll - - - ..\packages\SharpDX.Direct2D1.4.0.1\lib\net45\SharpDX.Direct2D1.dll - - - ..\packages\SharpDX.Direct3D11.4.0.1\lib\net45\SharpDX.Direct3D11.dll - - - ..\packages\SharpDX.Direct3D9.4.0.1\lib\net45\SharpDX.Direct3D9.dll - - - ..\packages\SharpDX.DXGI.4.0.1\lib\net45\SharpDX.DXGI.dll - - - ..\packages\SharpDX.Mathematics.4.0.1\lib\net45\SharpDX.Mathematics.dll - - - ..\packages\SharpDX.MediaFoundation.4.0.1\lib\net45\SharpDX.MediaFoundation.dll - - - ..\packages\SharpDX.XAudio2.4.0.1\lib\net45\SharpDX.XAudio2.dll - - - ..\packages\SharpDX.XInput.4.0.1\lib\net45\SharpDX.XInput.dll - - - - - - - - - - - - - ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll - - - - - - - - - 4.0 - - - - - - - - - False - .\Xceed.Wpf.AvalonDock.Themes.IgniteDark.dll - - - - - MSBuild:Compile - Designer - - - - - - - - - - - TutorialContainer.xaml - - - TutorialsCategoryContainer.xaml - - - VisualScriptingNode.xaml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - - AddNewItemWindow.xaml - - - CompilerWindow.xaml - - - CreateMapWindow.xaml - - - DeploymentWindow.xaml - - - FirstLoginWindow.xaml - - - LoginOrRegister.xaml - - - ManageTagsWindow.xaml - - - NewProjectWindow.xaml - - - PicturePreview.xaml - - - ProjectExplorerTreeView.xaml - - - PropertyBox.xaml - - - SceneHierarchyTreeView.xaml - - - ScriptingEditorWindow.xaml - - - SettingsWindow.xaml - - - StartupForm.xaml - - - TilesetBrushControl.xaml - - - TutorialsListWindow.xaml - - - TutorialWindow.xaml - - - WindowsFormsHostOverlay.xaml - - - PreserveNewest - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - PreserveNewest - - - ResXFileCodeGenerator - Resources.Designer.cs - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - {ee1e531c-7118-4ff5-ad75-88af1dfe0bf4} - CLEngine.Net.Package - - - {6e3968e7-75d8-4d31-9b24-788b719d5e2e} - CLEngine.Core - - - {7de47032-a904-4c29-bd22-2d235e8d91ba} - MonoGame.Framework.Windows - - - {db81988f-e0f2-45a0-a1fd-8c37f3d35244} - Xceed.Wpf.AvalonDock - - - {72e591d6-8f83-4d8c-8f67-9c325e623234} - Xceed.Wpf.Toolkit - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/CLEngine.Editor.csproj.DotSettings b/Editor/CLEngine.Editor/CLEngine.Editor.csproj.DotSettings deleted file mode 100644 index b9fd6ee4f5aa023962b54c614facb5b0ced692c5..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/CLEngine.Editor.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - CSharp80 \ No newline at end of file diff --git a/Editor/CLEngine.Editor/ClientManager.cs b/Editor/CLEngine.Editor/ClientManager.cs deleted file mode 100644 index 2cc6213b472b10fc15a3dd23e1012583cdfefb62..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/ClientManager.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using System.Windows.Threading; -using CLEngine.Core.server; -using Lidgren.Network; - -namespace CLEngine.Editor -{ - public static class ClientManager - { - public static NetClient Client; - public static NetIncomingMessage msg; - - public static NetConnection Connection; - - static ClientManager() - { - var config = new NetPeerConfiguration(ServerConfig.CommonServer); - - Client = new NetClient(config); - Client.Start(); - - var backgroundThread = new BackgroundWorker(); - backgroundThread.DoWork += (sender, args) => - { - while (true) - { - while ((msg = Client.ReadMessage()) != null) - { - if (msg.MessageType == NetIncomingMessageType.StatusChanged) - if (msg.SenderConnection.Status == NetConnectionStatus.Disconnected) - { - Connection = null; - - ShowMessage("连接失败"); - } - - Client.Recycle(msg); - } - } - }; - - backgroundThread.RunWorkerAsync(); - } - - private static void ShowMessage(string message) - { - Dispatcher.CurrentDispatcher.Invoke(() => - { - MessageBox.Show(message); - }); - } - - public static NetConnection Connect(Server_LR serverLR) - { - var message = Client.CreateMessage(serverLR.ToStringFormatter()); - return Client.Connect(ServerConfig.CommonServerHost, ServerConfig.CommonServerPort, message); - } - } -} diff --git a/Editor/CLEngine.Editor/ICSharpCode.AvalonEdit.dll b/Editor/CLEngine.Editor/ICSharpCode.AvalonEdit.dll deleted file mode 100644 index d4f11a3360061679a29bde43fb46ce12a66a79cd..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/ICSharpCode.AvalonEdit.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Layout/Default.layout b/Editor/CLEngine.Editor/Layout/Default.layout deleted file mode 100644 index 68bd8fad91752d8c1c13cc10690612fc0a3f394e..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Layout/Default.layout +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/MainWindow.xaml b/Editor/CLEngine.Editor/MainWindow.xaml deleted file mode 100644 index 86a26d1395b1233502b155a7ee1408a7e870ac8b..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/MainWindow.xaml +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Editor/CLEngine.Editor/MainWindow.xaml.cs b/Editor/CLEngine.Editor/MainWindow.xaml.cs deleted file mode 100644 index 81405916e3dc4e021fabea8313cba912b21456b5..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/MainWindow.xaml.cs +++ /dev/null @@ -1,1130 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Deployment.Application; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Threading; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; -using CLEngine.Editor.controls; -using CLEngine.Editor.core; -using CLEngine.Editor.graphics_device; -using CLEngine.Editor.model; -using CLEngine.Editor.windows; -using CLEngine.Core; -using CLEngine.Core.components; -using Microsoft.Xna.Framework; -using DragDropEffects = System.Windows.DragDropEffects; -using DragEventArgs = System.Windows.DragEventArgs; -using Matrix = Microsoft.Xna.Framework.Matrix; -using MessageBox = System.Windows.MessageBox; -using MouseEventArgs = System.Windows.Forms.MouseEventArgs; -// ReSharper disable All - -namespace CLEngine.Editor -{ - /// - /// MainWindow.xaml 的交互逻辑 - /// - public partial class MainWindow - { - static bool fullscreen; - public static MainWindow Instance; - - public MainWindow(string projectPath) - { - Instance = this; - projectPathToLoad = string.Empty; - lastLatestProjects = string.Empty; - InitializeComponent(); - - SetFullScreen(Properties.Settings.Default.StartOnFullScreen); - - Initialize(); - - projectPathToLoad = projectPath; - } - - string lastLatestProjects; - string projectPathToLoad; - public SceneViewGameControl sceneViewGameControl; - public System.Windows.Forms.Timer timer; - System.Windows.Forms.Timer timerUI; - EditorModes lastEditorMode; - ApplicationDeployment deployment; - string versionInfo; - ContextMenu gameViewContextMenu; - - private void Initialize() - { - OutputDataGrid.ItemsSource = EditorHandler.OutputMessages; - ((ObservableCollection) OutputDataGrid.ItemsSource).CollectionChanged += MainWindow_CollectionChanged; - - sceneViewGameControl = new SceneViewGameControl(); - SceneViewFormContainer.Children.Add(sceneViewGameControl); - - EditorHandler.SceneViewControl = sceneViewGameControl; - EditorHandler.PropertyGridContainer = PropertyGridContainer; - EditorHandler.SceneTreeView = sceneTreeView; - EditorHandler.ProjectTreeView = projectTreeView; - EditorHandler.UnDoRedo = new UndoRedo(); - EditorHandler.TilesetMenuItems = tilesetMenuItems; - // Expander's Context Menu - OutputExpander.ContextMenu = new ContextMenu(); - - // TODO 改变图像源 - MenuItem ClearItem = EditorUtils.CreateMenuItem("Clear"); - - OutputExpander.ContextMenu.Items.Add(ClearItem); - - // event handlers - ClearItem.Click += ClearItem_Click; - Closed += MainWindow_Closed; - ContentRendered += MainWindow_ContentRendered; - - sceneViewGameControl.AllowDrop = true; - sceneViewGameControl.DragEnter += SceneViewGameControlOnDragEnter; - sceneViewGameControl.DragOver += SceneViewGameControlOnDragOver; - - } - - private void SceneViewGameControlOnDragOver(object sender, DragEventArgs e) - { - if (SceneManager.ActiveScene == null) return; - - if (e.Data.GetDataPresent(typeof(ExplorerTreeViewItem))) - { - FieldInfo info; - object obj; - info = e.Data.GetType().GetField("innerData", BindingFlags.NonPublic | BindingFlags.Instance); - if (info == null) - return; - - obj = info.GetValue(e.Data); - info = obj.GetType().GetField("innerData", BindingFlags.NonPublic | BindingFlags.Instance); - DataObject dataObj = info.GetValue(obj) as DataObject; - ExplorerTreeViewItem item = dataObj.GetData(typeof(ExplorerTreeViewItem)) as ExplorerTreeViewItem; - - if (EditorUtils.isDirectory(item.FullPath)) return; - - string relativePath = item.FullPath.Replace(SceneManager.GameProject.ProjectPath + "\\", string.Empty); - string name = Path.GetFileNameWithoutExtension(relativePath); - - - string[] extensions = item.Text.ToLower().Split('.'); - - - string secundaryExtension = string.Empty; - if (extensions.Length > 2) - secundaryExtension = extensions[extensions.Length - 2]; - - GameObject objToAdd = null; - - if (secundaryExtension.ToLower().Equals(Properties.Settings.Default.secundaryExtension)) - { - objToAdd = new AnimatedSprite() { ImageName = relativePath, Name = name.ToLower().Replace("." + Properties.Settings.Default.secundaryExtension, ""), TotalFramesPerRow = 1, TotalRows = 1 }; - } - else - { - string extension = extensions.Last(); - - switch (extension) - { - case "png": - case "jpeg": - case "jpg": - case "gif": - case "bmp": - objToAdd = new Sprite() { ImageName = relativePath, Name = name }; - break; - case "mp3": - case "wav": - objToAdd = new AudioObject() { FilePath = relativePath, Name = name }; - break; - } - } - - if (objToAdd != null) - { - EditorHandler.SceneTreeView.AddGameObject(objToAdd, "", true); - EditorHandler.ChangeSelectedObjects(); - } - - - } - } - - private void shiftUpTileset_Click(object sender, RoutedEventArgs e) - { - if (EditorHandler.SelectedGameObjects.Count == 0 || !(EditorHandler.SelectedGameObjects[0] is Tileset)) return; - - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset).DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset).ShiftUp(1); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset).Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - - private void refreshTileset_Click(object sender, RoutedEventArgs e) - { - if (EditorHandler.SelectedGameObjects.Count > 0 && EditorHandler.SelectedGameObjects[0] is Tileset) - { - EditorHandler.TilesetBrushControl.ChangeImageSource((EditorHandler.SelectedGameObjects[0] as Tileset).ImageName); - } - } - - private void convertToCollision_Click(object sender, RoutedEventArgs e) - { - ToCollisionBlock(); - } - - private void clearTextureBuffBtn_Click(object sender, RoutedEventArgs e) - { - TextureLoader.Clear(); - } - - private void selectAll_Click(object sender, RoutedEventArgs e) - { - EditorHandler.SelectedGameObjects = GameObject.GetAllGameObjects(); - EditorHandler.ChangeSelectedObjects(); - } - - private void clearSelection_Click(object sender, RoutedEventArgs e) - { - EditorHandler.SelectedGameObjects.Clear(); - EditorHandler.ChangeSelectedObjects(); - } - - private void rotate180º_Click(object sender, RoutedEventArgs e) - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - EditorHandler.UnDoRedo.InsertInUnDoRedoForRotate(gameObject.Transform.Rotation + (float)Math.PI, - gameObject.Transform.Rotation, gameObject); - - gameObject.Transform.Rotation += (float)Math.PI; - } - } - - private void Window_Loaded_1(object sender, RoutedEventArgs e) - { - LayoutHelper.DockManager = dockManager; - - // Attempts to load the latest used layout - //if (Properties.Settings.Default.Layout.Equals("Default")) - //{ - // // attempts to load Gibbo's default layout - // LayoutHelper.LoadGibbsoDefaultLayout(); - // return; - //} - - //if (LayoutHelper.LayoutExists(Properties.Settings.Default.Layout)) - //{ - EditorCommands.ShowOutputMessage("试图加载用户保存的布局"); - if (LayoutHelper.LoadLayout(Properties.Settings.Default.Layout)) - { - EditorCommands.ShowOutputMessage("用户已保存的布局已成功加载"); - } - else - EditorCommands.ShowOutputMessage("用户保存的布局加载尝试失败"); - //} - } - - private void Window_Closing_1(object sender, System.ComponentModel.CancelEventArgs e) - { - LayoutHelper.CreateNewLayout(Properties.Settings.Default.Layout); - Properties.Settings.Default.Save(); - - if (SceneManager.ActiveScene != null) - { - MessageBoxResult r = MessageBox.Show("是否要保存当前场景?", "警告", MessageBoxButton.YesNoCancel); - - if (r == MessageBoxResult.Yes) - { - SceneManager.SaveActiveScene(); - } - else if (r == MessageBoxResult.Cancel) - { - e.Cancel = true; - } - } - - if (!e.Cancel) - { - LimeScriptEditor.Instance.Close(); - // Dispose opengl context (GraphicsDevice.OpenGL.PlatformDispose()) - sceneViewGameControl.GraphicsDevice.Dispose(); - Application.Current.Shutdown(); - } - } - - private void Window_KeyDown_1(object sender, KeyEventArgs e) - { - - // - // shortcuts - switch (e.Key) - { - case Key.F11: - SetFullScreen(!fullscreen); - break; - case Key.F5: - debugProject(); - break; - case Key.F6: - compileProject(); - break; - default: - break; - } - - } - - private void rotate90ºInverse_Click(object sender, RoutedEventArgs e) - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - EditorHandler.UnDoRedo.InsertInUnDoRedoForRotate(gameObject.Transform.Rotation + (float)Math.PI / 2, - gameObject.Transform.Rotation, gameObject); - - gameObject.Transform.Rotation -= (float)Math.PI / 2; - } - } - - private void numericScale_Click(object sender, RoutedEventArgs e) - { - if (EditorHandler.SelectedGameObjects.Count > 0) - { - // 检查:我认为还没有完成numericScale - //new NumericScale().ShowDialog(); - } - else - { - MessageBox.Show("没有选择对象", "Error", MessageBoxButton.OK, MessageBoxImage.Error); - } - } - - private void ResetLayoutClick(object sender, RoutedEventArgs e) - { - EditorCommands.ShowOutputMessage("试图重置布局"); - LayoutHelper.LoadCDefaultLayout(); - } - - private void MenuItem_tutorial_click(object sender, RoutedEventArgs e) - { - TutorialsListWindow tutoListWindow = new TutorialsListWindow(); - tutoListWindow.ShowDialog(); - } - - private void fullDebug_Click_1(object sender, RoutedEventArgs e) - { - fullDebugProject(); - } - - private void scaleBtn_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.EditorMode = EditorModes.Scale; - } - - private void rotateBtn_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.EditorMode = EditorModes.Rotate; - } - - private void translateBtn_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.EditorMode = EditorModes.Move; - } - - private void selectBtn_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.EditorMode = EditorModes.Select; - } - - private async void checkForUpdatesBtn_Click(object sender, RoutedEventArgs e) - { - } - - private void websiteBtn_Click(object sender, RoutedEventArgs e) - { - Process.Start("http://www.hyuan.org/"); - } - - private void aboutBtn_Click(object sender, RoutedEventArgs e) - { - Process.Start("http://www.hyuan.org/"); - } - - private void MenuItem_Click_1(object sender, RoutedEventArgs e) - { - Process.Start("http://www.hyuan.org/Help"); - } - - private void MenuItem_Click_3(object sender, RoutedEventArgs e) - { - Process.Start("http://doc.hyuan.org:4999/web/#/7?page_id=392"); - } - - private void DebugResetClick(object sender, RoutedEventArgs e) - { - var serializer = new Xceed.Wpf.AvalonDock.Layout.Serialization.XmlLayoutSerializer(dockManager); - using (var stream = new StreamWriter(@".\Layout\Default.layout")) - serializer.Serialize(stream); - } - - private void LayoutMenuItem_PreviewMouseDown(object sender, MouseButtonEventArgs e) - { - CurrentLayoutMenuItem.Header = "目前设定: " + Properties.Settings.Default.Layout; - } - - private void MenuItem_Click_4(object sender, RoutedEventArgs e) - { - EditorHandler.SceneViewControl.TakeScreenshot(); - } - - private void bmFont_Click(object sender, RoutedEventArgs e) - { - try - { - ProcessStartInfo startInfo = new ProcessStartInfo(); - startInfo.FileName = "bmfont\\bmfont.exe"; - startInfo.Arguments = "bmfont\\bmsettings.bmfc"; - Process.Start(startInfo); - } - catch (Exception exception) - { - MessageBox.Show(exception.Message); - } - } - - private void reset_Click(object sender, RoutedEventArgs e) - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - EditorHandler.UnDoRedo.InsertInUnDoRedoForRotate(0, - gameObject.Transform.Rotation, gameObject); - - gameObject.Transform.Rotation = 0; - } - } - - private void rotate45ºInverse_Click(object sender, RoutedEventArgs e) - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - EditorHandler.UnDoRedo.InsertInUnDoRedoForRotate(gameObject.Transform.Rotation - (float)Math.PI / 4, - gameObject.Transform.Rotation, gameObject); - - gameObject.Transform.Rotation -= (float)Math.PI / 4; - } - } - - private void rotate45º_Click(object sender, RoutedEventArgs e) - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - EditorHandler.UnDoRedo.InsertInUnDoRedoForRotate(gameObject.Transform.Rotation + (float)Math.PI / 4, - gameObject.Transform.Rotation, gameObject); - - gameObject.Transform.Rotation += (float)Math.PI / 4; - } - } - - - private void rotate90º_Click(object sender, RoutedEventArgs e) - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - EditorHandler.UnDoRedo.InsertInUnDoRedoForRotate(gameObject.Transform.Rotation + (float)Math.PI / 2, - gameObject.Transform.Rotation, gameObject); - - gameObject.Transform.Rotation += (float)Math.PI / 2; - } - } - - private void MenuItem_Click_2(object sender, RoutedEventArgs e) - { - fullDebugProject(); - } - - private void debugBtn_Click(object sender, RoutedEventArgs e) - { - debugProject(); - } - - private void sceneSettingsBtn_Click(object sender, RoutedEventArgs e) - { - EditorHandler.ChangeSelectedObject(SceneManager.ActiveScene); - } - - private void compileBtn_Click(object sender, RoutedEventArgs e) - { - compileProject(); - } - - private void CommandBinding_Executed_1(object sender, ExecutedRoutedEventArgs e) - { - fullDebugProject(); - } - - private void fullDebugProject() - { - if (compileProject()) - debugProject(); - } - - private void debugProject() - { - EditorCommands.ApplyBlurEffect(this); - EditorCommands.DebugGame(); - EditorCommands.ClearEffect(this); - } - - private bool compileProject() - { - EditorCommands.ApplyBlurEffect(this); - - CompilerWindow cw = new CompilerWindow(); - - cw.ShowDialog(); - EditorCommands.ClearEffect(this); - EditorCommands.CreatePropertyGridView(); - - return cw.Result; - } - - private void CommandBinding_Executed_2(object sender, ExecutedRoutedEventArgs e) - { - ToCollisionBlock(); - } - - private void ToCollisionBlock() - { - if (sceneViewGameControl.SelectionArea != Rectangle.Empty) - { - GameObject gameObject = new GameObject(); - gameObject.Name = "Collision Block"; - - gameObject.Transform.Position = - new Vector2(sceneViewGameControl.SelectionArea.X + sceneViewGameControl.SelectionArea.Width / 2, - sceneViewGameControl.SelectionArea.Y + sceneViewGameControl.SelectionArea.Height / 2); - - SceneManager.ActiveScene.GameObjects.Add(gameObject); - - RectangleBody body = new RectangleBody(); - body.EditorExpanded = true; - - gameObject.AddComponent(body); - - body.Width = sceneViewGameControl.SelectionArea.Width; - body.Height = sceneViewGameControl.SelectionArea.Height; - body.BodyType = FarseerPhysics.Dynamics.BodyType.Static; - - sceneTreeView.CreateView(); - - EditorHandler.SelectedGameObjects = new List(); - EditorHandler.SelectedGameObjects.Add(gameObject); - EditorHandler.ChangeSelectedObjects(); - } - else - MessageBox.Show("没有提供有效选择,请在执行此命令之前选择一个场景", "错误"); - } - - private void CopyKeyBinding(object sender, ExecutedRoutedEventArgs e) - { - if (SceneViewFormContainer.IsFocused || sceneTreeView.canCopyPaste) - { - EditorCommands.CopySelectedObjects(); - } - } - - private void PasteKeyBinding(object sender, ExecutedRoutedEventArgs e) - { - if (SceneViewFormContainer.IsFocused || sceneTreeView.canCopyPaste) - { - EditorCommands.PasteSelectedObjects(); - } - } - - private void SceneViewGameControlOnDragEnter(object sender, DragEventArgs e) - { - if (SceneManager.ActiveScene == null) return; - - if (e.Data.GetDataPresent(typeof(ExplorerTreeViewItem))) - { - e.Effects = DragDropEffects.Move; - } - } - - void MainWindow_ContentRendered(object sender, EventArgs e) - { - //overlay = new WindowsFormsHostOverlay(SceneViewFormContainer, sceneViewGameControl); - - //this.DataContext = new ButtonVisibilityViewModel(this); - - //System.Windows.Controls.Canvas.SetZIndex(overlay, 1); - - if (projectPathToLoad != string.Empty) - { - EditorCommands.LoadProject(projectPathToLoad); - projectPathToLoad = string.Empty; - } - - AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); - - timerUI = new System.Windows.Forms.Timer(); - timerUI.Interval = 100; - timerUI.Tick += timerUI_Tick; - timerUI.Enabled = true; - - EditorHandler.TilesetBrushControl = TilesetControl; - - //propertyGrid.SelectedObject = new AnimatedSprite(); - - if (ApplicationDeployment.IsNetworkDeployed) - { - deployment = ApplicationDeployment.CurrentDeployment; - versionInfo = deployment.CurrentVersion.ToString(); - } - - gameViewContextMenu = new ContextMenu(); - - CMenuItem panelCreateObjectItem = EditorUtils.CreateMenuItem("创建新对象...", (ImageSource)FindResource("GameObjectIcon_Sprite")); - CMenuItem panelAddFromStateItem = EditorUtils.CreateMenuItem("从某状态...", null); - CMenuItem panelPasteItem = EditorUtils.CreateMenuItem("粘贴", (ImageSource)FindResource("PasteIcon")); - - gameViewContextMenu.Items.Add(panelCreateObjectItem); - gameViewContextMenu.Items.Add(new Separator()); - gameViewContextMenu.Items.Add(panelAddFromStateItem); - gameViewContextMenu.Items.Add(new Separator()); - gameViewContextMenu.Items.Add(panelPasteItem); - - SceneViewFormContainer.ContextMenu = gameViewContextMenu; - - panelCreateObjectItem.Click += createObjectItem_Click; - panelAddFromStateItem.Click += addFromStateItem_Click; - panelPasteItem.Click += panelPasteItem_Click; - } - - static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) - { - //仅当公共语言运行库尝试绑定到程序集并失败时,才会调用此处理程序 - - //检索AssemblyName数组中引用的程序集列表 - Assembly objExecutingAssemblies; - string strTempAssmbPath = ""; - - objExecutingAssemblies = Assembly.GetExecutingAssembly(); - AssemblyName[] arrReferencedAssmbNames = objExecutingAssemblies.GetReferencedAssemblies(); - - //循环遍历引用的程序集名称数组 - foreach (AssemblyName strAssmbName in arrReferencedAssmbNames) - { - //Console.WriteLine("search: " + SceneManager.GameProject.ProjectPath + "\\" + args.Name.Substring(0, args.Name.IndexOf(",")) + ".dll"); - //Console.WriteLine("aa: " + args.Name.Substring(0, args.Name.IndexOf(","))); - //检查引发“AssemblyResolve”事件的程序集名称 - if (strAssmbName.FullName.Substring(0, strAssmbName.FullName.IndexOf(",")) == args.Name.Substring(0, args.Name.IndexOf(","))) - { - //从必须加载的位置构建程序集的路径 - //strTempAssmbPath = "C:\\Myassemblies\\" + args.Name.Substring(0, args.Name.IndexOf(",")) + ".dll"; - strTempAssmbPath = SceneManager.GameProject.ProjectPath + "\\" + args.Name.Substring(0, args.Name.IndexOf(",")) + ".dll"; - break; - } - } - - if (strTempAssmbPath == "") - { - foreach (string fileName in Directory.GetFiles(SceneManager.GameProject.ProjectPath + "\\libs\\")) - { - string asmName = Path.GetFileName(fileName); - //Console.WriteLine("search: " + asmName.Replace(".dll", "") + " == " + args.Name.Substring(0, args.Name.IndexOf(","))); - if (asmName.Replace(".dll", "") == args.Name.Substring(0, args.Name.IndexOf(","))) - { - // Console.WriteLine("entrei"); - strTempAssmbPath = SceneManager.GameProject.ProjectPath + "\\libs\\" + asmName; - break; - } - } - } - - if (strTempAssmbPath == "") - { - return SceneManager.ScriptsAssembly; - } - - //加载并返回加载的组件 - return Assembly.LoadFrom(strTempAssmbPath); - } - - void timerUI_Tick(object sender, EventArgs e) - { - if (SceneManager.GameProject != null) - { - string sceneName = (SceneManager.ActiveScene != null) ? sceneName = Path.GetFileNameWithoutExtension(SceneManager.ActiveScenePath) : ""; - - Title = string.Format("{0} - {1} - {2}", "CLEngine 2D [" + versionInfo + "]", - SceneManager.GameProject.ProjectName, sceneName); - - showGridBtn.IsChecked = SceneManager.GameProject.EditorSettings.ShowGrid; - gridSnappingBtn.IsChecked = SceneManager.GameProject.EditorSettings.SnapToGrid; - showCollisionsBtn.IsChecked = SceneManager.GameProject.EditorSettings.ShowCollisions; - debugViewBtn.IsChecked = Properties.Settings.Default.ShowDebugView; - // Console.WriteLine(sceneEditorControl1.EditorMode + ":" + lastEditorMode); - - if (sceneViewGameControl.EditorMode != lastEditorMode) - { - selectBtn.IsChecked = false; - translateBtn.IsChecked = false; - rotateBtn.IsChecked = false; - scaleBtn.IsChecked = false; - - if (sceneViewGameControl.EditorMode == EditorModes.Select) - { - selectBtn.IsChecked = true; - } - else if (sceneViewGameControl.EditorMode == EditorModes.Move) - { - translateBtn.IsChecked = true; - } - else if (sceneViewGameControl.EditorMode == EditorModes.Rotate) - { - rotateBtn.IsChecked = true; - } - else if (sceneViewGameControl.EditorMode == EditorModes.Scale) - { - scaleBtn.IsChecked = true; - } - - lastEditorMode = sceneViewGameControl.EditorMode; - } - } - } - - private void projectSettingsBtn_Click(object sender, RoutedEventArgs e) - { - new SettingsWindow().ShowDialog(); - } - - private void MenuItem_PreviewMouseLeftButtonDown_1(object sender, MouseButtonEventArgs e) - { - if (lastLatestProjects == Properties.Settings.Default.LastLoadedProjects) - return; - - lastLatestProjects = Properties.Settings.Default.LastLoadedProjects; - - loadRecentMenuItem.Items.Clear(); - - if (Properties.Settings.Default.LastLoadedProjects.Trim() != string.Empty) - { - string[] splitted = Properties.Settings.Default.LastLoadedProjects.Split('|'); - int c = 0; - foreach (string split in splitted) - { - if (split.Trim() != string.Empty && File.Exists(split)) - { - MenuItem item = new MenuItem(); - - item.Header = CHelper.SplitCamelCase(Path.GetDirectoryName(split).Split('\\').Last()); - item.Width = 200; - - item.Click += ((s, _e) => - { - EditorCommands.AddToProjectHistory(split); - EditorCommands.LoadProject(split); - }); - - loadRecentMenuItem.Items.Add(item); - } - - c++; - if (c == 8) - break; - } - } - else - { - loadRecentMenuItem.Visibility = Visibility.Collapsed; - } - } - - private void saveSceneBtn_Click(object sender, RoutedEventArgs e) - { - SceneManager.SaveActiveScene(); - EditorCommands.ShowOutputMessage("游戏场景已保存"); - } - - private void exportSceneXMLBtn_Click(object sender, RoutedEventArgs e) - { - EditorCommands.SaveProject(); - - System.Windows.Forms.SaveFileDialog sfd = new System.Windows.Forms.SaveFileDialog(); - sfd.InitialDirectory = SceneManager.GameProject.ProjectPath; - sfd.Filter = "(*.xml)|*.xml"; - System.Windows.Forms.DialogResult dr = sfd.ShowDialog(); - - if (dr == System.Windows.Forms.DialogResult.Yes || dr == System.Windows.Forms.DialogResult.OK) - { - SceneManager.SaveActiveScene(sfd.FileName, true); - } - } - - private void deployBtn_Click(object sender, RoutedEventArgs e) - { - //foreach (string dirPath in Directory.GetDirectories(SceneManager.GameProject.ProjectPath, "*", - // SearchOption.AllDirectories)) - // Directory.CreateDirectory(dirPath.Replace(SceneManager.GameProject.ProjectPath, @"C:\Users\John\Desktop\output\")); - - ////Copy all the files - //foreach (string newPath in Directory.GetFiles(SceneManager.GameProject.ProjectPath, "*.*", - // SearchOption.AllDirectories)) - //{ - // if (newPath.ToLower().EndsWith(".scene")) - // { - // GameScene scene = (GameScene)CHelper.DeserializeObject(newPath); - // CHelper.SerializeObjectXML(newPath.Replace(SceneManager.GameProject.ProjectPath, @"C:\Users\John\Desktop\output\"), scene); - // } - // else if (newPath.ToLower().EndsWith(".clengine")) - // { - // CProject gp = (CProject)CHelper.DeserializeObject(newPath); - // CHelper.SerializeObjectXML(newPath.Replace(SceneManager.GameProject.ProjectPath, @"C:\Users\John\Desktop\output\"), gp); - // } - // else - // { - // File.Copy(newPath, newPath.Replace(SceneManager.GameProject.ProjectPath, @"C:\Users\John\Desktop\output\"), true); - // } - //} - - new DeploymentWindow().ShowDialog(); - } - - private void exitBtn_Click(object sender, RoutedEventArgs e) - { - Close(); - } - - private void loadMenuItem_Click(object sender, RoutedEventArgs e) - { - EditorCommands.LoadProject(); - } - - private void addNewItemSceneBtn_Click(object sender, RoutedEventArgs e) - { - if (SceneManager.ActiveScene == null) - { - MessageBox.Show("没有场景加载!", "错误", MessageBoxButton.OK, MessageBoxImage.Error); - } - else - { - AddNewItemWindow window = new AddNewItemWindow(sceneTreeView.SelectedItem); - window.ShowDialog(); - } - } - - void Row_DoubleClick(object sender, MouseButtonEventArgs e) - { - //if (sender != null) - //{ - - // System.Windows.Controls.DataGridRow row = sender as System.Windows.Controls.DataGridRow; - // if (row != null) - // { - // OutputMessage item = row.Item as OutputMessage; - // string time = item.Time; - // string message = item.Message; - // } - //} - } - - private void pencilTilesetBtn_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.TilesetMode = TilesetModes.Pencil; - UpdateTilesetModes(); - } - - private void UpdateTilesetModes() - { - pencilTilesetBtn.IsChecked = false; - rectangleTileset.IsChecked = false; - rectangleRemoveTileset.IsChecked = false; - addColumnTileset.IsChecked = false; - addRowTileset.IsChecked = false; - removeColumnTileset.IsChecked = false; - removeRowTileset.IsChecked = false; - - switch (sceneViewGameControl.TilesetMode) - { - case TilesetModes.Pencil: - pencilTilesetBtn.IsChecked = true; - break; - case TilesetModes.Rectangle: - rectangleTileset.IsChecked = true; - break; - case TilesetModes.Eraser: - rectangleRemoveTileset.IsChecked = true; - break; - case TilesetModes.AddColumn: - addColumnTileset.IsChecked = true; - break; - case TilesetModes.RemoveColumn: - removeColumnTileset.IsChecked = true; - break; - case TilesetModes.AddRow: - addRowTileset.IsChecked = true; - break; - case TilesetModes.RemoveRow: - removeRowTileset.IsChecked = true; - break; - } - } - - private void shiftLeftTileset_Click(object sender, RoutedEventArgs e) - { - if (EditorHandler.SelectedGameObjects.Count == 0 || !(EditorHandler.SelectedGameObjects[0] is Tileset)) return; - - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset).DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset).ShiftLeft(1); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset).Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - - private void removeRowTileset_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.TilesetMode = TilesetModes.RemoveRow; - UpdateTilesetModes(); - } - - private void removeColumnTileset_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.TilesetMode = TilesetModes.RemoveColumn; - UpdateTilesetModes(); - } - - private void addRowTileset_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.TilesetMode = TilesetModes.AddRow; - UpdateTilesetModes(); - } - - private void addColumnTileset_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.TilesetMode = TilesetModes.AddColumn; - UpdateTilesetModes(); - } - - private void rectangleRemoveTileset_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.TilesetMode = TilesetModes.Eraser; - UpdateTilesetModes(); - } - - private void rectangleTileset_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.TilesetMode = TilesetModes.Rectangle; - UpdateTilesetModes(); - } - - private void OutputExpander_Expanded(object sender, RoutedEventArgs e) - { - SceneViewContainer.RowDefinitions[3].Height = new GridLength(100); - } - - private void OutputExpander_Collapsed(object sender, RoutedEventArgs e) - { - SceneViewContainer.RowDefinitions[3].Height = new GridLength(20); - } - - private void centerCameraObjectBtn_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.CenterCameraObject(); - } - - private void refreshSceneBtn_Click(object sender, RoutedEventArgs e) - { - sceneTreeView.CreateView(); - } - - void panelPasteItem_Click(object sender, RoutedEventArgs e) - { - sceneTreeView.Paste(); - } - - private void refreshProjectExplorerBtn_Click(object sender, RoutedEventArgs e) - { - projectTreeView.CreateView(); - } - - private void centerCameraBtn_Click(object sender, RoutedEventArgs e) - { - sceneViewGameControl.CenterCamera(); - } - - private void debugViewBtn_Click(object sender, RoutedEventArgs e) - { - Properties.Settings.Default.ShowDebugView = !Properties.Settings.Default.ShowDebugView; - Properties.Settings.Default.Save(); - } - - private void gridSnappingBtn_Click(object sender, RoutedEventArgs e) - { - SceneManager.GameProject.EditorSettings.SnapToGrid = !SceneManager.GameProject.EditorSettings.SnapToGrid; - } - - private void showCollisionsBtn_Click(object sender, RoutedEventArgs e) - { - SceneManager.GameProject.EditorSettings.ShowCollisions = !SceneManager.GameProject.EditorSettings.ShowCollisions; - } - - private void showGridBtn_Click(object sender, RoutedEventArgs e) - { - SceneManager.GameProject.EditorSettings.ShowGrid = !SceneManager.GameProject.EditorSettings.ShowGrid; - } - - void addFromStateItem_Click(object sender, RoutedEventArgs e) - { - sceneTreeView.AddFromState(); - } - - void createObjectItem_Click(object sender, RoutedEventArgs e) - { - new AddNewItemWindow(null).ShowDialog(); - } - - void MainWindow_Closed(object sender, EventArgs e) - { - Application.Current.Shutdown(); - } - - void ClearItem_Click(object sender, RoutedEventArgs e) - { - if (EditorHandler.OutputMessages.Count > 0) - EditorHandler.OutputMessages.Clear(); - } - - void SceneViewGameControl_MouseMove(object sender, MouseEventArgs e) - { - SetMousePosition(new Vector2(e.X, e.Y)); - } - - private Vector2 mouseWorldPosition; - - public void SetMousePosition(Vector2 pos) - { - controlPosition = pos; - mouseWorldPosition = Vector2.Transform(pos, (Matrix) Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)); - } - - Vector2 controlPosition; - - static MainWindow() - { - fullscreen = false; - } - - void MainWindow_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) - { - OutputDataGrid.Items.Refresh(); - if (OutputDataGrid.Items.Count > 0) - OutputDataGrid.ScrollIntoView(OutputDataGrid.Items[OutputDataGrid.Items.Count - 1]); - } - - public void SetFullScreen(bool setFullscreen) - { - fullscreen = setFullscreen; - setFullScreenName(fullscreen); - - if (fullscreen) - WindowStyle = WindowStyle.None; - else - WindowStyle = WindowStyle.SingleBorderWindow; - - WindowState = WindowState.Minimized; - WindowState = WindowState.Maximized; - - - } - - public void setFullScreenName(bool setFullScreen) - { - Grid grid = (MainGrid.FindName("TopRightButtonsGrid") as Grid); - - if (setFullScreen) - (grid.FindName("fullScreenBtn") as RoundedButton).Content = "退出全屏"; - else - (grid.FindName("fullScreenBtn") as RoundedButton).Content = "切换到全屏"; - } - - private void fullScreenBtn_Click(object sender, RoutedEventArgs e) - { - SetFullScreen(!fullscreen); - } - - private void FairyGuiBtn_Click(object sender, RoutedEventArgs e) - { - try - { - ProcessStartInfo startInfo = new ProcessStartInfo(); - startInfo.FileName = "FairyGUI-Editor\\FairyGUI-Editor.exe"; - Process.Start(startInfo); - } - catch (Exception exception) - { - MessageBox.Show(exception.Message); - } - } - - private void AnimationBtn_Click(object sender, RoutedEventArgs e) - { - try - { - ProcessStartInfo startInfo = new ProcessStartInfo(); - startInfo.FileName = "http://dragonbones.com/cn/index.html"; - Process.Start(startInfo); - } - catch (Exception exception) - { - MessageBox.Show(exception.Message); - } - } - - private void LoginOrRegisterBtn_Click(object sender, MouseButtonEventArgs e) - { - var loginOrRegisteWin = new LoginOrRegister(); - loginOrRegisteWin.ShowDialog(); - } - - private void QuickCreateCollision_Click(object sender, RoutedEventArgs e) - { - if (collisionBtn.IsChecked == true) - { - sceneViewGameControl.EditorMapMode = EditorMapModes.AddCollison; - opacityBtn.IsChecked = false; - } - else - { - sceneViewGameControl.EditorMapMode = EditorMapModes.None; - } - } - - private void QuickCreateOpacity_Click(object sender, RoutedEventArgs e) - { - if (opacityBtn.IsChecked == true) - { - sceneViewGameControl.EditorMapMode = EditorMapModes.Opacity; - collisionBtn.IsChecked = false; - } - else - { - sceneViewGameControl.EditorMapMode = EditorMapModes.None; - } - } - } -} diff --git a/Editor/CLEngine.Editor/Project Templates/CLEngine.Core.dll b/Editor/CLEngine.Editor/Project Templates/CLEngine.Core.dll deleted file mode 100644 index 8024f30350dc4896daca123827b0eddef5558d45..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/CLEngine.Core.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/CLEngine.Core.xml b/Editor/CLEngine.Editor/Project Templates/CLEngine.Core.xml deleted file mode 100644 index b28817e30669c9e82d26a0de53ee1f68dd824348..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/CLEngine.Core.xml +++ /dev/null @@ -1,24239 +0,0 @@ - - - - CLEngine.Core - - - - - Representation of your world for the pathfinding algorithm. - Use SetCellCost to change the cost of traversing a cell. - Use BlockCell to make a cell completely intraversable. - - - - - Creates a grid - - The x-dimension of your world - The y-dimesion of your world - The default cost every cell is initialized with - - - - X-dimension of the grid - - - - - Y-dimension of the grid - - - - - Sets the cost for traversing a cell - - A position inside the grid - The cost of traversing the cell, cannot be less than one - - - - Makes the cell intraversable - - A position inside the grid - - - - Makes the cell traversable, gives it the default traversal cost as provided in the constructor - - A position inside the grid - - - - Looks-up the cost for traversing a given cell, if a cell is blocked () - +infinity is returned - - A position inside the grid - The cost - - - - Looks-up the cost for traversing a given cell, does not check - if the position is inside the grid - - A position inside the grid - The cost - - - - Computes the lowest-cost path from start to end inside the grid for an agent that can - move both diagonal and lateral - - The start position - The end position - Positions along the shortest path from start to end, or an empty array if no path could be found - - - - Computes the lowest-cost path from start to end inside the grid for an agent with a custom - movement pattern - - The start position - The end position - The movement pattern of the agent, for several built-in options - Positions along the shortest path from start to end, or an empty array if no path could be found - - - - Computes the lowest-cost path from start to end inside the grid for an agent with a custom - movement pattern. Instructs the path finder to give up if the path is not found after a number of iterations. - - The start position - The end position - The movement pattern of the agent, for several built-in options - Maximum number of nodes to check before the path finder gives up - Positions along the shortest path from start to end, or an empty array if no path could be found - - - - Converts a 2d index to a 1d index and performs bounds checking - - - - - Converts a 2d index to a 1d index without any bounds checking - - - - - Heap which keeps the node with the minimal expected path cost on the head position - - - - - If the heap has a next element - - - - - Pushes a node onto the heap - - - - - Pops a node from the heap, this node is always the node - with the cheapest expected path cost - - - - - Node in a heap - - - - - Predefined ranges of motions for your agent. - - - - - Both diagonal and lateral movement (west, north-west, north, north-east, south-east, south, south-west). - The path planning algorithm's heuristic is best suited for this movement pattern. - - - - - Lateral movement only (west, north, easth, south) - - - - - Diagonal movement only (north-west, north-east, south-east, south-west) - - - - - A 2D offset structure. You can use an array of offsets to represent the movement pattern - of your agent, for example an offset of (-1, 0) means your character is able - to move a single cell to the left for some predefined - options. - - - - - Constructor - - x-movement offset - y-movement offset - - - - X-position - - - - - Y-position - - - - - Relative cost of adding this offset to a position, either 1 for lateral movement, or sqrt(2) for diagonal movement - - - - - Computes a path in a grid according to the A* algorithm - - - - - A 2D position structure - - - - - Constructor - - the x-position - the y-position - - - - X-position - - - - - Y-position - - - - - 物体的线性阻尼 - - - - - 确定身体是否是子弹 - - - - - 确定身体是否应忽略重力 - - - - - 物体的角速度 - - - - - 物体的角度阻尼 - - - - - 确定刚体是否应该像传感器一样 - - - - - 确定主体是否具有固定旋转 - - - - - 身体的摩擦力 - - - - - 身体弹起 - - - - - 身体类型 - - - - - 初始化 - - - - - 移除组件后,将刚体从世界中移除 - - - - - 更新刚体属性 - - - - - 向对象添加一个或多个组件要求的属性。 - - - - - 基于类型名称的要求 - - 类型名称,如果要应用多个要求,请使用“|” 拆分他们. - 如果为true则需要每个组件 - - - - 用于确定组件是否应该每个对象只有1个实例的属性(显式或可分配) - - - - - Explicit'是组件类型本身。 - 'AssinableFrom'也可以从父分配(例如,是组件的子类)。 - - - - - 清除音频缓冲区 - - - - - 卸载音频波 - - - - - - - - - - - - - - - - - - - - 播放.mp3或.wav音频文件 - - The relative path to the audio file - Determine if the sound should loop - - - - 播放.mp3或.wav音频文件 - - The relative path to the audio file - - - - 从选定文件创建波流 - - The file path to the audio file (.mp3 or .wav) - The default desired volume - Determines if the audio file is added to the buffer - - - - - - - - - - - - - - - - - 实例化此实例 - - The font file - The font texture - - - - 绘制文字 - - The spritebatch - The position - The text to be drawn - - - - - - - - - - - - - - 绘制文字 - - The spritebatch - The position - The text to be drawn - The scale - - - - 绘制文字 - - The spritebatch - Position X - Position Y - The text to be drawn - - - - - - - - - - - - - - - - - - - - - - - - - 测量导致最大尺寸的所有线 - - - - - - - - - 测量一个字符串(宽度和高度) - - - - - - 相机对象 - - - - - 当前的Camera.tion矩阵 - - - - - 相机的位置 - - - - - 相机的缩放倍数 - - - - - 相机的旋转角度 - - - - - - - - - - 绘制 - - - - - 将着色器应用于相机表面 - - - - - 计算相机的变换矩阵 - - - - - - 计算给定游戏对象的摄像机的变换矩阵 - - 对象 - 变换矩阵 - - - - 转为屏幕坐标 - - 世界坐标 - 屏幕坐标 - - - - 转为世界坐标 - - 屏幕坐标 - 世界坐标 - - - - 对象转屏幕坐标 - - 对象 - 世界坐标 - - - - - 对象转世界坐标 - - 对象 - 世界坐标 - - - - - 转字符串 - - Camera名称 - - - - 切换枚举 - - - - - 搜索选项枚举 - - - - - 鼠标事件按钮枚举 - - - - - 文本对齐模式 - - - - - 锚点 - - - - - 混合模式 - - - - - 采样器模式 - - - - - 一个静态类,为游戏开发编辑器或引擎提供有用的方法 - - - - - 创建从一个文件或文件夹到另一个文件或文件夹的相对路径 - - - - - - - - 将整个目录复制到目标 - - Source directory path - Destination path - Copy sub directories - - - - - - - - - - - - 如果希望在编辑器中更新和绘制对象组件,则使用该类 - - - - - 纹理的相对路径 - - - - - 刚体的密度 - - - - - Initializes the body - - - - - 核心游戏类 - - - - - 游戏更新逻辑 - - - - - - 安排一次性或重复计时器,调用传入的Action - - 时间以秒为单位. - - - - - - - 安排一次性或重复计时器,调用传入的Action - - - - - - - - - 安排一次性或重复计时器,调用传入的Action - - - - - - - - - 安排一次性或重复计时器,调用传入的Action - - - - - - - - - - - - - - - 基本的CoroutineManager。 协同程序可以执行以下操作: - - yield return null - - yield return Coroutine.waitForSeconds(3) - - yield return Coroutine.waitForSeconds(5.5f) - - yield return startCoroutine(another()) - - - - - CoroutineManager用来隐藏Coroutine所需数据的内部类 - - - - - 无论何时产生延迟,都会将其添加到跟踪延迟的waitTimer中 - - - - - Determines if the active tileset is going to be highlighted in the editor - - - - - 定活动的tileset是否将在游戏中突出显示 - - - - - 确定引擎是否将使用默认的碰撞引擎 - - - - - To String - - - - - - - The base class that implements Disposable pattern. - This class must be inherited. - - - - - Gets whether this object is already disposed. - - - - - Raised when this object is disposed. - - - - - Processes disposing logic. This method must be overridden. - - if it is called by a call, if it is called by a finalizer. - - - - Ensures that this object is not disposed. Otherwise an will be thrown. - - Thrown when current object is disposed. - - - - 检查路径合法性 - - - - - - - 根据贴图JSON文件的路径和JSON文件中贴图名称获得贴图路径 - - 贴图JSON文件路径:NewDragon/NewDragon_tex - 贴图名称:NewDragon.png - - - - - 根据贴图路径获得贴图名称 - - - - - - - 一个基本效果,包含我们将用于绘制我们的着色器原语 - - - - - 我们将发出绘图调用的设备 - - - - - 一旦调用了Begin,hasBegun就会被转换为true,并且用于制作 - 确保用户在调用Begin之前不调用End - - - - - 从文件路径加载字体 - - The file path - Loaded font file - - - - 从流中加载字体 - - The stream - Loaded font file - - - - 事件阵营 - - - - - 自身 - - - - - 敌人 - - - - - 友方 - - - - - 中立 - - - - - 移动事件参数 - - - - - 移动方向 - - - - - 是否正在移动 - - - - - 哪个键按下 - 0: 无按键 - 1: 左键 - 2:右键 - - - - - - - - - - - - - 事件对象 - 记录事件的一系列数据 - - - - - 目标移动坐标 - - - - - 下一步移动坐标 - - - - - 事件的阵营 - - - - - 附加属性 - - - - - 事件的血量 - - - - - 事件的蓝量 - - - - - 事件的经验 - - - - - 事件的下一级升级所需经验 - - - - - 事件是否有自己的碰撞器 - - - - - 事件等级 - - - - - 事件死亡 - - - - - 事件升级 - - - - - 事件移动 - - - - - 初始化 - - - - - 事件移动到指定坐标 - - - - - - - - 更新 - - - - - - 寻找一个离坐标点最近且无障碍的点 - - - - - - 绘制 - - - - - - - 适用于大部分RPG地图/传奇类地图 - - - - - 地图文件的相对路径 - - - - - 地图图块宽度 - - - - - 地图图块高度 - - - - - 碰撞格子区域 - - - - - 透明区块 - - - - - 是否显示障碍 - - - - - 是否显示透明区域 - - - - - 是否给地图边缘自动添加边界碰撞 - - - - - - - - - - 事件对象集合 - - - - - - - - - - - - 根据世界坐标获取地图块位置 - - - - - - - - 根据地图块获取世界坐标 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 粒子保持活动的最短时间 - - - - - 粒子保持活动的最长时间 - - - - - 粒子的初始尺度(最小范围) - - - - - 粒子的初始尺度(最小范围) - - - - - 粒子的初始尺度(最小范围) - - - - - 粒子的初始尺度(最小范围) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The gametime - - - - - - The gametime - The spriteBatch - - - - - - - - - 图片对象 - - - - - 显示模式 - - - - - 图像的相对路径 - - - - - 确定如何显示此精灵 - - - - - 原点 - - - - - 原点类型 - - - - - 是否使用自定义锚点 - - - - - 填充颜色 - - - - - 图片 - - - - - 精灵效果 - - - - - 混合模式 - - - - - 要显示的图像区域 - - - - - 图块的原矩形 - - - - - 鼠标的边界框。 - 使用鼠标位置作为参考 - - - - - The position of the mouse in the scene. - - - - - The mouse transformation matrix - - - - - The current keyboard state. - - - - - The last keyboard state. - You can use this to know how was the last state of the keyboard - - - - - The current mouse state. - - - - - The last mouse state. - You can use this to know how was the last state of the mouse - - - - - The current game pads states - - - - - The last game pads states. - You can use this to know how was the last states of the game pads - - - - - 更新游戏输入的逻辑。 - 输入状态在此处更新。 - - - - - - - The button you want to test - - - - - - - The button you want to test - - - - - - - The button you want to test - - - - - - - The key you want to test - - - - - - - The key you want to test - - - - - Check if the param key is up - - The key you want to test - - - - - 游戏对象 - 该类可用于表示游戏中的对象。 您可以将组件附加到它 - - - - - 是否禁用 - - - - - 对象的属性 - - - - - 对象的名称 - - - - - 确定此对象是否可见 - - - - - 确定对象是否已禁用 - - - - - 对象的标签 - - - - - 对象的标签 - - - - - 确定是否选择了此对象 - - - - - 是否独立旋转 - - - - - - - - - - - - - - - - 对象的刚体组件 每个物体仅有一个刚体组件 - - - - - 子对象 - - - - - 设置父对象 - - 父对象的transform - - - - 获取所有游戏对象 - - - - - - 获取组件 - - 类型 - 组件 - - - - 移除对象 - - 要移除的对象 - 移除的对象 - - - - 移除自身 - - - - - 更新 - - - - - - 绘制 - - - - - - - 获取自身的所有的组件 - - - - - - 移除所有组件 - - - - - 移除组件 - - 组件 - - - - 移除组件 - - 类型 - - - - 保存对象为状态 - - 文件名 - - - - 当鼠标与游戏对象发生碰撞时抛出的事件 - - - - - 鼠标未在对象上时抛出的事件 - - - - - 鼠标未在对象上时抛出的事件 - - - - - 当鼠标单击碰撞时抛出事件 - - - - - - 当鼠标按下碰撞时抛出事件 - - - - - - 当鼠标移动碰撞时抛出事件 - - - - - 初始化此对象 - - - - - 测量尺寸 - - - - - - 保存组件值 - - - - - 添加组件 - - 类型 - 组件 - - - - 添加组件 - - 组件 - 是否成功 - - - - 复制 - - 对象 - - - - 按名称删除活动场景中的游戏对象 - - - - - - - 根据标签寻找对象 - - 标签名 - 对象 - - - - 转字符串 - - 对象名称 - - - - 销毁 - - - - - 复制 - - 对象 - - - - 在没有与其他对象发生碰撞的框架中抛出的事件 - - - - - 当另一个对象与此冲突时抛出的事件 - - 另一个对象 - - - - 游戏场景 - - - - - 初始化游戏场景。 - 此场景的图层,游戏对象和组件也已初始化 - - - - - startCoroutine返回的接口,它提供了在中途停止协同程序的能力 - - - - - 停止Coroutine - - - - - 设置Coroutine是否应使用deltaTime或unscaledDeltaTime进行计时 - - The use unscaled delta time. - If set to true use unscaled delta time. - - - - causes a Coroutine to pause for the specified duration. Yield on Coroutine.waitForSeconds in a coroutine to use. - - The for seconds. - Seconds. - - - - 创建一个新的INI文件来存储或加载数据 - - - - - 将数据写入INI文件 - - - Section name - - Key Name - - Value Name - - - - 从Ini文件中读取数据值 - - - - - - - - - 调用停止以停止再次运行此计时器。 这对非重复计时器没有影响。 - - - - - 将计时器的经过时间重置为0 - - - - - 为方便起见,返回转换为T的上下文 - - The context. - 第一类参数. - - - - 获取或设置输出超时。 默认值:1000 = 1秒 - - - - - - - - - - 用它来打开或关闭循环 - - - - - 返回源流的波形格式 - - - - - LoopStream只返回 - - - - - LoopStream只是将定位传递给源流 - - - - - 创建一个新的循环流 - - The stream to read from. Note: the Read method of this stream should return 0 when it reaches the end - or else we will not loop to the start again. - - - - - - - - - - - - - 从给定位置旋转一个点并使用Origin我们进行调整 - 正在转动 - - - - - - - - - 根据立方线计算basizer点(4个控制点) - - Current Point - Initial Position - Control Point 1 - Control Point 2 - End Position - - - - - 检查输入是否为2的幂 - - Input value - The test result - - - - 检查输入是否为2的幂 - - Input value - The test result - - - - 检查输入是否为2的幂 - - Input value - The test result - - - - 将弧度值转换为内置单位角度 - - The input value in radians - Unit Angle - - - - 将度数值转换为内置单位角度 - - he input value in degrees - Unit Angle - - - - 对颜色进行线性插值 - - The final color - The initial color - The percentage amount - The calculated color - - - - 角度线性插值 - 平滑点旋转 - - The current value - The final value - The amount - The calculated angle - - - - 角度线性插值 - 平滑点旋转 - - The current value - The final value - The amount - The maximum error allowed - The calculated angle - - - - Rounds a Vector2 - - The input value - The calculated Vector2 - - - - 将Vector2转换为Point - - The input value - The calculated Point - - - - 将Point转换为Vector2 - - The input value - The calculated Vector2 - - - - 计算2个Vector2之间的距离值。 - - First Vector2 - Second Vector2 - The calculated distance - - - - 计算3个Vector2之间的线段距离 - - First Vector2 - Second Vector2 - Third Vector2 - The calculated distance - - - - 使用给定的变换矩阵变换矩形 - - The input rectangle - The input matrix - The calculated rectangle - - - - 将Rectangle转换为包含其4个角的Vector2数组 - - - - An array of Vector2 representing the rectangle's corners starting from top/left and going clockwise. - - - - 计算从给定Vector2的矩形 - - First Vector2 - Second Vector2 - The calculated rectangle - - - - 两个字节之间的线性插值 - - First Byte - Second Byte - The amount - - - - - 将float放到x下面最接近的int值。 请注意,这仅适用于短范围内的值 - - - - - - - 此类表示一个对象组件 - - - - - 确定组件是否已禁用 - - - - - 组件对象的引用变换 - - - - - 组件的名称 - - - - - 编辑属性面板内是否允许展开 - - - - - 组件所在的对象 - - - - - 从游戏对象中删除脚本时调用此方法 - - - - - 在没有与其他对象发生碰撞的框架中抛出的事件 - - - - - 绘制 - - - - - - - 更新 - - - - - - 鼠标未在对象上时抛出的事件 - - - - - 当鼠标与游戏对象发生碰撞时抛出的事件 - - - - - 当鼠标移动碰撞时抛出事件 - - - - - 触发游戏对象上的鼠标向上事件时抛出的事件 - - - - - 当鼠标单击碰撞时抛出事件 - - - - - - 当鼠标单击碰撞时抛出事件 - - - - - - 发生物体碰撞时抛出的事件 - - - - - - 转字符串 - - - - - - 复制 - - 组件 - - - - 初始化 - - - - - warms up the cache filling it with a max of cacheCount objects - - new cache count - - - - trims the cache down to cacheCount items - - Cache count. - - - - clears out the cache - - - - - pops an item off the stack if available creating a new item as necessary - - - - - pushes an item back on the stack - - Object. - - - - Resets the object for reuse. Object references should be nulled and fields may be set to default values - - - - - 用于更改旋转矩形的X和Y位置 - - - - - - - 此intersects方法可用于检查标准XNA框架Rectangle - object并查看它是否与Rotated Rectangle对象发生碰撞 - - - - - - - 检查两个旋转矩形是否发生碰撞 - - - - - - - 确定是否在其中一个轴上发生了碰撞 - 平行于Rectangle的平面 - - - - - - - - 生成一个标量值,可用于比较角落的位置 - 已将矩形投影到特定轴上。 - - - - - - - - 从给定位置旋转一个点并使用Origin我们进行调整 - 正在转动 - - - - - - - - - 场景管理器 - 该类负责管理活动场景 - - - - - 获取或设置当前游戏项目 - - - - - 当前活动的场景路径 - - - - - 确定我们是否在编辑器模式下运行 - - - - - 活跃的游戏窗口。 - 仅在游戏模式下可用 - - - - - 活动的tileset - - - - - 保存当前场景 - - 路径 - 是否xml文件 - 是否保存成功 - - - - 根据标签寻找对象 - - 标签名 - 对象 - - - - 加载场景 - - 场景路径 - 是否加载成功 - - - - 加载场景 - - 场景路径 - 保存为历史路径 - 是否加载成功 - - - - 脚本引擎 - - - - - 脚本引擎 - - - - - 凸多边形上的最大顶点数 - - - - - 一个简单的事件通知器 - - - - - - - - - - 添加事件监听 - - 事件类型 - 执行函数 - - - - 是否拥有该事件 - - 事件类型 - - - - - 移除事件监听 - - 事件类型 - 事件函数 - - - - 执行函数 - - 事件类型 - - - - 此类负责管理纹理加载。 - 将纹理加载到内存中以便快速使用,如果加载相同的纹理两次,它将在内存中使用相同的空间以保留资源。 - 如果要在运行时清除缓存,请执行TextureLoader.Clear() 方法。 - - - - - 时间类 - - - - - 游戏运行的总时间 - - - - - 从前一帧到当前的增量时间,由timeScale缩放 - - - - - deltaTime的非缩放版本。 不受timeScale的影响 - - - - - 辅助deltaTime,用于在需要同时缩放两个不同的增量时使用 - - - - - 加载场景后的总时间 - - - - - deltaTime的时间尺度 - - - - - altDeltaTime的时间尺度 - - - - - 已通过的总帧数 - - - - - 允许检查间隔。 只应与deltaTime以上的区间值一起使用, - 否则它将始终返回true - - - - - 将对象引用置零,以便GC可以根据需要进行拾取 - - - - - 安排一次性或重复计时器,调用传入的Action - - 时间以秒为单位. - If set to true repeats. - Context. - On time. - - - - 变换类 - - - - - 根节点的属性 - - - - - - - - - - - - - - - - - - - - - - - - - 父变换 - - - - - 所依附的对象 - - - - - 子对象列表 - - - - - 对象的相对位置。 - 如果对象没有父对象,则返回世界位置 - - - - - 当前缩放 - - - - - 当前旋转 - - - - - 子对象数量 - - - - - 设置父变换 - - 变换 - - - - 看向某个点 - - 坐标点 - 是否立即改变 - - - - 根据名称寻找对象的属性 - - 名称 - 属性 - - - - 对象的世界位置 - - - - - 移动对象 - - 移动方向及速度 - - - - 移动对象 - - x轴的方向及速度 - y轴的方向及速度 - - - - 深度复制 - - 是否复制对象 - 复制对象的属性 - - - - 转字符串 - - - - - - 复制 - - - - - - 默认构造函数 - - - - - 在输入位置绘制一个像素 - - spritebatch - 位置 X - 位置 Y - 颜色 - - - - 在输入位置绘制一个框 - - spritebatch - 目标矩形 - 颜色 - 边框宽度 - - - - 在输入位置绘制一个框 - - spritebatch - 左上角位置 - 右下位置 - 颜色 - - - - 在输入位置绘制一个填充框 - - spritebatch - 位置 X - 位置 Y - 宽度 - 高度 - 颜色 - - - - 在输入位置绘制一个填充框 - - spritebatch - 左上角位置 - 右下位置 - 颜色 - - - - 在输入位置绘制一个填充框 - - spritebatch - 目标矩形 - 颜色 - - - - 在输入位置画一条线 - - spritebatch - 位置 X1 - 位置 Y1 - 位置 X2 - 位置 Y2 - 颜色 - 行宽 - - - - 在输入位置画一条线 - - spritebatch - 开始的位置 - 结束位置 - 颜色 - 行宽 - - - - 绘制圆形 - - 目标绘图表面 - 圆的中心 - 圆的半径 - 要生成的边数 - 圆的颜色 - - - - - The animation player is used to play the animation data and manage the animation states. - - - - DragonBones 3.0 - en_US - - - 动画播放器用来播放动画数据和管理动画状态。 - - - - DragonBones 3.0 - zh_CN - - - - - The play speed of all animations. [0: Stop, (0~1): Slow, 1: Normal, (1~N): Fast] - - 1.0 - DragonBones 3.0 - en_US - - - 所有动画的播放速度。 [0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] - - 1.0 - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - Clear all animations states. - - - DragonBones 4.5 - en_US - - - 清除所有的动画状态。 - - - DragonBones 4.5 - zh_CN - - - - - Pause a specific animation state. - - - The name of animation state. (If not set, it will pause all animations) - - DragonBones 3.0 - en_US - - - 暂停指定动画状态的播放。 - - - 动画状态名称。 (如果未设置,则暂停所有动画) - - DragonBones 3.0 - zh_CN - - - - - Play animation with a specific animation config. - The API is still in the experimental phase and may encounter bugs or stability or compatibility issues when used. - - - The animation config. - The playing animation state. - - - DragonBones 5.0 - en_US - - - 通过指定的动画配置来播放动画。 - 该 API 仍在实验阶段,使用时可能遭遇 bug 或稳定性或兼容性问题。 - - - 动画配置。 - 播放的动画状态。 - - - DragonBones 5.0 - zh_CN - - - - - Play a specific animation. - - - The name of animation data. (If not set, The default animation will be played, or resume the animation playing from pause status, or replay the last playing animation) - - Playing repeat times. [-1: Use default value of the animation data, 0: No end loop playing, [1~N]: Repeat N times] (default: -1) - The playing animation state. - - TypeScript style, for reference only. -
-                armature.animation.play("walk");
-            
-
- DragonBones 3.0 - en_US - - - 播放指定动画。 - - - 动画数据名称。 (如果未设置,则播放默认动画,或将暂停状态切换为播放状态,或重新播放之前播放的动画) - - 循环播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - 播放的动画状态。 - - TypeScript 风格,仅供参考。 -
-                armature.animation.play("walk");
-            
-
- DragonBones 3.0 - zh_CN -
- - - - Fade in a specific animation. - - - The name of animation data. - - The fade in time. [-1: Use the default value of animation data, [0~N]: The fade in time (In seconds)] (Default: -1) - - playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) - - The blending layer, the animation states in high level layer will get the blending weights with high priority, when the total blending weights are more than 1.0, there will be no more weights can be allocated to the other animation states. (Default: 0) - - The blending group name, it is typically used to specify the substitution of multiple animation states blending. (Default: null) - - The fade out mode, which is typically used to specify alternate mode of multiple animation states blending. (Default: AnimationFadeOutMode.SameLayerAndGroup) - The playing animation state. - - TypeScript style, for reference only. -
-                armature.animation.fadeIn("walk", 0.3, 0, 0, "normalGroup").resetToPose = false;
-                armature.animation.fadeIn("attack", 0.3, 1, 0, "attackGroup").resetToPose = false;
-            
-
- DragonBones 4.5 - en_US - - - 淡入播放指定的动画。 - - - 动画数据名称。 - - 淡入时间。 [-1: 使用动画数据默认值, [0~N]: 淡入时间 (以秒为单位)] (默认: -1) - - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - - 混合图层,图层高的动画状态会优先获取混合权重,当混合权重分配总和超过 1.0 时,剩余的动画状态将不能再获得权重分配。 (默认: 0) - - 混合组名称,该属性通常用来指定多个动画状态混合时的相互替换关系。 (默认: null) - - 淡出模式,该属性通常用来指定多个动画状态混合时的相互替换模式。 (默认: AnimationFadeOutMode.SameLayerAndGroup) - 播放的动画状态。 - - TypeScript 风格,仅供参考。 -
-                armature.animation.fadeIn("walk", 0.3, 0, 0, "normalGroup").resetToPose = false;
-                armature.animation.fadeIn("attack", 0.3, 1, 0, "attackGroup").resetToPose = false;
-            
-
- DragonBones 4.5 - zh_CN -
- - - - Play a specific animation from the specific time. - - - The name of animation data. - - The start time point of playing. (In seconds) - - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) - The played animation state. - DragonBones 4.5 - en_US - - - 从指定时间开始播放指定的动画。 - - - 动画数据名称。 - - 播放开始的时间。 (以秒为单位) - - 循环播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - 播放的动画状态。 - DragonBones 4.5 - zh_CN - - - - - Play a specific animation from the specific frame. - - - The name of animation data. - - The start frame of playing. - - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) - The played animation state. - DragonBones 4.5 - en_US - - - 从指定帧开始播放指定的动画。 - - - 动画数据名称。 - - 播放开始的帧数。 - - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - 播放的动画状态。 - DragonBones 4.5 - zh_CN - - - - - Play a specific animation from the specific progress. - - - The name of animation data. - - The start progress value of playing. - - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) - The played animation state. - DragonBones 4.5 - en_US - - - 从指定进度开始播放指定的动画。 - - - 动画数据名称。 - - 开始播放的进度。 - - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) - 播放的动画状态。 - DragonBones 4.5 - zh_CN - - - - - Stop a specific animation at the specific time. - - - The name of animation data. - - The stop time. (In seconds) - The played animation state. - DragonBones 4.5 - en_US - - - 在指定时间停止指定动画播放 - - - 动画数据名称。 - - 停止的时间。 (以秒为单位) - 播放的动画状态。 - DragonBones 4.5 - zh_CN - - - - - Stop a specific animation at the specific frame. - - - The name of animation data. - - The stop frame. - The played animation state. - DragonBones 4.5 - en_US - - - 在指定帧停止指定动画的播放 - - - 动画数据名称。 - - 停止的帧数。 - 播放的动画状态。 - DragonBones 4.5 - zh_CN - - - - - Stop a specific animation at the specific progress. - - - The name of animation data. - - The stop progress value. - The played animation state. - DragonBones 4.5 - en_US - - - 在指定的进度停止指定的动画播放。 - - - 动画数据名称。 - - 停止进度。 - 播放的动画状态。 - DragonBones 4.5 - zh_CN - - - - - Get a specific animation state. - - - The name of animation state. - - TypeScript style, for reference only. -
-                armature.animation.play("walk");
-                let walkState = armature.animation.getState("walk");
-                walkState.timeScale = 0.5;
-            
-
- DragonBones 3.0 - en_US - - - 获取指定的动画状态 - - - 动画状态名称。 - - TypeScript 风格,仅供参考。 -
-                armature.animation.play("walk");
-                let walkState = armature.animation.getState("walk");
-                walkState.timeScale = 0.5;
-            
-
- DragonBones 3.0 - zh_CN -
- - - - Check whether a specific animation data is included. - - - The name of animation data. - - DragonBones 3.0 - en_US - - - 检查是否包含指定的动画数据 - - - 动画数据名称。 - - DragonBones 3.0 - zh_CN - - - - - Get all the animation states. - - DragonBones 5.1 - en_US - - - 获取所有的动画状态 - - DragonBones 5.1 - zh_CN - - - - - Check whether there is an animation state is playing - - - DragonBones 3.0 - en_US - - - 检查是否有动画状态正在播放 - - - DragonBones 3.0 - zh_CN - - - - - Check whether all the animation states' playing were finished. - - - DragonBones 3.0 - en_US - - - 检查是否所有的动画状态均已播放完毕。 - - - DragonBones 3.0 - zh_CN - - - - - The name of the last playing animation state. - - - DragonBones 3.0 - en_US - - - 上一个播放的动画状态名称 - - - DragonBones 3.0 - zh_CN - - - - - The name of all animation data - - DragonBones 4.5 - en_US - - - 所有动画数据的名称 - - DragonBones 4.5 - zh_CN - - - - - All animation data. - - DragonBones 4.5 - en_US - - - 所有的动画数据。 - - DragonBones 4.5 - zh_CN - - - - - An AnimationConfig instance that can be used quickly. - - - DragonBones 5.0 - en_US - - - 一个可以快速使用的动画配置实例。 - - - DragonBones 5.0 - zh_CN - - - - - The last playing animation state - - - DragonBones 3.0 - en_US - - - 上一个播放的动画状态 - - - DragonBones 3.0 - zh_CN - - - - - The animation state is generated when the animation data is played. - - - - DragonBones 3.0 - en_US - - - 动画状态由播放动画数据时产生。 - - - - DragonBones 3.0 - zh_CN - - - - - - - - - - - Whether the animation state has control over the display object properties of the slots. - Sometimes blend a animation state does not want it to control the display object properties of the slots, - especially if other animation state are controlling the display object properties of the slots. - - true - DragonBones 5.0 - en_US - - - 动画状态是否对插槽的显示对象属性有控制权。 - 有时混合一个动画状态并不希望其控制插槽的显示对象属性, - 尤其是其他动画状态正在控制这些插槽的显示对象属性时。 - - true - DragonBones 5.0 - zh_CN - - - - - Whether to reset the objects without animation to the armature pose when the animation state is start to play. - This property should usually be set to false when blend multiple animation states. - - true - DragonBones 5.1 - en_US - - - 开始播放动画状态时是否将没有动画的对象重置为骨架初始值。 - 通常在混合多个动画状态时应该将该属性设置为 false。 - - true - DragonBones 5.1 - zh_CN - - - - - The play times. [0: Loop play, [1~N]: Play N times] - - DragonBones 3.0 - en_US - - - 播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] - - DragonBones 3.0 - zh_CN - - - - - The blend layer. - High layer animation state will get the blend weight first. - When the blend weight is assigned more than 1, the remaining animation states will no longer get the weight assigned. - - - DragonBones 5.0 - en_US - - - 混合图层。 - 图层高的动画状态会优先获取混合权重。 - 当混合权重分配超过 1 时,剩余的动画状态将不再获得权重分配。 - - - DragonBones 5.0 - zh_CN - - - - - The play speed. - The value is an overlay relationship with {@link dragonBones.Animation#timeScale}. - [(-N~0): Reverse play, 0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] - - 1.0 - DragonBones 3.0 - en_US - - - 播放速度。 - 该值与 {@link dragonBones.Animation#timeScale} 是叠加关系。 - [(-N~0): 倒转播放, 0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] - - 1.0 - DragonBones 3.0 - zh_CN - - - - - The blend weight. - - 1.0 - DragonBones 5.0 - en_US - - - 混合权重。 - - 1.0 - DragonBones 5.0 - zh_CN - - - - - The auto fade out time when the animation state play completed. - [-1: Do not fade out automatically, [0~N]: The fade out time] (In seconds) - - -1.0 - DragonBones 5.0 - en_US - - - 动画状态播放完成后的自动淡出时间。 - [-1: 不自动淡出, [0~N]: 淡出时间] (以秒为单位) - - -1.0 - DragonBones 5.0 - zh_CN - - - - - - - - The name of the animation state. (Can be different from the name of the animation data) - - - DragonBones 5.0 - en_US - - - 动画状态名称。 (可以不同于动画数据) - - - DragonBones 5.0 - zh_CN - - - - - The blend group name of the animation state. - This property is typically used to specify the substitution of multiple animation states blend. - - - DragonBones 5.0 - en_US - - - 混合组名称。 - 该属性通常用来指定多个动画状态混合时的相互替换关系。 - - - DragonBones 5.0 - zh_CN - - - - - xx: Play Enabled, Fade Play Enabled - - - - - - - -1: Fade in, 0: Fade complete, 1: Fade out; - - - - - - - -1: Fade start, 0: Fading, 1: Fade complete; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Continue play. - - DragonBones 3.0 - en_US - - - 继续播放。 - - DragonBones 3.0 - zh_CN - - - - - Stop play. - - DragonBones 3.0 - en_US - - - 暂停播放。 - - DragonBones 3.0 - zh_CN - - - - - Fade out the animation state. - - - The fade out time. (In seconds) - - Whether to pause the animation playing when fade out. - DragonBones 3.0 - en_US - - - 淡出动画状态。 - - - 淡出时间。 (以秒为单位) - - 淡出时是否暂停播放。 - DragonBones 3.0 - zh_CN - - - - - Check if a specific bone mask is included. - - - The bone name. - DragonBones 3.0 - en_US - - - 检查是否包含特定骨骼遮罩。 - - - 骨骼名称。 - DragonBones 3.0 - zh_CN - - - - - Add a specific bone mask. - - - The bone name. - - Whether or not to add a mask to the bone's sub-bone. - DragonBones 3.0 - en_US - - - 添加特定的骨骼遮罩。 - - - 骨骼名称。 - - 是否为该骨骼的子骨骼添加遮罩。 - DragonBones 3.0 - zh_CN - - - - - Remove the mask of a specific bone. - - - The bone name. - - Whether to remove the bone's sub-bone mask. - DragonBones 3.0 - en_US - - - 删除特定骨骼的遮罩。 - - - 骨骼名称。 - - 是否删除该骨骼的子骨骼遮罩。 - DragonBones 3.0 - zh_CN - - - - - Remove all bone masks. - - DragonBones 3.0 - en_US - - - 删除所有骨骼遮罩。 - - DragonBones 3.0 - zh_CN - - - - - Whether the animation state is fading in. - - DragonBones 5.1 - en_US - - - 是否正在淡入。 - - DragonBones 5.1 - zh_CN - - - - - Whether the animation state is fading out. - - DragonBones 5.1 - en_US - - - 是否正在淡出。 - - DragonBones 5.1 - zh_CN - - - - - Whether the animation state is fade completed. - - DragonBones 5.1 - en_US - - - 是否淡入或淡出完毕。 - - DragonBones 5.1 - zh_CN - - - - - Whether the animation state is playing. - - DragonBones 3.0 - en_US - - - 是否正在播放。 - - DragonBones 3.0 - zh_CN - - - - - Whether the animation state is play completed. - - DragonBones 3.0 - en_US - - - 是否播放完毕。 - - DragonBones 3.0 - zh_CN - - - - - The times has been played. - - DragonBones 3.0 - en_US - - - 已经循环播放的次数。 - - DragonBones 3.0 - zh_CN - - - - - The total time. (In seconds) - - DragonBones 3.0 - en_US - - - 总播放时间。 (以秒为单位) - - DragonBones 3.0 - zh_CN - - - - - The time is currently playing. (In seconds) - - DragonBones 3.0 - en_US - - - 当前播放的时间。 (以秒为单位) - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - -1: First blending, 0: No blending, 1: Blending. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Play animation interface. (Both Armature and Wordclock implement the interface) - Any instance that implements the interface can be added to the Worldclock instance and advance time by Worldclock instance uniformly. - - - - DragonBones 3.0 - en_US - - - 播放动画接口。 (Armature 和 WordClock 都实现了该接口) - 任何实现了此接口的实例都可以添加到 WorldClock 实例中,由 WorldClock 实例统一更新时间。 - - - - DragonBones 3.0 - zh_CN - - - - - Advance time. - - - Passed time. (In seconds) - DragonBones 3.0 - en_US - - - 更新时间。 - - - 前进的时间。 (以秒为单位) - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Worldclock provides clock support for animations, advance time for each IAnimatable object added to the instance. - - - - DragonBones 3.0 - en_US - - - WorldClock 对动画提供时钟支持,为每个加入到该实例的 IAnimatable 对象更新时间。 - - - - DragonBones 3.0 - zh_CN - - - - - Current time. (In seconds) - - DragonBones 3.0 - en_US - - - 当前的时间。 (以秒为单位) - - DragonBones 3.0 - zh_CN - - - - - The play speed, used to control animation speed-shift play. - [0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] - - 1.0 - DragonBones 3.0 - en_US - - - 播放速度,用于控制动画变速播放。 - [0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] - - 1.0 - DragonBones 3.0 - zh_CN - - - - - Creating a Worldclock instance. Typically, you do not need to create Worldclock instance. - When multiple Worldclock instances are running at different speeds, can achieving some specific animation effects, such as bullet time. - - DragonBones 3.0 - en_US - - - 创建一个 WorldClock 实例。通常并不需要创建 WorldClock 实例。 - 当多个 WorldClock 实例使用不同的速度运行时,可以实现一些特殊的动画效果,比如子弹时间等。 - - DragonBones 3.0 - zh_CN - - - - - Advance time for all IAnimatable instances. - - - Passed time. [-1: Automatically calculates the time difference between the current frame and the previous frame, [0~N): Passed time] (In seconds) - DragonBones 3.0 - en_US - - - 为所有的 IAnimatable 实例更新时间。 - - - 前进的时间。 [-1: 自动计算当前帧与上一帧的时间差, [0~N): 前进的时间] (以秒为单位) - DragonBones 3.0 - zh_CN - - - - - Check whether contains a specific instance of IAnimatable. - - - The IAnimatable instance. - DragonBones 3.0 - en_US - - - 检查是否包含特定的 IAnimatable 实例。 - - - IAnimatable 实例。 - DragonBones 3.0 - zh_CN - - - - - Add IAnimatable instance. - - - The IAnimatable instance. - DragonBones 3.0 - en_US - - - 添加 IAnimatable 实例。 - - - IAnimatable 实例。 - DragonBones 3.0 - zh_CN - - - - - Removes a specified IAnimatable instance. - - - The IAnimatable instance. - DragonBones 3.0 - en_US - - - 移除特定的 IAnimatable 实例。 - - - IAnimatable 实例。 - DragonBones 3.0 - zh_CN - - - - - Clear all IAnimatable instances. - - DragonBones 3.0 - en_US - - - 清除所有的 IAnimatable 实例。 - - DragonBones 3.0 - zh_CN - - - - - Deprecated, please refer to {@link dragonBones.BaseFactory#clock}. - - en_US - - - 已废弃,请参考 {@link dragonBones.BaseFactory#clock}。 - - zh_CN - - - - - Armature is the core of the skeleton animation system. - - - - - - DragonBones 3.0 - en_US - - - 骨架是骨骼动画系统的核心。 - - - - - - DragonBones 3.0 - zh_CN - - - - - Whether to inherit the animation control of the parent armature. - True to try to have the child armature play an animation with the same name when the parent armature play the animation. - - true - DragonBones 4.5 - en_US - - - 是否继承父骨架的动画控制。 - 如果该值为 true,当父骨架播放动画时,会尝试让子骨架播放同名动画。 - - true - DragonBones 4.5 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Dispose the armature. (Return to the object pool) - - - TypeScript style, for reference only. -
-                removeChild(armature.display);
-                armature.dispose();
-            
-
- DragonBones 3.0 - en_US - - - 释放骨架。 (回收到对象池) - - - TypeScript 风格,仅供参考。 -
-                removeChild(armature.display);
-                armature.dispose();
-            
-
- DragonBones 3.0 - zh_CN -
- - - - - - - - - - - Forces a specific bone or its owning slot to update the transform or display property in the next frame. - - - The bone name. (If not set, all bones will be update) - - Whether to update the bone's slots. (Default: false) - - - DragonBones 3.0 - en_US - - - 强制特定骨骼或其拥有的插槽在下一帧更新变换或显示属性。 - - - 骨骼名称。 (如果未设置,将更新所有骨骼) - - 是否更新骨骼的插槽。 (默认: false) - - - DragonBones 3.0 - zh_CN - - - - - Check whether a specific point is inside a custom bounding box in a slot. - The coordinate system of the point is the inner coordinate system of the armature. - Custom bounding boxes need to be customized in Dragonbones Pro. - - - The horizontal coordinate of the point. - - The vertical coordinate of the point. - DragonBones 5.0 - en_US - - - 检查特定点是否在某个插槽的自定义边界框内。 - 点的坐标系为骨架内坐标系。 - 自定义边界框需要在 DragonBones Pro 中自定义。 - - - 点的水平坐标。 - - 点的垂直坐标。 - DragonBones 5.0 - zh_CN - - - - - Check whether a specific segment intersects a custom bounding box for a slot in the armature. - The coordinate system of the segment and intersection is the inner coordinate system of the armature. - Custom bounding boxes need to be customized in Dragonbones Pro. - - - The horizontal coordinate of the beginning of the segment. - - The vertical coordinate of the beginning of the segment. - - The horizontal coordinate of the end point of the segment. - - The vertical coordinate of the end point of the segment. - - The first intersection at which a line segment intersects the bounding box from the beginning to the end. (If not set, the intersection point will not calculated) - - The first intersection at which a line segment intersects the bounding box from the end to the beginning. (If not set, the intersection point will not calculated) - - The normal radians of the tangent of the intersection boundary box. [x: Normal radian of the first intersection tangent, y: Normal radian of the second intersection tangent] (If not set, the normal will not calculated) - The slot of the first custom bounding box where the segment intersects from the start point to the end point. - DragonBones 5.0 - en_US - - - 检查特定线段是否与骨架的某个插槽的自定义边界框相交。 - 线段和交点的坐标系均为骨架内坐标系。 - 自定义边界框需要在 DragonBones Pro 中自定义。 - - - 线段起点的水平坐标。 - - 线段起点的垂直坐标。 - - 线段终点的水平坐标。 - - 线段终点的垂直坐标。 - - 线段从起点到终点与边界框相交的第一个交点。 (如果未设置,则不计算交点) - - 线段从终点到起点与边界框相交的第一个交点。 (如果未设置,则不计算交点) - - 交点边界框切线的法线弧度。 [x: 第一个交点切线的法线弧度, y: 第二个交点切线的法线弧度] (如果未设置,则不计算法线) - 线段从起点到终点相交的第一个自定义边界框的插槽。 - DragonBones 5.0 - zh_CN - - - - - Get a specific bone. - - - The bone name. - - DragonBones 3.0 - en_US - - - 获取特定的骨骼。 - - - 骨骼名称。 - - DragonBones 3.0 - zh_CN - - - - - Get a specific bone by the display. - - - The display object. - - DragonBones 3.0 - en_US - - - 通过显示对象获取特定的骨骼。 - - - 显示对象。 - - DragonBones 3.0 - zh_CN - - - - - Get a specific slot. - - - The slot name. - - DragonBones 3.0 - en_US - - - 获取特定的插槽。 - - - 插槽名称。 - - DragonBones 3.0 - zh_CN - - - - - Get a specific slot by the display. - - - The display object. - - DragonBones 3.0 - en_US - - - 通过显示对象获取特定的插槽。 - - - 显示对象。 - - DragonBones 3.0 - zh_CN - - - - - Get all bones. - - - DragonBones 3.0 - en_US - - - 获取所有的骨骼。 - - - DragonBones 3.0 - zh_CN - - - - - Get all slots. - - - DragonBones 3.0 - en_US - - - 获取所有的插槽。 - - - DragonBones 3.0 - zh_CN - - - - - Whether to flip the armature horizontally. - - DragonBones 5.5 - en_US - - - 是否将骨架水平翻转。 - - DragonBones 5.5 - zh_CN - - - - - Whether to flip the armature vertically. - - DragonBones 5.5 - en_US - - - 是否将骨架垂直翻转。 - - DragonBones 5.5 - zh_CN - - - - - The animation cache frame rate, which turns on the animation cache when the set value is greater than 0. - There is a certain amount of memory overhead to improve performance by caching animation data in memory. - The frame rate should not be set too high, usually with the frame rate of the animation is similar and lower than the program running frame rate. - When the animation cache is turned on, some features will fail, such as the offset property of bone. - - - TypeScript style, for reference only. -
-                armature.cacheFrameRate = 24;
-            
-
- - - DragonBones 4.5 - en_US - - - 动画缓存帧率,当设置的值大于 0 的时,将会开启动画缓存。 - 通过将动画数据缓存在内存中来提高运行性能,会有一定的内存开销。 - 帧率不宜设置的过高,通常跟动画的帧率相当且低于程序运行的帧率。 - 开启动画缓存后,某些功能将会失效,比如骨骼的 offset 属性等。 - - - TypeScript 风格,仅供参考。 -
-                armature.cacheFrameRate = 24;
-            
-
- - - DragonBones 4.5 - zh_CN -
- - - - The armature name. - - DragonBones 3.0 - en_US - - - 骨架名称。 - - DragonBones 3.0 - zh_CN - - - - - The armature data. - - - DragonBones 4.5 - en_US - - - 骨架数据。 - - - DragonBones 4.5 - zh_CN - - - - - The animation player. - - - DragonBones 3.0 - en_US - - - 动画播放器。 - - - DragonBones 3.0 - zh_CN - - - - - - - - The EventDispatcher instance of the armature. - - DragonBones 4.5 - en_US - - - 该骨架的 EventDispatcher 实例。 - - DragonBones 4.5 - zh_CN - - - - - The display container. - The display of the slot is displayed as the parent. - Depending on the rendering engine, the type will be different, usually the DisplayObjectContainer type. - - DragonBones 3.0 - en_US - - - 显示容器实例。 - 插槽的显示对象都会以此显示容器为父级。 - 根据渲染引擎的不同,类型会不同,通常是 DisplayObjectContainer 类型。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - Get the parent slot which the armature belongs to. - - - DragonBones 4.5 - en_US - - - 该骨架所属的父插槽。 - - - DragonBones 4.5 - zh_CN - - - - - Bone is one of the most important logical units in the armature animation system, - and is responsible for the realization of translate, rotation, scaling in the animations. - A armature can contain multiple bones. - - - - - DragonBones 3.0 - en_US - - - 骨骼在骨骼动画体系中是最重要的逻辑单元之一,负责动画中的平移、旋转、缩放的实现。 - 一个骨架中可以包含多个骨骼。 - - - - - DragonBones 3.0 - zh_CN - - - - - The offset mode. - - - DragonBones 5.5 - en_US - - - 偏移模式。 - - - DragonBones 5.5 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Forces the bone to update the transform in the next frame. - When the bone is not animated or its animation state is finished, the bone will not continue to update, - and when the skeleton must be updated for some reason, the method needs to be called explicitly. - - - TypeScript style, for reference only. -
-                let bone = armature.getBone("arm");
-                bone.offset.scaleX = 2.0;
-                bone.invalidUpdate();
-            
-
- DragonBones 3.0 - en_US - - - 强制骨骼在下一帧更新变换。 - 当该骨骼没有动画状态或其动画状态播放完成时,骨骼将不在继续更新,而此时由于某些原因必须更新骨骼时,则需要显式调用该方法。 - - - TypeScript 风格,仅供参考。 -
-                let bone = armature.getBone("arm");
-                bone.offset.scaleX = 2.0;
-                bone.invalidUpdate();
-            
-
- DragonBones 3.0 - zh_CN -
- - - - Check whether the bone contains a specific bone or slot. - - - - DragonBones 3.0 - en_US - - - 检查该骨骼是否包含特定的骨骼或插槽。 - - - - DragonBones 3.0 - zh_CN - - - - - The bone data. - - DragonBones 4.5 - en_US - - - 骨骼数据。 - - DragonBones 4.5 - zh_CN - - - - - The visible of all slots in the bone. - - true - - DragonBones 3.0 - en_US - - - 此骨骼所有插槽的可见。 - - true - - DragonBones 3.0 - zh_CN - - - - - The bone name. - - DragonBones 3.0 - en_US - - - 骨骼名称。 - - DragonBones 3.0 - zh_CN - - - - - The parent bone to which it belongs. - - DragonBones 3.0 - en_US - - - 所属的父骨骼。 - - DragonBones 3.0 - zh_CN - - - - - Deprecated, please refer to {@link dragonBones.Armature#getSlot()}. - - en_US - - - 已废弃,请参考 {@link dragonBones.Armature#getSlot()}。 - - zh_CN - - - - - - - - - For timeline state. - - - - - - - For sort bones. - - - - - - - For sort bones. - - - - - - - - - - - For timeline state. - - - - - - - For timeline state. - - - - - - - - - - The armature proxy interface, the docking engine needs to implement it concretely. - - - DragonBones 5.0 - en_US - - - 骨架代理接口,对接的引擎需要对其进行具体实现。 - - - DragonBones 5.0 - zh_CN - - - - - - - - - - - - - - - - - Dispose the instance and the Armature instance. (The Armature instance will return to the object pool) - - - TypeScript style, for reference only. -
-                removeChild(armatureDisplay);
-                armatureDisplay.dispose();
-            
-
- DragonBones 4.5 - en_US - - - 释放该实例和骨架。 (骨架会回收到对象池) - - - TypeScript 风格,仅供参考。 -
-                removeChild(armatureDisplay);
-                armatureDisplay.dispose();
-            
-
- DragonBones 4.5 - zh_CN -
- - - - The armature. - - DragonBones 4.5 - en_US - - - 骨架。 - - DragonBones 4.5 - zh_CN - - - - - The animation player. - - DragonBones 3.0 - en_US - - - 动画播放器。 - - DragonBones 3.0 - zh_CN - - - - - The slot attached to the armature, controls the display status and properties of the display object. - A bone can contain multiple slots. - A slot can contain multiple display objects, displaying only one of the display objects at a time, - but you can toggle the display object into frame animation while the animation is playing. - The display object can be a normal texture, or it can be a display of a child armature, a grid display object, - and a custom other display object. - - - - - DragonBones 3.0 - en_US - - - 插槽附着在骨骼上,控制显示对象的显示状态和属性。 - 一个骨骼上可以包含多个插槽。 - 一个插槽中可以包含多个显示对象,同一时间只能显示其中的一个显示对象,但可以在动画播放的过程中切换显示对象实现帧动画。 - 显示对象可以是普通的图片纹理,也可以是子骨架的显示容器,网格显示对象,还可以是自定义的其他显示对象。 - - - - - DragonBones 3.0 - zh_CN - - - - - Displays the animated state or mixed group name controlled by the object, set to null to be controlled by all animation states. - - null - - - - DragonBones 4.5 - en_US - - - 显示对象受到控制的动画状态或混合组名称,设置为 null 则表示受所有的动画状态控制。 - - null - - - - DragonBones 4.5 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Support default skin data. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Check whether a specific point is inside a custom bounding box in the slot. - The coordinate system of the point is the inner coordinate system of the armature. - Custom bounding boxes need to be customized in Dragonbones Pro. - - - The horizontal coordinate of the point. - - The vertical coordinate of the point. - DragonBones 5.0 - en_US - - - 检查特定点是否在插槽的自定义边界框内。 - 点的坐标系为骨架内坐标系。 - 自定义边界框需要在 DragonBones Pro 中自定义。 - - - 点的水平坐标。 - - 点的垂直坐标。 - DragonBones 5.0 - zh_CN - - - - - Check whether a specific segment intersects a custom bounding box for the slot. - The coordinate system of the segment and intersection is the inner coordinate system of the armature. - Custom bounding boxes need to be customized in Dragonbones Pro. - - - The horizontal coordinate of the beginning of the segment. - - The vertical coordinate of the beginning of the segment. - - The horizontal coordinate of the end point of the segment. - - The vertical coordinate of the end point of the segment. - - The first intersection at which a line segment intersects the bounding box from the beginning to the end. (If not set, the intersection point will not calculated) - - The first intersection at which a line segment intersects the bounding box from the end to the beginning. (If not set, the intersection point will not calculated) - - The normal radians of the tangent of the intersection boundary box. [x: Normal radian of the first intersection tangent, y: Normal radian of the second intersection tangent] (If not set, the normal will not calculated) - Intersection situation. [1: Disjoint and segments within the bounding box, 0: Disjoint, 1: Intersecting and having a nodal point and ending in the bounding box, 2: Intersecting and having a nodal point and starting at the bounding box, 3: Intersecting and having two intersections, N: Intersecting and having N intersections] - DragonBones 5.0 - en_US - - - 检查特定线段是否与插槽的自定义边界框相交。 - 线段和交点的坐标系均为骨架内坐标系。 - 自定义边界框需要在 DragonBones Pro 中自定义。 - - - 线段起点的水平坐标。 - - 线段起点的垂直坐标。 - - 线段终点的水平坐标。 - - 线段终点的垂直坐标。 - - 线段从起点到终点与边界框相交的第一个交点。 (如果未设置,则不计算交点) - - 线段从终点到起点与边界框相交的第一个交点。 (如果未设置,则不计算交点) - - 交点边界框切线的法线弧度。 [x: 第一个交点切线的法线弧度, y: 第二个交点切线的法线弧度] (如果未设置,则不计算法线) - 相交的情况。 [-1: 不相交且线段在包围盒内, 0: 不相交, 1: 相交且有一个交点且终点在包围盒内, 2: 相交且有一个交点且起点在包围盒内, 3: 相交且有两个交点, N: 相交且有 N 个交点] - DragonBones 5.0 - zh_CN - - - - - Forces the slot to update the state of the display object in the next frame. - - DragonBones 4.5 - en_US - - - 强制插槽在下一帧更新显示对象的状态。 - - DragonBones 4.5 - zh_CN - - - - - The visible of slot's display object. - - true - DragonBones 5.6 - en_US - - - 插槽的显示对象的可见。 - - true - DragonBones 5.6 - zh_CN - - - - - The index of the display object displayed in the display list. - - - TypeScript style, for reference only. -
-                let slot = armature.getSlot("weapon");
-                slot.displayIndex = 3;
-                slot.displayController = "none";
-            
-
- DragonBones 4.5 - en_US - - - 此时显示的显示对象在显示列表中的索引。 - - - TypeScript 风格,仅供参考。 -
-                let slot = armature.getSlot("weapon");
-                slot.displayIndex = 3;
-                slot.displayController = "none";
-            
-
- DragonBones 4.5 - zh_CN -
- - - - The slot name. - - - DragonBones 3.0 - en_US - - - 插槽名称。 - - - DragonBones 3.0 - zh_CN - - - - - Contains a display list of display objects or child armatures. - - DragonBones 3.0 - en_US - - - 包含显示对象或子骨架的显示列表。 - - DragonBones 3.0 - zh_CN - - - - - The slot data. - - - DragonBones 4.5 - en_US - - - 插槽数据。 - - - DragonBones 4.5 - zh_CN - - - - - - - - The custom bounding box data for the slot at current time. - - DragonBones 5.0 - en_US - - - 插槽此时的自定义包围盒数据。 - - DragonBones 5.0 - zh_CN - - - - - - - - - - - The display object that the slot displays at this time. - - - TypeScript style, for reference only. -
-                let slot = armature.getSlot("text");
-                slot.display = new yourEngine.TextField();
-            
-
- DragonBones 3.0 - en_US - - - 插槽此时显示的显示对象。 - - - TypeScript 风格,仅供参考。 -
-                let slot = armature.getSlot("text");
-                slot.display = new yourEngine.TextField();
-            
-
- DragonBones 3.0 - zh_CN -
- - - - The child armature that the slot displayed at current time. - - - TypeScript style, for reference only. -
-                let slot = armature.getSlot("weapon");
-            let prevChildArmature = slot.childArmature;
-            if (prevChildArmature) {
-            prevChildArmature.dispose();
-                }
-                slot.childArmature = factory.buildArmature("weapon_blabla", "weapon_blabla_project");
-            
-
- DragonBones 3.0 - en_US - - - 插槽此时显示的子骨架。 - 注意,被替换的对象并不会被回收,根据语言和引擎的不同,需要额外处理。 - - - TypeScript 风格,仅供参考。 -
-                let slot = armature.getSlot("weapon");
-            let prevChildArmature = slot.childArmature;
-            if (prevChildArmature) {
-            prevChildArmature.dispose();
-                }
-                slot.childArmature = factory.buildArmature("weapon_blabla", "weapon_blabla_project");
-            
-
- DragonBones 3.0 - zh_CN -
- - - - The parent bone to which it belongs. - - DragonBones 3.0 - en_US - - - 所属的父骨骼。 - - DragonBones 3.0 - zh_CN - - - - - The base class of the transform object. - - - DragonBones 4.5 - en_US - - - 变换对象的基类。 - - - DragonBones 4.5 - zh_CN - - - - - - - - - - - - - - A matrix relative to the armature coordinate system. - - DragonBones 3.0 - en_US - - - 相对于骨架坐标系的矩阵。 - - DragonBones 3.0 - zh_CN - - - - - A transform relative to the armature coordinate system. - - - DragonBones 3.0 - en_US - - - 相对于骨架坐标系的变换。 - - - DragonBones 3.0 - zh_CN - - - - - The offset transform relative to the armature or the parent bone coordinate system. - - - DragonBones 3.0 - en_US - - - 相对于骨架或父骨骼坐标系的偏移变换。 - - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - For performance considerations, rotation or scale in the {@link #global} attribute of the bone or slot is not always properly accessible, - some engines do not rely on these attributes to update rendering, such as Egret. - The use of this method ensures that the access to the {@link #global} property is correctly rotation or scale. - - - TypeScript style, for reference only. -
-                bone.updateGlobalTransform();
-                let rotation = bone.global.rotation;
-            
-
- DragonBones 3.0 - en_US - - - 出于性能的考虑,骨骼或插槽的 {@link #global} 属性中的旋转或缩放并不总是正确可访问的,有些引擎并不依赖这些属性更新渲染,比如 Egret。 - 使用此方法可以保证访问到 {@link #global} 属性中正确的旋转或缩放。 - - - TypeScript 风格,仅供参考。 -
-                bone.updateGlobalTransform();
-                let rotation = bone.global.rotation;
-            
-
- DragonBones 3.0 - zh_CN -
- - - - The armature to which it belongs. - - DragonBones 3.0 - en_US - - - 所属的骨架。 - - DragonBones 3.0 - zh_CN - - - - - The BaseObject is the base class for all objects in the DragonBones framework. - All BaseObject instances are cached to the object pool to reduce the performance consumption of frequent requests for memory or memory recovery. - - DragonBones 4.5 - en_US - - - 基础对象,通常 DragonBones 的对象都继承自该类。 - 所有基础对象的实例都会缓存到对象池,以减少频繁申请内存或内存回收的性能消耗。 - - DragonBones 4.5 - zh_CN - - - - - Set the maximum cache count of the specify object pool. - - - The specify class. (Set all object pools max cache count if not set) - - Max count. - DragonBones 4.5 - en_US - - - 设置特定对象池的最大缓存数量。 - - - 特定的类。 (不设置则设置所有对象池的最大缓存数量) - - 最大缓存数量。 - DragonBones 4.5 - zh_CN - - - - - Clear the cached instances of a specify object pool. - - - Specify class. (Clear all cached instances if not set) - DragonBones 4.5 - en_US - - - 清除特定对象池的缓存实例。 - - - 特定的类。 (不设置则清除所有缓存的实例) - DragonBones 4.5 - zh_CN - - - - - Get an instance of the specify class from object pool. - - - The specify class. - DragonBones 4.5 - en_US - - - 从对象池中获取特定类的实例。 - - - 特定的类。 - DragonBones 4.5 - zh_CN - - - - - A unique identification number assigned to the object. - - DragonBones 4.5 - en_US - - - 分配给此实例的唯一标识号。 - - DragonBones 4.5 - zh_CN - - - - - - - - Clear the object and return it back to object pool。 - - DragonBones 4.5 - en_US - - - 清除该实例的所有数据并将其返还对象池。 - - DragonBones 4.5 - zh_CN - - - - - - - - - - - - - - - - Bounding box type. - - DragonBones 5.0 - en_US - - - 边界框类型。 - - DragonBones 5.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - Offset mode. - - DragonBones 5.5 - en_US - - - 偏移模式。 - - DragonBones 5.5 - zh_CN - - - - - Animation fade out mode. - - DragonBones 4.5 - en_US - - - 动画淡出模式。 - - DragonBones 4.5 - zh_CN - - - - - Do not fade out of any animation states. - - en_US - - - 不淡出任何的动画状态。 - - zh_CN - - - - - Fade out the animation states of the same layer. - - en_US - - - 淡出同层的动画状态。 - - zh_CN - - - - - Fade out the animation states of the same group. - - en_US - - - 淡出同组的动画状态。 - - zh_CN - - - - - Fade out the animation states of the same layer and group. - - en_US - - - 淡出同层并且同组的动画状态。 - - zh_CN - - - - - Fade out of all animation states. - - en_US - - - 淡出所有的动画状态。 - - zh_CN - - - - - Does not replace the animation state with the same name. - - en_US - - - 不替换同名的动画状态。 - - zh_CN - - - - - - - - The properties of the object carry basic information about an event, - which are passed as parameter or parameter's parameter to event listeners when an event occurs. - - DragonBones 4.5 - en_US - - - 事件对象,包含有关事件的基本信息,当发生事件时,该实例将作为参数或参数的参数传递给事件侦听器。 - - DragonBones 4.5 - zh_CN - - - - - Animation start play. - - DragonBones 4.5 - en_US - - - 动画开始播放。 - - DragonBones 4.5 - zh_CN - - - - - Animation loop play complete once. - - DragonBones 4.5 - en_US - - - 动画循环播放完成一次。 - - DragonBones 4.5 - zh_CN - - - - - Animation play complete. - - DragonBones 4.5 - en_US - - - 动画播放完成。 - - DragonBones 4.5 - zh_CN - - - - - Animation fade in start. - - DragonBones 4.5 - en_US - - - 动画淡入开始。 - - DragonBones 4.5 - zh_CN - - - - - Animation fade in complete. - - DragonBones 4.5 - en_US - - - 动画淡入完成。 - - DragonBones 4.5 - zh_CN - - - - - Animation fade out start. - - DragonBones 4.5 - en_US - - - 动画淡出开始。 - - DragonBones 4.5 - zh_CN - - - - - Animation fade out complete. - - DragonBones 4.5 - en_US - - - 动画淡出完成。 - - DragonBones 4.5 - zh_CN - - - - - Animation frame event. - - DragonBones 4.5 - en_US - - - 动画帧事件。 - - DragonBones 4.5 - zh_CN - - - - - Animation frame sound event. - - DragonBones 4.5 - en_US - - - 动画帧声音事件。 - - DragonBones 4.5 - zh_CN - - - - - - - The armature that dispatch the event. - - - DragonBones 4.5 - en_US - - - 发出该事件的骨架。 - - - DragonBones 4.5 - zh_CN - - - The custom data. - - - - DragonBones 5.0 - en_US - - - 自定义数据。 - - - - DragonBones 5.0 - zh_CN - - - - - If is a frame event, the value is used to describe the time that the event was in the animation timeline. (In seconds) - - DragonBones 4.5 - en_US - - - 如果是帧事件,此值用来描述该事件在动画时间轴中所处的时间。(以秒为单位) - - DragonBones 4.5 - zh_CN - - - - - The event type。 - - DragonBones 4.5 - en_US - - - 事件类型。 - - DragonBones 4.5 - zh_CN - - - - - The event name. (The frame event name or the frame sound name) - - DragonBones 4.5 - en_US - - - 事件名称。 (帧事件的名称或帧声音的名称) - - DragonBones 4.5 - zh_CN - - - - - The bone that dispatch the event. - - - DragonBones 4.5 - en_US - - - 发出该事件的骨骼。 - - - DragonBones 4.5 - zh_CN - - - - - The slot that dispatch the event. - - - DragonBones 4.5 - en_US - - - 发出该事件的插槽。 - - - DragonBones 4.5 - zh_CN - - - - - The animation state that dispatch the event. - - - DragonBones 4.5 - en_US - - - 发出该事件的动画状态。 - - - DragonBones 4.5 - zh_CN - - - - - - - - - - - The event dispatcher interface. - Dragonbones event dispatch usually relies on docking engine to implement, which defines the event method to be implemented when docking the engine. - - DragonBones 4.5 - en_US - - - 事件派发接口。 - DragonBones 的事件派发通常依赖于对接的引擎来实现,该接口定义了对接引擎时需要实现的事件方法。 - - DragonBones 4.5 - zh_CN - - - - - Checks whether the object has any listeners registered for a specific type of event。 - - - Event type. - DragonBones 4.5 - en_US - - - 检查是否为特定的事件类型注册了任何侦听器。 - - - 事件类型。 - DragonBones 4.5 - zh_CN - - - - - Dispatches an event into the event flow. - - - Event type. - - Event object. - - DragonBones 4.5 - en_US - - - 分派特定的事件到事件流中。 - - - 事件类型。 - - 事件数据。 - - DragonBones 4.5 - zh_CN - - - - - Add an event listener object so that the listener receives notification of an event. - - - Event type. - - Event listener. - - The listener function's "this". - DragonBones 4.5 - en_US - - - 添加特定事件类型的事件侦听器,以使侦听器能够接收事件通知。 - - - 事件类型。 - - 事件侦听器。 - - 侦听函数绑定的 this 对象。 - DragonBones 4.5 - zh_CN - - - - - Removes a listener from the object. - - - Event type. - - Event listener. - - The listener function's "this". - DragonBones 4.5 - en_US - - - 删除特定事件类型的侦听器。 - - - 事件类型。 - - 事件侦听器。 - - 侦听函数绑定的 this 对象。 - DragonBones 4.5 - zh_CN - - - - - - - - - Base class for the factory that create the armatures. (Typically only one global factory instance is required) - The factory instance create armatures by parsed and added DragonBonesData instances and TextureAtlasData instances. - Once the data has been parsed, it has been cached in the factory instance and does not need to be parsed again until it is cleared by the factory instance. - - - - - - DragonBones 3.0 - en_US - - - 创建骨架的工厂基类。 (通常只需要一个全局工厂实例) - 工厂通过解析并添加的 DragonBonesData 实例和 TextureAtlasData 实例来创建骨架。 - 当数据被解析过之后,已经添加到工厂中,在没有被工厂清理之前,不需要再次解析。 - - - - - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - Create a factory instance. (typically only one global factory instance is required) - - DragonBones 3.0 - en_US - - - 创建一个工厂实例。 (通常只需要一个全局工厂实例) - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Parse the raw data to a DragonBonesData instance and cache it to the factory. - - - The raw data. - - Specify a cache name for the instance so that the instance can be obtained through this name. (If not set, use the instance name instead) - - Specify a scaling value for all armatures. (Default: 1.0) - DragonBonesData instance - - - - - DragonBones 4.5 - en_US - - - 将原始数据解析为 DragonBonesData 实例,并缓存到工厂中。 - - - 原始数据。 - - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) - - 为所有的骨架指定一个缩放值。 (默认: 1.0) - DragonBonesData 实例 - - - - - DragonBones 4.5 - zh_CN - - - - - Parse the raw texture atlas data and the texture atlas object to a TextureAtlasData instance and cache it to the factory. - - - The raw texture atlas data. - - The texture atlas object. - - Specify a cache name for the instance so that the instance can be obtained through this name. (If not set, use the instance name instead) - - Specify a scaling value for the map set. (Default: 1.0) - TextureAtlasData instance - - - - - DragonBones 4.5 - en_US - - - 将原始贴图集数据和贴图集对象解析为 TextureAtlasData 实例,并缓存到工厂中。 - - - 原始贴图集数据。 - - 贴图集对象。 - - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) - - 为贴图集指定一个缩放值。 (默认: 1.0) - TextureAtlasData 实例 - - - - - DragonBones 4.5 - zh_CN - - - - - - - - Get a specific DragonBonesData instance. - - - The DragonBonesData instance cache name. - DragonBonesData instance - - - - - DragonBones 3.0 - en_US - - - 获取特定的 DragonBonesData 实例。 - - - DragonBonesData 实例的缓存名称。 - DragonBonesData 实例 - - - - - DragonBones 3.0 - zh_CN - - - - - Cache a DragonBonesData instance to the factory. - - - The DragonBonesData instance. - - Specify a cache name for the instance so that the instance can be obtained through this name. (if not set, use the instance name instead) - - - - - DragonBones 3.0 - en_US - - - 将 DragonBonesData 实例缓存到工厂中。 - - - DragonBonesData 实例。 - - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) - - - - - DragonBones 3.0 - zh_CN - - - - - Remove a DragonBonesData instance. - - - The DragonBonesData instance cache name. - - Whether to dispose data. (Default: true) - - - - - DragonBones 3.0 - en_US - - - 移除 DragonBonesData 实例。 - - - DragonBonesData 实例缓存名称。 - - 是否释放数据。 (默认: true) - - - - - DragonBones 3.0 - zh_CN - - - - - Get a list of specific TextureAtlasData instances. - - - The TextureAtlasData cahce name. - - - - - DragonBones 3.0 - en_US - - - 获取特定的 TextureAtlasData 实例列表。 - - - TextureAtlasData 实例缓存名称。 - - - - - DragonBones 3.0 - zh_CN - - - - - Cache a TextureAtlasData instance to the factory. - - - The TextureAtlasData instance. - - Specify a cache name for the instance so that the instance can be obtained through this name. (if not set, use the instance name instead) - - - - - DragonBones 3.0 - en_US - - - 将 TextureAtlasData 实例缓存到工厂中。 - - - TextureAtlasData 实例。 - - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) - - - - - DragonBones 3.0 - zh_CN - - - - - Remove a TextureAtlasData instance. - - - The TextureAtlasData instance cache name. - - Whether to dispose data. - - - - - DragonBones 3.0 - en_US - - - 移除 TextureAtlasData 实例。 - - - TextureAtlasData 实例的缓存名称。 - - 是否释放数据。 - - - - - DragonBones 3.0 - zh_CN - - - - - Get a specific armature data. - - - The armature data name. - - The cached name for DragonbonesData instance. - - DragonBones 5.1 - en_US - - - 获取特定的骨架数据。 - - - 骨架数据名称。 - - DragonBonesData 实例的缓存名称。 - - DragonBones 5.1 - zh_CN - - - - - Clear all cached DragonBonesData instances and TextureAtlasData instances. - - - Whether to dispose data. - DragonBones 4.5 - en_US - - - 清除缓存的所有 DragonBonesData 实例和 TextureAtlasData 实例。 - - - 是否释放数据。 - DragonBones 4.5 - zh_CN - - - - - Create a armature from cached DragonBonesData instances and TextureAtlasData instances. - Note that when the created armature that is no longer in use, you need to explicitly dispose {@link #dragonBones.Armature#dispose()}. - - - The armature data name. - - The cached name of the DragonBonesData instance. (If not set, all DragonBonesData instances are retrieved, and when multiple DragonBonesData instances contain a the same name armature data, it may not be possible to accurately create a specific armature) - - The skin name, you can set a different ArmatureData name to share it's skin data. (If not set, use the default skin data) - The armature. - - TypeScript style, for reference only. -
-                let armature = factory.buildArmature("armatureName", "dragonBonesName");
-                armature.clock = factory.clock;
-            
-
- - - DragonBones 3.0 - en_US - - - 通过缓存的 DragonBonesData 实例和 TextureAtlasData 实例创建一个骨架。 - 注意,创建的骨架不再使用时,需要显式释放 {@link #dragonBones.Armature#dispose()}。 - - - 骨架数据名称。 - - DragonBonesData 实例的缓存名称。 (如果未设置,将检索所有的 DragonBonesData 实例,当多个 DragonBonesData 实例中包含同名的骨架数据时,可能无法准确的创建出特定的骨架) - - 皮肤名称,可以设置一个其他骨架数据名称来共享其皮肤数据。(如果未设置,则使用默认的皮肤数据) - 骨架。 - - TypeScript 风格,仅供参考。 -
-                let armature = factory.buildArmature("armatureName", "dragonBonesName");
-                armature.clock = factory.clock;
-            
-
- - - DragonBones 3.0 - zh_CN -
- - - - - - - Replaces the current display data for a particular slot with a specific display data. - Specify display data with "dragonBonesName/armatureName/slotName/displayName". - - - The DragonBonesData instance cache name. - - The armature data name. - - The slot data name. - - The display data name. - - The slot. - - The index of the display data that is replaced. (If it is not set, replaces the current display data) - - TypeScript style, for reference only. -
-                let slot = armature.getSlot("weapon");
-                factory.replaceSlotDisplay("dragonBonesName", "armatureName", "slotName", "displayName", slot);
-            
-
- DragonBones 4.5 - en_US - - - 用特定的显示对象数据替换特定插槽当前的显示对象数据。 - 用 "dragonBonesName/armatureName/slotName/displayName" 指定显示对象数据。 - - - DragonBonesData 实例的缓存名称。 - - 骨架数据名称。 - - 插槽数据名称。 - - 显示对象数据名称。 - - 插槽。 - - 被替换的显示对象数据的索引。 (如果未设置,则替换当前的显示对象数据) - - TypeScript 风格,仅供参考。 -
-                let slot = armature.getSlot("weapon");
-                factory.replaceSlotDisplay("dragonBonesName", "armatureName", "slotName", "displayName", slot);
-            
-
- DragonBones 4.5 - zh_CN -
- - - - - - - - Replaces the existing animation data for a specific armature with the animation data for the specific armature data. - This enables you to make a armature template so that other armature without animations can share it's animations. - - - The armtaure. - - The armature data. - - Whether to completely overwrite the original animation. (Default: false) - - TypeScript style, for reference only. -
-                let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
-                let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
-                if (armatureDataB) {
-                factory.replaceAnimation(armatureA, armatureDataB);
-                }
-            
-
- - - DragonBones 5.6 - en_US - - - 用特定骨架数据的动画数据替换特定骨架现有的动画数据。 - 这样就能实现制作一个骨架动画模板,让其他没有制作动画的骨架共享该动画。 - - - 骨架。 - - 骨架数据。 - - 是否完全覆盖原来的动画。(默认: false) - - TypeScript 风格,仅供参考。 -
-                let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
-                let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
-                if (armatureDataB) {
-                factory.replaceAnimation(armatureA, armatureDataB);
-                }
-            
-
- - - DragonBones 5.6 - zh_CN -
- - - - - - - - - - An Worldclock instance updated by engine. - - DragonBones 5.7 - en_US - - - 由引擎驱动的 WorldClock 实例。 - - DragonBones 5.7 - zh_CN - - - - - Deprecated, please refer to {@link #replaceSkin}. - - en_US - - - 已废弃,请参考 {@link #replaceSkin}。 - - zh_CN - - - - - - - - - 2D Transform matrix. - - DragonBones 3.0 - en_US - - - 2D 转换矩阵。 - - DragonBones 3.0 - zh_CN - - - - - The value that affects the positioning of pixels along the x axis when scaling or rotating an image. - - 1.0 - DragonBones 3.0 - en_US - - - 缩放或旋转图像时影响像素沿 x 轴定位的值。 - - 1.0 - DragonBones 3.0 - zh_CN - - - - - The value that affects the positioning of pixels along the y axis when rotating or skewing an image. - - 0.0 - DragonBones 3.0 - en_US - - - 旋转或倾斜图像时影响像素沿 y 轴定位的值。 - - 0.0 - DragonBones 3.0 - zh_CN - - - - - The value that affects the positioning of pixels along the x axis when rotating or skewing an image. - - 0.0 - DragonBones 3.0 - en_US - - - 旋转或倾斜图像时影响像素沿 x 轴定位的值。 - - 0.0 - DragonBones 3.0 - zh_CN - - - - - The value that affects the positioning of pixels along the y axis when scaling or rotating an image. - - 1.0 - DragonBones 3.0 - en_US - - - 缩放或旋转图像时影响像素沿 y 轴定位的值。 - - 1.0 - DragonBones 3.0 - zh_CN - - - - - The distance by which to translate each point along the x axis. - - 0.0 - DragonBones 3.0 - en_US - - - 沿 x 轴平移每个点的距离。 - - 0.0 - DragonBones 3.0 - zh_CN - - - - - The distance by which to translate each point along the y axis. - - 0.0 - DragonBones 3.0 - en_US - - - 沿 y 轴平移每个点的距离。 - - 0.0 - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - Convert to unit matrix. - The resulting matrix has the following properties: a=1, b=0, c=0, d=1, tx=0, ty=0. - - DragonBones 3.0 - en_US - - - 转换为单位矩阵。 - 该矩阵具有以下属性:a=1、b=0、c=0、d=1、tx=0、ty=0。 - - DragonBones 3.0 - zh_CN - - - - - Multiplies the current matrix with another matrix. - - - The matrix that needs to be multiplied. - DragonBones 3.0 - en_US - - - 将当前矩阵与另一个矩阵相乘。 - - - 需要相乘的矩阵。 - DragonBones 3.0 - zh_CN - - - - - Convert to inverse matrix. - - DragonBones 3.0 - en_US - - - 转换为逆矩阵。 - - DragonBones 3.0 - zh_CN - - - - - Apply a matrix transformation to a specific point. - - - X coordinate. - - Y coordinate. - - The point after the transformation is applied. - - Whether to ignore tx, ty's conversion to point. - DragonBones 3.0 - en_US - - - 将矩阵转换应用于特定点。 - - - 横坐标。 - - 纵坐标。 - - 应用转换之后的点。 - - 是否忽略 tx,ty 对点的转换。 - DragonBones 3.0 - zh_CN - - - - - - - - The Point object represents a location in a two-dimensional coordinate system. - - DragonBones 3.0 - en_US - - - Point 对象表示二维坐标系统中的某个位置。 - - DragonBones 3.0 - zh_CN - - - - - The horizontal coordinate. - - 0.0 - DragonBones 3.0 - en_US - - - 该点的水平坐标。 - - 0.0 - DragonBones 3.0 - zh_CN - - - - - The vertical coordinate. - - 0.0 - DragonBones 3.0 - en_US - - - 该点的垂直坐标。 - - 0.0 - DragonBones 3.0 - zh_CN - - - - - Creates a new point. If you pass no parameters to this method, a point is created at (0,0). - - - The horizontal coordinate. - - The vertical coordinate. - DragonBones 3.0 - en_US - - - 创建一个 egret.Point 对象.若不传入任何参数,将会创建一个位于(0,0)位置的点。 - - - 该对象的x属性值,默认为 0.0。 - - 该对象的y属性值,默认为 0.0。 - DragonBones 3.0 - zh_CN - - - - - - - - - - - A Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its - width and its height.
- The x, y, width, and height properties of the Rectangle class are independent of each other; changing the value of - one property has no effect on the others. However, the right and bottom properties are integrally related to those - four properties. For example, if you change the value of the right property, the value of the width property changes; - if you change the bottom property, the value of the height property changes. -
- DragonBones 3.0 - en_US - - - Rectangle 对象是按其位置(由它左上角的点 (x, y) 确定)以及宽度和高度定义的区域。
- Rectangle 类的 x、y、width 和 height 属性相互独立;更改一个属性的值不会影响其他属性。 - 但是,right 和 bottom 属性与这四个属性是整体相关的。例如,如果更改 right 属性的值,则 width - 属性的值将发生变化;如果更改 bottom 属性,则 height 属性的值将发生变化。 -
- DragonBones 3.0 - zh_CN -
- - - - The x coordinate of the top-left corner of the rectangle. - - 0.0 - DragonBones 3.0 - en_US - - - 矩形左上角的 x 坐标。 - - 0.0 - DragonBones 3.0 - zh_CN - - - - - The y coordinate of the top-left corner of the rectangle. - - 0.0 - DragonBones 3.0 - en_US - - - 矩形左上角的 y 坐标。 - - 0.0 - DragonBones 3.0 - zh_CN - - - - - The width of the rectangle, in pixels. - - 0.0 - DragonBones 3.0 - en_US - - - 矩形的宽度(以像素为单位)。 - - 0.0 - DragonBones 3.0 - zh_CN - - - - - 矩形的高度(以像素为单位)。 - - 0.0 - DragonBones 3.0 - en_US - - - The height of the rectangle, in pixels. - - 0.0 - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - 2D Transform. - - DragonBones 3.0 - en_US - - - 2D 变换。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - Horizontal translate. - - DragonBones 3.0 - en_US - - - 水平位移。 - - DragonBones 3.0 - zh_CN - - - - - Vertical translate. - - DragonBones 3.0 - en_US - - - 垂直位移。 - - DragonBones 3.0 - zh_CN - - - - - Skew. (In radians) - - DragonBones 3.0 - en_US - - - 倾斜。 (以弧度为单位) - - DragonBones 3.0 - zh_CN - - - - - rotation. (In radians) - - DragonBones 3.0 - en_US - - - 旋转。 (以弧度为单位) - - DragonBones 3.0 - zh_CN - - - - - Horizontal Scaling. - - DragonBones 3.0 - en_US - - - 水平缩放。 - - DragonBones 3.0 - zh_CN - - - - - Vertical scaling. - - DragonBones 3.0 - en_US - - - 垂直缩放。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - The animation config is used to describe all the information needed to play an animation state. - The API is still in the experimental phase and may encounter bugs or stability or compatibility issues when used. - - - - DragonBones 5.0 - en_US - - - 动画配置用来描述播放一个动画状态所需要的全部信息。 - 该 API 仍在实验阶段,使用时可能遭遇 bug 或稳定性或兼容性问题。 - - - - DragonBones 5.0 - zh_CN - - - - - - - - Fade out the pattern of other animation states when the animation state is fade in. - This property is typically used to specify the substitution of multiple animation states blend. - - dragonBones.AnimationFadeOutMode.All - DragonBones 5.0 - en_US - - - 淡入动画状态时淡出其他动画状态的模式。 - 该属性通常用来指定多个动画状态混合时的相互替换关系。 - - dragonBones.AnimationFadeOutMode.All - DragonBones 5.0 - zh_CN - - - - - - - - - - - - - - - - - - - - Whether the animation state has control over the display property of the slots. - Sometimes blend a animation state does not want it to control the display properties of the slots, - especially if other animation state are controlling the display properties of the slots. - - true - DragonBones 5.0 - en_US - - - 动画状态是否对插槽的显示对象属性有控制权。 - 有时混合一个动画状态并不希望其控制插槽的显示对象属性, - 尤其是其他动画状态正在控制这些插槽的显示对象属性时。 - - true - DragonBones 5.0 - zh_CN - - - - - Whether to reset the objects without animation to the armature pose when the animation state is start to play. - This property should usually be set to false when blend multiple animation states. - - true - DragonBones 5.1 - en_US - - - 开始播放动画状态时是否将没有动画的对象重置为骨架初始值。 - 通常在混合多个动画状态时应该将该属性设置为 false。 - - true - DragonBones 5.1 - zh_CN - - - - - - - - The play times. [0: Loop play, [1~N]: Play N times] - - DragonBones 3.0 - en_US - - - 播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] - - DragonBones 3.0 - zh_CN - - - - - The blend layer. - High layer animation state will get the blend weight first. - When the blend weight is assigned more than 1, the remaining animation states will no longer get the weight assigned. - - - DragonBones 5.0 - en_US - - - 混合图层。 - 图层高的动画状态会优先获取混合权重。 - 当混合权重分配超过 1 时,剩余的动画状态将不再获得权重分配。 - - - DragonBones 5.0 - zh_CN - - - - - The start time of play. (In seconds) - - 0.0 - DragonBones 5.0 - en_US - - - 播放的开始时间。 (以秒为单位) - - 0.0 - DragonBones 5.0 - zh_CN - - - - - The duration of play. - [-1: Use the default value of the animation data, 0: Stop play, (0~N]: The duration] (In seconds) - - -1.0 - DragonBones 5.0 - en_US - - - 播放的持续时间。 - [-1: 使用动画数据默认值, 0: 动画停止, (0~N]: 持续时间] (以秒为单位) - - -1.0 - DragonBones 5.0 - zh_CN - - - - - The play speed. - The value is an overlay relationship with {@link dragonBones.Animation#timeScale}. - [(-N~0): Reverse play, 0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] - - 1.0 - DragonBones 3.0 - en_US - - - 播放速度。 - 该值与 {@link dragonBones.Animation#timeScale} 是叠加关系。 - [(-N~0): 倒转播放, 0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] - - 1.0 - DragonBones 3.0 - zh_CN - - - - - The blend weight. - - 1.0 - DragonBones 5.0 - en_US - - - 混合权重。 - - 1.0 - DragonBones 5.0 - zh_CN - - - - - The fade in time. - [-1: Use the default value of the animation data, [0~N]: The fade in time] (In seconds) - - -1.0 - DragonBones 5.0 - en_US - - - 淡入时间。 - [-1: 使用动画数据默认值, [0~N]: 淡入时间] (以秒为单位) - - -1.0 - DragonBones 5.0 - zh_CN - - - - - The auto fade out time when the animation state play completed. - [-1: Do not fade out automatically, [0~N]: The fade out time] (In seconds) - - -1.0 - DragonBones 5.0 - en_US - - - 动画状态播放完成后的自动淡出时间。 - [-1: 不自动淡出, [0~N]: 淡出时间] (以秒为单位) - - -1.0 - DragonBones 5.0 - zh_CN - - - - - The name of the animation state. (Can be different from the name of the animation data) - - DragonBones 5.0 - en_US - - - 动画状态名称。 (可以不同于动画数据) - - DragonBones 5.0 - zh_CN - - - - - The animation data name. - - DragonBones 5.0 - en_US - - - 动画数据名称。 - - DragonBones 5.0 - zh_CN - - - - - The blend group name of the animation state. - This property is typically used to specify the substitution of multiple animation states blend. - - - DragonBones 5.0 - en_US - - - 混合组名称。 - 该属性通常用来指定多个动画状态混合时的相互替换关系。 - - - DragonBones 5.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - The animation data. - - DragonBones 3.0 - en_US - - - 动画数据。 - - DragonBones 3.0 - zh_CN - - - - - FrameIntArray. - - - - - - - - FrameFloatArray. - - - - - - - - FrameArray. - - - - - - - - The frame count of the animation. - - DragonBones 3.0 - en_US - - - 动画的帧数。 - - DragonBones 3.0 - zh_CN - - - - - The play times of the animation. [0: Loop play, [1~N]: Play N times] - - DragonBones 3.0 - en_US - - - 动画的播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] - - DragonBones 3.0 - zh_CN - - - - - The duration of the animation. (In seconds) - - DragonBones 3.0 - en_US - - - 动画的持续时间。 (以秒为单位) - - DragonBones 3.0 - zh_CN - - - - - - - - The fade in time of the animation. (In seconds) - - DragonBones 3.0 - en_US - - - 动画的淡入时间。 (以秒为单位) - - DragonBones 3.0 - zh_CN - - - - - - - - The animation name. - - DragonBones 3.0 - en_US - - - 动画名称。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The armature data. - - DragonBones 3.0 - en_US - - - 骨架数据。 - - DragonBones 3.0 - zh_CN - - - - - - - - The animation frame rate. - - DragonBones 3.0 - en_US - - - 动画帧率。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - The armature name. - - DragonBones 3.0 - en_US - - - 骨架名称。 - - DragonBones 3.0 - zh_CN - - - - - - - - The names of all the animation data. - - DragonBones 3.0 - en_US - - - 所有的动画数据名称。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The default skin data. - - DragonBones 4.5 - en_US - - - 默认插槽数据。 - - DragonBones 4.5 - zh_CN - - - - - The default animation data. - - DragonBones 4.5 - en_US - - - 默认动画数据。 - - DragonBones 4.5 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get a specific done data. - - - The bone name. - DragonBones 3.0 - en_US - - - 获取特定的骨骼数据。 - - - 骨骼名称。 - DragonBones 3.0 - zh_CN - - - - - Get a specific slot data. - - - The slot name. - DragonBones 3.0 - en_US - - - 获取特定的插槽数据。 - - - 插槽名称。 - DragonBones 3.0 - zh_CN - - - - - - - - Get a specific skin data. - - - The skin name. - DragonBones 3.0 - en_US - - - 获取特定皮肤数据。 - - - 皮肤名称。 - DragonBones 3.0 - zh_CN - - - - - - - - Get a specific animation data. - - - The animation animationName. - DragonBones 3.0 - en_US - - - 获取特定的动画数据。 - - - 动画名称。 - DragonBones 3.0 - zh_CN - - - - - The bone data. - - DragonBones 3.0 - en_US - - - 骨骼数据。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - The bone length. - - DragonBones 3.0 - en_US - - - 骨骼长度。 - - DragonBones 3.0 - zh_CN - - - - - The bone name. - - DragonBones 3.0 - en_US - - - 骨骼名称。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - The parent bone data. - - DragonBones 3.0 - en_US - - - 父骨骼数据。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - The slot data. - - DragonBones 3.0 - en_US - - - 插槽数据。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - The slot name. - - DragonBones 3.0 - en_US - - - 插槽名称。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - The parent bone data. - - DragonBones 3.0 - en_US - - - 父骨骼数据。 - - DragonBones 3.0 - zh_CN - - - - - - - - The base class of bounding box data. - - - - - DragonBones 5.0 - en_US - - - 边界框数据基类。 - - - - - DragonBones 5.0 - zh_CN - - - - - The bounding box type. - - DragonBones 5.0 - en_US - - - 边界框类型。 - - DragonBones 5.0 - zh_CN - - - - - - - - - - - - - - - - - Check whether the bounding box contains a specific point. (Local coordinate system) - - DragonBones 5.0 - en_US - - - 检查边界框是否包含特定点。(本地坐标系) - - DragonBones 5.0 - zh_CN - - - - - Check whether the bounding box intersects a specific segment. (Local coordinate system) - - DragonBones 5.0 - en_US - - - 检查边界框是否与特定线段相交。(本地坐标系) - - DragonBones 5.0 - zh_CN - - - - - Cohen–Sutherland algorithm https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm - ---------------------- - | 0101 | 0100 | 0110 | - ---------------------- - | 0001 | 0000 | 0010 | - ---------------------- - | 1001 | 1000 | 1010 | - ---------------------- - - - - - - The rectangle bounding box data. - - DragonBones 5.1 - en_US - - - 矩形边界框数据。 - - DragonBones 5.1 - zh_CN - - - - - Compute the bit code for a point (x, y) using the clip rectangle - - - - - - - - - - - - - - - - - - - The ellipse bounding box data. - - DragonBones 5.1 - en_US - - - 椭圆边界框数据。 - - DragonBones 5.1 - zh_CN - - - - - - - - - - - - - - - - - - The polygon bounding box data. - - DragonBones 5.1 - en_US - - - 多边形边界框数据。 - - DragonBones 5.1 - zh_CN - - - - - - - - - - - - - - The polygon vertices. - - DragonBones 5.1 - en_US - - - 多边形顶点。 - - DragonBones 5.1 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The DragonBones data. - A DragonBones data contains multiple armature data. - - - DragonBones 3.0 - en_US - - - 龙骨数据。 - 一个龙骨数据包含多个骨架数据。 - - - DragonBones 3.0 - zh_CN - - - - - - - - The animation frame rate. - - DragonBones 3.0 - en_US - - - 动画帧频。 - - DragonBones 3.0 - zh_CN - - - - - The data version. - - DragonBones 3.0 - en_US - - - 数据版本。 - - DragonBones 3.0 - zh_CN - - - - - The DragonBones data name. - The name is consistent with the DragonBones project name. - - DragonBones 3.0 - en_US - - - 龙骨数据名称。 - 该名称与龙骨项目名保持一致。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - All armature data names. - - DragonBones 3.0 - en_US - - - 所有的骨架数据名称。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Get a specific armature data. - - - The armature data name. - DragonBones 3.0 - en_US - - - 获取特定的骨架数据。 - - - 骨架数据名称。 - DragonBones 3.0 - zh_CN - - - - - The skin data, typically a armature data instance contains at least one skinData. - - DragonBones 3.0 - en_US - - - 皮肤数据,通常一个骨架数据至少包含一个皮肤数据。 - - DragonBones 3.0 - zh_CN - - - - - The skin name. - - DragonBones 3.0 - en_US - - - 皮肤名称。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - The texture atlas data. - - DragonBones 3.0 - en_US - - - 贴图集数据。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - The texture atlas name. - - DragonBones 3.0 - en_US - - - 贴图集名称。 - - DragonBones 3.0 - zh_CN - - - - - The image path of the texture atlas. - - DragonBones 3.0 - en_US - - - 贴图集图片路径。 - - DragonBones 3.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The user custom data. - - DragonBones 5.0 - en_US - - - 用户自定义数据。 - - DragonBones 5.0 - zh_CN - - - - - The custom int numbers. - - DragonBones 5.0 - en_US - - - 自定义整数。 - - DragonBones 5.0 - zh_CN - - - - - The custom float numbers. - - DragonBones 5.0 - en_US - - - 自定义浮点数。 - - DragonBones 5.0 - zh_CN - - - - - The custom strings. - - DragonBones 5.0 - en_US - - - 自定义字符串。 - - DragonBones 5.0 - zh_CN - - - - - - - - - - - - - - - - - - - - Get the custom int number. - - DragonBones 5.0 - en_US - - - 获取自定义整数。 - - DragonBones 5.0 - zh_CN - - - - - Get the custom float number. - - DragonBones 5.0 - en_US - - - 获取自定义浮点数。 - - DragonBones 5.0 - zh_CN - - - - - Get the custom string. - - DragonBones 5.0 - en_US - - - 获取自定义字符串。 - - DragonBones 5.0 - zh_CN - - - - - - - - - - - - - - - - - - - - - - - - This class encodes and decodes JSON strings. - Spec. details, see http://www.json.org/ - - JSON uses Arrays and Objects. These correspond here to the datatypes IList and IDictionary. - All numbers are parsed to doubles. - - - - - Parses the string json into a value - - A JSON string. - An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false - - - - Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string - - A Dictionary<string, object> / List<object> - A JSON encoded string, or null if object 'json' is not serializable - - - - The features that intersect to form the contact point - This must be 4 bytes or less. - - - - - Feature index on ShapeA - - - - - Feature index on ShapeB - - - - - The feature type on ShapeA - - - - - The feature type on ShapeB - - - - - Contact ids to facilitate warm starting. - - - - - The features that intersect to form the contact point - - - - - Used to quickly compare contact ids. - - - - - A manifold point is a contact point belonging to a contact - manifold. It holds details related to the geometry and dynamics - of the contact points. - The local point usage depends on the manifold type: - -ShapeType.Circles: the local center of circleB - -SeparationFunction.FaceA: the local center of cirlceB or the clip point of polygonB - -SeparationFunction.FaceB: the clip point of polygonA - This structure is stored across time steps, so we keep it small. - Note: the impulses are used for internal caching and may not - provide reliable contact forces, especially for high speed collisions. - - - - - Uniquely identifies a contact point between two Shapes - - - - - Usage depends on manifold type - - - - - The non-penetration impulse - - - - - The friction impulse - - - - - A manifold for two touching convex Shapes. - Box2D supports multiple types of contact: - - Clip point versus plane with radius - - Point versus point with radius (circles) - The local point usage depends on the manifold type: - - ShapeType.Circles: the local center of circleA - - SeparationFunction.FaceA: the center of faceA - - SeparationFunction.FaceB: the center of faceB - Similarly the local normal usage: - - ShapeType.Circles: not used - - SeparationFunction.FaceA: the normal on polygonA - - SeparationFunction.FaceB: the normal on polygonB - We store contacts in this way so that position correction can - account for movement, which is critical for continuous physics. - All contact scenarios must be expressed in one of these types. - This structure is stored across time steps, so we keep it small. - - - - - Not use for Type.SeparationFunction.Points - - - - - Usage depends on manifold type - - - - - The number of manifold points - - - - - The points of contact - - - - - This is used for determining the state of contact points. - - - - - Point does not exist - - - - - Point was added in the update - - - - - Point persisted across the update - - - - - Point was removed in the update - - - - - Used for computing contact manifolds. - - - - - Ray-cast input data. - - - - - The ray extends from p1 to p1 + maxFraction * (p2 - p1). - If you supply a max fraction of 1, the ray extends from p1 to p2. - A max fraction of 0.5 makes the ray go from p1 and half way to p2. - - - - - The starting point of the ray. - - - - - The ending point of the ray. - - - - - Ray-cast output data. - - - - - The ray hits at p1 + fraction * (p2 - p1), where p1 and p2 come from RayCastInput. - Contains the actual fraction of the ray where it has the intersection point. - - - - - The normal of the face of the shape the ray has hit. - - - - - An axis aligned bounding box. - - - - - The lower vertex - - - - - The upper vertex - - - - - Get the center of the AABB. - - - - - Get the extents of the AABB (half-widths). - - - - - Get the perimeter length - - - - - Gets the vertices of the AABB. - - The corners of the AABB - - - - First quadrant - - - - - Second quadrant - - - - - Third quadrant - - - - - Forth quadrant - - - - - Verify that the bounds are sorted. And the bounds are valid numbers (not NaN). - - - true if this instance is valid; otherwise, false. - - - - - Combine an AABB into this one. - - The aabb. - - - - Combine two AABBs into this one. - - The aabb1. - The aabb2. - - - - Does this aabb contain the provided AABB. - - The aabb. - - true if it contains the specified aabb; otherwise, false. - - - - - Determines whether the AAABB contains the specified point. - - The point. - - true if it contains the specified point; otherwise, false. - - - - - Test if the two AABBs overlap. - - The first AABB. - The second AABB. - True if they are overlapping. - - - - Raycast against this AABB using the specificed points and maxfraction (found in input) - - The results of the raycast. - The parameters for the raycast. - True if the ray intersects the AABB - - - - This holds polygon B expressed in frame A. - - - - - This structure is used to keep track of the best separating axis. - - - - - Reference face used for clipping - - - - - Collision methods - - - - - Test overlap between the two shapes. - - The first shape. - The index for the first shape. - The second shape. - The index for the second shape. - The transform for the first shape. - The transform for the seconds shape. - - - - - Compute the collision manifold between two circles. - - - - - Compute the collision manifold between a polygon and a circle. - - The manifold. - The polygon A. - The transform of A. - The circle B. - The transform of B. - - - - Compute the collision manifold between two polygons. - - The manifold. - The poly A. - The transform A. - The poly B. - The transform B. - - - - Compute contact points for edge versus circle. - This accounts for edge connectivity. - - The manifold. - The edge A. - The transform A. - The circle B. - The transform B. - - - - Collides and edge and a polygon, taking into account edge adjacency. - - The manifold. - The edge A. - The xf A. - The polygon B. - The xf B. - - - - Clipping for contact manifolds. - - The v out. - The v in. - The normal. - The offset. - The vertex index A. - - - - - Find the separation between poly1 and poly2 for a give edge normal on poly1. - - The poly1. - The XF1. - The edge1. - The poly2. - The XF2. - - - - - Find the max separation between poly1 and poly2 using edge normals from poly1. - - Index of the edge. - The poly1. - The XF1. - The poly2. - The XF2. - - - - - A distance proxy is used by the GJK algorithm. - It encapsulates any shape. - - - - - Initialize the proxy using the given shape. The shape - must remain in scope while the proxy is in use. - - The shape. - The index. - - - - Get the supporting vertex index in the given direction. - - The direction. - - - - - Get the supporting vertex in the given direction. - - The direction. - - - - - Used to warm start ComputeDistance. - Set count to zero on first call. - - - - - Length or area - - - - - Vertices on shape A - - - - - Vertices on shape B - - - - - Input for Distance.ComputeDistance(). - You have to option to use the shape radii in the computation. - - - - - Output for Distance.ComputeDistance(). - - - - - Number of GJK iterations used - - - - - Closest point on shapeA - - - - - Closest point on shapeB - - - - - Barycentric coordinate for closest point - - - - - wA index - - - - - wB index - - - - - wB - wA - - - - - Support point in proxyA - - - - - Support point in proxyB - - - - - The Gilbert–Johnson–Keerthi distance algorithm that provides the distance between shapes. - - - - - The number of calls made to the ComputeDistance() function. - Note: This is only activated when Settings.EnableDiagnostics = true - - - - - The number of iterations that was made on the last call to ComputeDistance(). - Note: This is only activated when Settings.EnableDiagnostics = true - - - - - The maximum numer of iterations ever mae with calls to the CompteDistance() funtion. - Note: This is only activated when Settings.EnableDiagnostics = true - - - - - A node in the dynamic tree. The client does not interact with this directly. - - - - - Enlarged AABB - - - - - A dynamic tree arranges data in a binary tree to accelerate - queries such as volume queries and ray casts. Leafs are proxies - with an AABB. In the tree we expand the proxy AABB by Settings.b2_fatAABBFactor - so that the proxy AABB is bigger than the client object. This allows the client - object to move by small amounts without triggering a tree update. - - Nodes are pooled and relocatable, so we use node indices rather than pointers. - - - - - Constructing the tree initializes the node pool. - - - - - Compute the height of the binary tree in O(N) time. Should not be called often. - - - - - Get the ratio of the sum of the node areas to the root area. - - - - - Get the maximum balance of an node in the tree. The balance is the difference - in height of the two children of a node. - - - - - Create a proxy in the tree as a leaf node. We return the index - of the node instead of a pointer so that we can grow - the node pool. - /// - The aabb. - The user data. - Index of the created proxy - - - - Destroy a proxy. This asserts if the id is invalid. - - The proxy id. - - - - Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, - then the proxy is removed from the tree and re-inserted. Otherwise - the function returns immediately. - - The proxy id. - The aabb. - The displacement. - true if the proxy was re-inserted. - - - - Get proxy user data. - - - The proxy id. - the proxy user data or 0 if the id is invalid. - - - - Get the fat AABB for a proxy. - - The proxy id. - The fat AABB. - - - - Query an AABB for overlapping proxies. The callback class - is called for each proxy that overlaps the supplied AABB. - - The callback. - The aabb. - - - - Ray-cast against the proxies in the tree. This relies on the callback - to perform a exact ray-cast in the case were the proxy contains a Shape. - The callback also performs the any collision filtering. This has performance - roughly equal to k * log(n), where k is the number of collisions and n is the - number of proxies in the tree. - - A callback class that is called for each proxy that is hit by the ray. - The ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). - - - - Perform a left or right rotation if node A is imbalanced. - - - the new root index. - - - - Compute the height of a sub-tree. - - The node id to use as parent. - The height of the tree. - - - - Compute the height of the entire tree. - - The height of the tree. - - - - Validate this tree. For testing. - - - - - Build an optimal tree. Very expensive. For testing. - - - - - Shift the origin of the nodes - - The displacement to use. - - - - The broad-phase is used for computing pairs and performing volume queries and ray casts. - This broad-phase does not persist pairs. Instead, this reports potentially new pairs. - It is up to the client to consume the new pairs and to track subsequent overlap. - - - - - Constructs a new broad phase based on the dynamic tree implementation - - - - - Get the number of proxies. - - The proxy count. - - - - Create a proxy with an initial AABB. Pairs are not reported until - UpdatePairs is called. - - The user data. - - - - - Destroy a proxy. It is up to the client to remove any pairs. - - The proxy id. - - - - This is called from DynamicTree.Query when we are gathering pairs. - - - - - - - Get the AABB for a proxy. - - The proxy id. - The aabb. - - - - Get user data from a proxy. Returns null if the id is invalid. - - The proxy id. - - - - - Test overlap of fat AABBs. - - The proxy id A. - The proxy id B. - - - - - Update the pairs. This results in pair callbacks. This can only add pairs. - - The callback. - - - - Query an AABB for overlapping proxies. The callback class - is called for each proxy that overlaps the supplied AABB. - - The callback. - The aabb. - - - - Ray-cast against the proxies in the tree. This relies on the callback - to perform a exact ray-cast in the case were the proxy contains a shape. - The callback also performs the any collision filtering. This has performance - roughly equal to k * log(n), where k is the number of collisions and n is the - number of proxies in the tree. - - A callback class that is called for each proxy that is hit by the ray. - The ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). - - - - Get the tree quality based on the area of the tree. - - - - - Gets the balance of the tree. - - - - - Gets the height of the tree. - - - - - A chain shape is a free form sequence of line segments. - The chain has two-sided collision, so you can use inside and outside collision. - Therefore, you may use any winding order. - Connectivity information is used to create smooth collisions. - WARNING: The chain will not collide properly if there are self-intersections. - - - - - The vertices. These are not owned/freed by the chain Shape. - - - - - Constructor for ChainShape. By default have 0 in density. - - - - - Create a new chainshape from the vertices. - - The vertices to use. Must contain 2 or more vertices. - Set to true to create a closed loop. It connects the first vertice to the last, and automatically adjusts connectivity to create smooth collisions along the chain. - - - - Establish connectivity to a vertex that precedes the first vertex. - Don't call this for loops. - - - - - Establish connectivity to a vertex that follows the last vertex. - Don't call this for loops. - - - - - This method has been optimized to reduce garbage. - - The cached edge to set properties on. - The index. - - - - Get a child edge. - - The index. - - - - Compare the chain to another chain - - The other chain - True if the two chain shapes are the same - - - - A circle shape. - - - - - Create a new circle with the desired radius and density. - - The radius of the circle. - The density of the circle. - - - - Get or set the position of the circle - - - - - Compare the circle to another circle - - The other circle - True if the two circles are the same size and have the same position - - - - A line segment (edge) shape. These can be connected in chains or loops - to other edge shapes. - The connectivity information is used to ensure correct contact normals. - - - - - Edge start vertex - - - - - Edge end vertex - - - - - Create a new EdgeShape with the specified start and end. - - The start of the edge. - The end of the edge. - - - - Is true if the edge is connected to an adjacent vertex before vertex 1. - - - - - Is true if the edge is connected to an adjacent vertex after vertex2. - - - - - Optional adjacent vertices. These are used for smooth collision. - - - - - Optional adjacent vertices. These are used for smooth collision. - - - - - These are the edge vertices - - - - - These are the edge vertices - - - - - Set this as an isolated edge. - - The start. - The end. - - - - Represents a simple non-selfintersecting convex polygon. - Create a convex hull from the given array of points. - - - - - Initializes a new instance of the class. - - The vertices. - The density. - - - - Create a new PolygonShape with the specified density. - - The density. - - - - Create a convex hull from the given array of local points. - The number of vertices must be in the range [3, Settings.MaxPolygonVertices]. - Warning: the points may be re-ordered, even if they form a convex polygon - Warning: collinear points are handled but not removed. Collinear points may lead to poor stacking behavior. - - - - - Given a transform, compute the associated axis aligned bounding box for a child shape. - - The aabb results. - The world transform of the shape. - The child shape index. - - - - This holds the mass data computed for a shape. - - - - - The area of the shape - - - - - The position of the shape's centroid relative to the shape's origin. - - - - - The rotational inertia of the shape about the local origin. - - - - - The mass of the shape, usually in kilograms. - - - - - The equal operator - - - - - - - - The not equal operator - - - - - - - - A shape is used for collision detection. You can create a shape however you like. - Shapes used for simulation in World are created automatically when a Fixture - is created. Shapes may encapsulate a one or more child shapes. - - - - - Contains the properties of the shape such as: - - Area of the shape - - Centroid - - Inertia - - Mass - - - - - Get the type of this shape. - - The type of the shape. - - - - Get the number of child primitives. - - - - - - Gets or sets the density. - Changing the density causes a recalculation of shape properties. - - The density. - - - - Radius of the Shape - Changing the radius causes a recalculation of shape properties. - - - - - Clone the concrete shape - - A clone of the shape - - - - Test a point for containment in this shape. - Note: This only works for convex shapes. - - The shape world transform. - A point in world coordinates. - True if the point is inside the shape - - - - Cast a ray against a child shape. - - The ray-cast results. - The ray-cast input parameters. - The transform to be applied to the shape. - The child shape index. - True if the ray-cast hits the shape - - - - Given a transform, compute the associated axis aligned bounding box for a child shape. - - The aabb results. - The world transform of the shape. - The child shape index. - - - - Compute the mass properties of this shape using its dimensions and density. - The inertia tensor is computed about the local origin, not the centroid. - - - - - Compare this shape to another shape based on type and properties. - - The other shape - True if the two shapes are the same. - - - - Used for the buoyancy controller - - - - - Input parameters for CalculateTimeOfImpact - - - - - Compute the upper bound on time before two shapes penetrate. Time is represented as - a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate, - non-tunneling collision. If you change the time interval, you should call this function - again. - Note: use Distance() to compute the contact point and normal at the time of impact. - - The output. - The input. - - - - Andrew's Monotone Chain Convex Hull algorithm. - Used to get the convex hull of a point cloud. - - Source: http://www.softsurfer.com/Archive/algorithm_0109/algorithm_0109.htm - - - - - Returns the convex hull from the given vertices.. - - - - - Giftwrap convex hull algorithm. - O(nh) time complexity, where n is the number of points and h is the number of points on the convex hull. - - See http://en.wikipedia.org/wiki/Gift_wrapping_algorithm for more details. - - - - - Returns the convex hull from the given vertices. - - The vertices. - - - - Creates a convex hull. - Note: - 1. Vertices must be of a simple polygon, i.e. edges do not overlap. - 2. Melkman does not work on point clouds - - - Implemented using Melkman's Convex Hull Algorithm - O(n) time complexity. - Reference: http://www.ams.sunysb.edu/~jsbm/courses/345/melkman.pdf - - - - - Returns a convex hull from the given vertices. - - A convex hull in counter clockwise winding order. - - - - Convex decomposition algorithm created by Mark Bayazit (http://mnbayazit.com/) - - Properties: - - Tries to decompose using polygons instead of triangles. - - Tends to produce optimal results with low processing time. - - Running time is O(nr), n = number of vertices, r = reflex vertices. - - Does not support holes. - - For more information about this algorithm, see http://mnbayazit.com/406/bayazit - - - - - Decompose the polygon into several smaller non-concave polygon. - If the polygon is already convex, it will return the original polygon, unless it is over Settings.MaxPolygonVertices. - - - - - 2D constrained Delaunay triangulation algorithm. - Based on the paper "Sweep-line algorithm for constrained Delaunay triangulation" by V. Domiter and and B. Zalik - - Properties: - - Creates triangles with a large interior angle. - - Supports holes - - Generate a lot of garbage due to incapsulation of the Poly2Tri library. - - Running time is O(n^2), n = number of vertices. - - Does not care about winding order. - - Source: http://code.google.com/p/poly2tri/ - - - - - Decompose the polygon into several smaller non-concave polygon. - - - - Neighbor pointers - Flags to determine if an edge is a Delauney edge - - - Flags to determine if an edge is a Constrained edge - - - Has this triangle been marked as an interior triangle? - - - - Update neighbor pointers - - Point 1 of the shared edge - Point 2 of the shared edge - This triangle's new neighbor - - - - Exhaustive search to update neighbor pointers - - - - Clears all references to all other triangles and points - - - Opposite triangle - The point in t that isn't shared between the triangles - - - - Legalize triangle by rotating clockwise around oPoint - - The origin point to rotate around - ??? - - - - Finalize edge marking - - - - - Mark edge as constrained - - - - - Get the index of the neighbor that shares this edge (or -1 if it isn't shared) - - index of the shared edge or -1 if edge isn't shared - - - @author Thomas Åhlen (thahlen@gmail.com) - - - - MM: This seems to be used by LocateNode to guess a position in the implicit linked list of AdvancingFrontNodes near x - Removed an overload that depended on this being exact - - - - - We use a balancing tree to locate a node smaller or equal to given key value - - - - - This implementation will use simple node traversal algorithm to find a point on the front - - - - - Triangulate simple polygon with holes - - - - - Start sweeping the Y-sorted point set from bottom to top - - - - - If this is a Delaunay Triangulation of a pointset we need to fill so the triangle mesh gets a ConvexHull - - - - - We will traverse the entire advancing front and fill it to form a convex hull. - - - - - Find closes node to the left of the new point and - create a new triangle. If needed new holes and basins - will be filled to. - - - - - Creates a new front triangle and legalize it - - - - - When we need to traverse from one triangle to the next we need - the point in current triangle that is the opposite point to the next - triangle. - - - - - After a flip we have two triangles and know that only one will still be - intersecting the edge. So decide which to contiune with and legalize the other - - - should be the result of an TriangulationUtil.orient2d( eq, op, ep ) - triangle 1 - triangle 2 - a point shared by both triangles - another point shared by both triangles - returns the triangle still intersecting the edge - - - - - Fills holes in the Advancing Front - - - - - Fills a basin that has formed on the Advancing Front to the right - of given node. - First we decide a left,bottom and right node that forms the - boundaries of the basin. Then we do a reqursive fill. - - - starting node, this or next node will be left node - - - - Recursive algorithm to fill a Basin with triangles - - - - - ??? - - middle node - the angle between 3 front nodes - - - - The basin angle is decided against the horizontal line [1,0] - - - - - Adds a triangle to the advancing front to fill a hole. - - - middle node, that is the bottom of the hole - - - - Returns true if triangle was legalized - - - - - Rotates a triangle pair one vertex CW - n2 n2 - P +-----+ P +-----+ - | t /| |\ t | - | / | | \ | - n1| / |n3 n1| \ |n3 - | / | after CW | \ | - |/ oT | | oT \| - +-----+ oP +-----+ - n4 n4 - - - - - Give two points in any order. Will always be ordered so - that q.y > p.y and q.x > p.x if same y value - - - - - @author Thomas Åhlén, thahlen@gmail.com - - - - - Try to map a node to all sides of this triangle that don't have - a neighbor. - - - - - Create a polygon from a list of at least 3 points with no duplicates. - - A list of unique points - - - - Create a polygon from a list of at least 3 points with no duplicates. - - A list of unique points. - - - - Creates constraints and populates the context with points - - The context - - - - Add a hole to the polygon. - - A subtraction polygon fully contained inside this polygon. - - - - Inserts newPoint after point. - - The point to insert after in the polygon - The point to insert into the polygon - - - - Inserts list (after last point in polygon?) - - - - - - Adds a point after the last in the polygon. - - The point to add - - - - Removes a point from the polygon. - - - - - - @param points - A list of all points in PointSet - @param constraints - Pairs of two points defining a constraint, all points must be part of given PointSet! - - - - @author Thomas Åhlén, thahlen@gmail.com - - - - Requirements: - 1. a,b and c form a triangle. - 2. a and d is know to be on opposite side of bc - - a - + - / \ - / \ - b/ \c - +-------+ - / B \ - / \ - - Facts: - d has to be in area B to have a chance to be inside the circle formed by a,b and c - d is outside B if orient2d(a,b,d) or orient2d(c,a,d) is CW - This preknowledge gives us a way to optimize the incircle test - - triangle point, opposite d - triangle point - triangle point - point opposite a - true if d is inside circle, false if on circle edge - - - Forumla to calculate signed area - Positive if CCW - Negative if CW - 0 if collinear - A[P1,P2,P3] = (x1*y2 - y1*x2) + (x2*y3 - y2*x3) + (x3*y1 - y3*x1) - = (x1-x3)*(y2-y3) - (y1-y3)*(x2-x3) - - - - Convex decomposition algorithm using ear clipping - - Properties: - - Only works on simple polygons. - - Does not support holes. - - Running time is O(n^2), n = number of vertices. - - Source: http://www.ewjordan.com/earClip/ - - - - - Decompose the polygon into several smaller non-concave polygon. - Each resulting polygon will have no more than Settings.MaxPolygonVertices vertices. - - The vertices. - The tolerance. - - - - Triangulates a polygon using simple ear-clipping algorithm. Returns - size of Triangle array unless the polygon can't be triangulated. - This should only happen if the polygon self-intersects, - though it will not _always_ return null for a bad polygon - it is the - caller's responsibility to check for self-intersection, and if it - doesn't, it should at least check that the return value is non-null - before using. You're warned! - - Triangles may be degenerate, especially if you have identical points - in the input to the algorithm. Check this before you use them. - - This is totally unoptimized, so for large polygons it should not be part - of the simulation loop. - - - Only works on simple polygons. - - - - - Finds and fixes "pinch points," points where two polygon - vertices are at the same point. - - If a pinch point is found, pin is broken up into poutA and poutB - and true is returned; otherwise, returns false. - - Mostly for internal use. - - O(N^2) time, which sucks... - - The pin. - The pout A. - The pout B. - - - - - Fix for obnoxious behavior for the % operator for negative numbers... - - The x. - The modulus. - - - - - Checks if vertex i is the tip of an ear in polygon defined by xv[] and yv[]. - - The i. - The xv. - The yv. - Length of the xv. - - Assumes clockwise orientation of polygon. - - - true if the specified i is ear; otherwise, false. - - - - - Convex decomposition algorithm created by unknown - - Properties: - - No support for holes - - Very fast - - Only works on simple polygons - - Only works on counter clockwise polygons - - More information: http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml - - - - - Decompose the polygon into triangles. - - Properties: - - Only works on counter clockwise polygons - - - The list of points describing the polygon - - - - Check if the point P is inside the triangle defined by - the points A, B, C - - The A point. - The B point. - The C point. - The point to be tested. - True if the point is inside the triangle - - - - Cut a the contour and add a triangle into V to describe the - location of the cut - - The list of points defining the polygon - The index of the first point - The index of the second point - The index of the third point - The number of elements in the array. - The array to populate with indicies of triangles. - True if a triangle was found - - - - Convex decomposition algorithm created by Raimund Seidel - - Properties: - - Decompose the polygon into trapezoids, then triangulate. - - To use the trapezoid data, use ConvexPartitionTrapezoid() - - Generate a lot of garbage due to incapsulation of the Poly2Tri library. - - Running time is O(n log n), n = number of vertices. - - Running time is almost linear for most simple polygons. - - Does not care about winding order. - - For more information, see Raimund Seidel's paper "A simple and fast incremental randomized - algorithm for computing trapezoidal decompositions and for triangulating polygons" - - See also: "Computational Geometry", 3rd edition, by Mark de Berg et al, Chapter 6.2 - "Computational Geometry in C", 2nd edition, by Joseph O'Rourke - - Original code from the Poly2Tri project by Mason Green. - http://code.google.com/p/poly2tri/source/browse?repo=archive#hg/scala/src/org/poly2tri/seidel - - This implementation is from Dec 14, 2010 - - - - - Decompose the polygon into several smaller non-concave polygons. - - The polygon to decompose. - The sheer to use if you get bad results, try using a higher value. - A list of triangles - - - - Decompose the polygon into several smaller non-concave polygons. - - The polygon to decompose. - The sheer to use if you get bad results, try using a higher value. - A list of trapezoids - - - - Convex decomposition algorithm using ear clipping - - Properties: - - Only works on simple polygons. - - Does not support holes. - - Running time is O(n^2), n = number of vertices. - - - - - Convex decomposition algorithm created by Mark Bayazit (http://mnbayazit.com/) - - Properties: - - Tries to decompose using polygons instead of triangles. - - Tends to produce optimal results with low processing time. - - Running time is O(nr), n = number of vertices, r = reflex vertices. - - Does not support holes. - - - - - Convex decomposition algorithm created by unknown - - Properties: - - No support for holes - - Very fast - - Only works on simple polygons - - Only works on counter clockwise polygons - - - - - Convex decomposition algorithm created by Raimund Seidel - - Properties: - - Decompose the polygon into trapezoids, then triangulate. - - To use the trapezoid data, use ConvexPartitionTrapezoid() - - Generate a lot of garbage due to incapsulation of the Poly2Tri library. - - Running time is O(n log n), n = number of vertices. - - Running time is almost linear for most simple polygons. - - Does not care about winding order. - - - - - 2D constrained Delaunay triangulation algorithm. - Based on the paper "Sweep-line algorithm for constrained Delaunay triangulation" by V. Domiter and and B. Zalik - - Properties: - - Creates triangles with a large interior angle. - - Supports holes - - Generate a lot of garbage due to incapsulation of the Poly2Tri library. - - Running time is O(n^2), n = number of vertices. - - Does not care about winding order. - - - - - Collection of helper methods for misc collisions. - Does float tolerance and line collisions with lines and AABBs. - - - - - Check if the lines a0->a1 and b0->b1 cross. - If they do, intersectionPoint will be filled - with the point of crossing. - - Grazing lines should not return true. - - - - - - This method detects if two line segments (or lines) intersect, - and, if so, the point of intersection. Use the and - parameters to set whether the intersection point - must be on the first and second line segments. Setting these - both to true means you are doing a line-segment to line-segment - intersection. Setting one of them to true means you are doing a - line to line-segment intersection test, and so on. - Note: If two line segments are coincident, then - no intersection is detected (there are actually - infinite intersection points). - Author: Jeremy Bell - - The first point of the first line segment. - The second point of the first line segment. - The first point of the second line segment. - The second point of the second line segment. - This is set to the intersection - point if an intersection is detected. - Set this to true to require that the - intersection point be on the first line segment. - Set this to true to require that the - intersection point be on the second line segment. - True if an intersection is detected, false otherwise. - - - - This method detects if two line segments (or lines) intersect, - and, if so, the point of intersection. Use the and - parameters to set whether the intersection point - must be on the first and second line segments. Setting these - both to true means you are doing a line-segment to line-segment - intersection. Setting one of them to true means you are doing a - line to line-segment intersection test, and so on. - Note: If two line segments are coincident, then - no intersection is detected (there are actually - infinite intersection points). - Author: Jeremy Bell - - The first point of the first line segment. - The second point of the first line segment. - The first point of the second line segment. - The second point of the second line segment. - This is set to the intersection - point if an intersection is detected. - Set this to true to require that the - intersection point be on the first line segment. - Set this to true to require that the - intersection point be on the second line segment. - True if an intersection is detected, false otherwise. - - - - This method detects if two line segments intersect, - and, if so, the point of intersection. - Note: If two line segments are coincident, then - no intersection is detected (there are actually - infinite intersection points). - - The first point of the first line segment. - The second point of the first line segment. - The first point of the second line segment. - The second point of the second line segment. - This is set to the intersection - point if an intersection is detected. - True if an intersection is detected, false otherwise. - - - - This method detects if two line segments intersect, - and, if so, the point of intersection. - Note: If two line segments are coincident, then - no intersection is detected (there are actually - infinite intersection points). - - The first point of the first line segment. - The second point of the first line segment. - The first point of the second line segment. - The second point of the second line segment. - This is set to the intersection - point if an intersection is detected. - True if an intersection is detected, false otherwise. - - - - Get all intersections between a line segment and a list of vertices - representing a polygon. The vertices reuse adjacent points, so for example - edges one and two are between the first and second vertices and between the - second and third vertices. The last edge is between vertex vertices.Count - 1 - and verts0. (ie, vertices from a Geometry or AABB) - - The first point of the line segment to test - The second point of the line segment to test. - The vertices, as described above - - - - Get all intersections between a line segment and an AABB. - - The first point of the line segment to test - The second point of the line segment to test. - The AABB that is used for testing intersection. - - - Perform the cross product on two vectors. - - - Multiply a matrix times a vector. - - - Multiply a matrix times a vector. - - - Multiply two rotations: q * r - - - Transpose multiply two rotations: qT * r - - - Rotate a vector - - - Inverse rotate a vector - - - Get the skew vector such that dot(skew_vec, other) == cross(vec, other) - - - - This function is used to ensure that a floating point number is - not a NaN or infinity. - - The x. - - true if the specified x is valid; otherwise, false. - - - - - This is a approximate yet fast inverse square-root. - - The x. - - - - - Return the angle between two vectors on a plane - The angle is from vector 1 to vector 2, positive anticlockwise - The result is between -pi -> pi - - - - Perform the dot product on two vectors. - - - - Returns a positive number if c is to the left of the line going from a to b. - - Positive number if point is left, negative if point is right, - and 0 if points are collinear. - - - - Returns a positive number if c is to the left of the line going from a to b. - - Positive number if point is left, negative if point is right, - and 0 if points are collinear. - - - - Determines if three vertices are collinear (ie. on a straight line) - - First vertex - Second vertex - Third vertex - The tolerance - - - - - Checks if a floating point Value is equal to another, - within a certain tolerance. - - The first floating point Value. - The second floating point Value. - The floating point tolerance. - True if the values are "equal", false otherwise. - - - - Checks if a floating point Value is within a specified - range of values (inclusive). - - The Value to check. - The minimum Value. - The maximum Value. - True if the Value is within the range specified, - false otherwise. - - - - A 2-by-2 matrix. Stored in column-major order. - - - - - Construct this matrix using columns. - - The c1. - The c2. - - - - Construct this matrix using scalars. - - The a11. - The a12. - The a21. - The a22. - - - - Initialize this matrix using columns. - - The c1. - The c2. - - - - Set this to the identity matrix. - - - - - Set this matrix to all zeros. - - - - - Solve A * x = b, where b is a column vector. This is more efficient - than computing the inverse in one-shot cases. - - The b. - - - - - A 3-by-3 matrix. Stored in column-major order. - - - - - Construct this matrix using columns. - - The c1. - The c2. - The c3. - - - - Set this matrix to all zeros. - - - - - Solve A * x = b, where b is a column vector. This is more efficient - than computing the inverse in one-shot cases. - - The b. - - - - - Solve A * x = b, where b is a column vector. This is more efficient - than computing the inverse in one-shot cases. Solve only the upper - 2-by-2 matrix equation. - - The b. - - - - Get the inverse of this matrix as a 2-by-2. - Returns the zero matrix if singular. - - - Get the symmetric inverse of this matrix as a 3-by-3. - Returns the zero matrix if singular. - - - Get the inverse of this matrix as a 2-by-2. - Returns the zero matrix if singular. - - - Rotation - - - Initialize from an angle in radians - - - Set using an angle in radians. - - - Set to the identity rotation - - - Get the angle in radians - - - Get the x-axis - - - Get the u-axis - - - Sine and cosine - - - Sine and cosine - - - - A transform contains translation and rotation. It is used to represent - the position and orientation of rigid frames. - - - - - Initialize using a position vector and a rotation matrix. - - The position. - The r. - - - - Set this to the identity transform. - - - - - Set this based on the position and angle. - - The position. - The angle. - - - - This describes the motion of a body/shape for TOI computation. - Shapes are defined with respect to the body origin, which may - no coincide with the center of mass. However, to support dynamics - we must interpolate the center of mass position. - - - - - World angles - - - - - Fraction of the current time step in the range [0,1] - c0 and a0 are the positions at alpha0. - - - - - Center world positions - - - - - Local center of mass position - - - - - Get the interpolated transform at a specific time. - - The transform. - beta is a factor in [0,1], where 0 indicates alpha0. - - - - Advance the sweep forward, yielding a new initial state. - - new initial time.. - - - - Normalize the angles. - - - - - Path: - Very similar to Vertices, but this - class contains vectors describing - control points on a Catmull-Rom - curve. - - - - - All the points that makes up the curve - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The vertices to created the path from. - - - - Initializes a new instance of the class. - - The vertices to created the path from. - - - - True if the curve is closed. - - true if closed; otherwise, false. - - - - Gets the next index of a controlpoint - - The index. - - - - - Gets the previous index of a controlpoint - - The index. - - - - - Translates the control points by the specified vector. - - The vector. - - - - Scales the control points by the specified vector. - - The Value. - - - - Rotate the control points by the defined value in radians. - - The amount to rotate by in radians. - - - - Returns a set of points defining the - curve with the specifed number of divisions - between each control point. - - Number of divisions between each control point. - - - - - Gets the normal for the given time. - - The time - The normal. - - - - An easy to use manager for creating paths. - - - - - Convert a path into a set of edges and attaches them to the specified body. - Note: use only for static edges. - - The path. - The body. - The subdivisions. - - - - Convert a closed path into a polygon. - Convex decomposition is automatically performed. - - The path. - The body. - The density. - The subdivisions. - - - - Duplicates the given Body along the given path for approximatly the given copies. - - The world. - The path. - The shapes. - The type. - The copies. - - - - - - Duplicates the given Body along the given path for approximatly the given copies. - - The world. - The path. - The shape. - The type. - The copies. - The user data. - - - - - Moves the given body along the defined path. - - The path. - The body. - The time. - The strength. - The time step. - - - - Attaches the bodies with revolute joints. - - The world. - The bodies. - The local anchor A. - The local anchor B. - if set to true [connect first and last]. - if set to true [collide connected]. - - - - Contains filter data that can determine whether an object should be processed or not. - - - - - Disable the logic on specific categories. - Category.None by default. - - - - - Disable the logic on specific groups - - - - - Enable the logic on specific categories - Category.All by default. - - - - - Enable the logic on specific groups. - - - - - - - - - - - - Adds the category. - - The category. - - - - Removes the category. - - The category. - - - - Determines whether this body ignores the the specified controller. - - The category. - - true if the object has the specified category; otherwise, false. - - - - - Adds the category. - - The category. - - - - Removes the category. - - The category. - - - - Determines whether this body ignores the the specified controller. - - The category. - - true if the object has the specified category; otherwise, false. - - - - - Ignores the controller. The controller has no effect on this body. - - The logic type. - - - - Restore the controller. The controller affects this body. - - The logic type. - - - - Determines whether this body ignores the the specified controller. - - The logic type. - - true if the body has the specified flag; otherwise, false. - - - - - This is a comprarer used for - detecting angle difference between rays - - - - - Creates a realistic explosion based on raycasting. Objects in the open will be affected, but objects behind - static bodies will not. A body that is half in cover, half in the open will get half the force applied to the end in - the open. - - - - - Two degrees: maximum angle from edges to first ray tested - - - - - Ratio of arc length to angle from edges to first ray tested. - Defaults to 1/40. - - - - - Ignore Explosion if it happens inside a shape. - Default value is false. - - - - - Max angle between rays (used when segment is large). - Defaults to 15 degrees - - - - - Maximum number of shapes involved in the explosion. - Defaults to 100 - - - - - How many rays per shape/body/segment. - Defaults to 5 - - - - - Activate the explosion at the specified position. - - The position where the explosion happens - The explosion radius - The explosion force at the explosion point (then is inversely proportional to the square of the distance) - A list of bodies and the amount of force that was applied to them. - - - - Creates a simple explosion that ignores other bodies hiding behind static bodies. - - - - - This is the power used in the power function. A value of 1 means the force - applied to bodies in the explosion is linear. A value of 2 means it is exponential. - - - - - Activate the explosion at the specified position. - - The position (center) of the explosion. - The radius of the explosion. - The force applied - A maximum amount of force. When force gets over this value, it will be equal to maxForce - A list of bodies and the amount of force that was applied to them. - - - - Split a fixture into 2 vertice collections using the given entry and exit-point. - - The Fixture to split - The entry point - The start point - The exit point - The end point - The first collection of vertexes - The second collection of vertexes - - - - This is a high-level function to cuts fixtures inside the given world, using the start and end points. - Note: We don't support cutting when the start or end is inside a shape. - - The world. - The startpoint. - The endpoint. - True if the cut was performed. - - - - Combines a list of triangles into a list of convex polygons. - Starts with a seed triangle, keep adding triangles to it until you can't add any more without making the polygon non-convex. - - - - - Combine a list of triangles into a list of convex polygons. - - Note: This only works on triangles. - - The triangles. - The maximun number of polygons to return. - The tolerance - - - - Provides a set of tools to simplify polygons in various ways. - - - - - Removes all collinear points on the polygon. - - The polygon that needs simplification. - The collinearity tolerance. - A simplified polygon. - - - - Ramer-Douglas-Peucker polygon simplification algorithm. This is the general recursive version that does not use the - speed-up technique by using the Melkman convex hull. - - If you pass in 0, it will remove all collinear points. - - The simplified polygon - - - - Merges all parallel edges in the list of vertices - - The vertices. - The tolerance. - - - - Merges the identical points in the polygon. - - The vertices. - - - - Reduces the polygon by distance. - - The vertices. - The distance between points. Points closer than this will be removed. - - - - Reduces the polygon by removing the Nth vertex in the vertices list. - - The vertices. - The Nth point to remove. Example: 5. - - - - - Simplify the polygon by removing all points that in pairs of 3 have an area less than the tolerance. - - Pass in 0 as tolerance, and it will only remove collinear points. - - - - - - - - Implements "A new algorithm for Boolean operations on general polygons" - available here: http://liama.ia.ac.cn/wiki/_media/user:dong:dong_cg_05.pdf - Merges two polygons, a subject and a clip with the specified operation. Polygons may not be - self-intersecting. - - Warning: May yield incorrect results or even crash if polygons contain collinear points. - - The subject polygon. - The clip polygon, which is added, - substracted or intersected with the subject - The operation to be performed. Either - Union, Difference or Intersection. - The error generated (if any) - A list of closed polygons, which make up the result of the clipping operation. - Outer contours are ordered counter clockwise, holes are ordered clockwise. - - - - Calculates all intersections between two polygons. - - The first polygon. - The second polygon. - Returns the first polygon with added intersection points. - Returns the second polygon with added intersection points. - - - - Calculates the simplical chain corresponding to the input polygon. - - Used by method Execute(). - - - - Calculates the characteristics function for all edges of - the given simplical chains and builds the result chain. - - Used by method Execute(). - - - - Calculates the polygon(s) from the result simplical chain. - - Used by method Execute(). - - - - Needed to calculate the characteristics function of a simplex. - - Used by method CalculateEdgeCharacter(). - - - - Needed for sorting multiple intersections points on the same edge. - - Used by method CalculateIntersections(). - - - - Returns the coefficient of a simplex. - - Used by method CalculateSimplicalChain(). - - - - Winding number test for a point in a simplex. - - The point to be tested. - The edge that the point is tested against. - False if the winding number is even and the point is outside - the simplex and True otherwise. - - - - Tests if a point lies on a line segment. - - Used by method CalculateBeta(). - - - Specifies an Edge. Edges are used to represent simplicies in simplical chains - - - - Build vertices to represent an axis-aligned box. - - the half-width. - the half-height. - - - - Build vertices to represent an oriented box. - - the half-width. - the half-height. - the center of the box in local coordinates. - the rotation of the box in local coordinates. - - - - Creates a rounded rectangle with the specified width and height. - - The width. - The height. - The rounding X radius. - The rounding Y radius. - The number of segments to subdivide the edges. - - - - - Set this as a single edge. - - The first point. - The second point. - - - - Creates a circle with the specified radius and number of edges. - - The radius. - The number of edges. The more edges, the more it resembles a circle - - - - - Creates a ellipse with the specified width, height and number of edges. - - Width of the ellipse. - Height of the ellipse. - The number of edges. The more edges, the more it resembles an ellipse - - - - - Creates an capsule with the specified height, radius and number of edges. - A capsule has the same form as a pill capsule. - - Height (inner height + 2 * radius) of the capsule. - Radius of the capsule ends. - The number of edges of the capsule ends. The more edges, the more it resembles an capsule - - - - - Creates an capsule with the specified height, radius and number of edges. - A capsule has the same form as a pill capsule. - - Height (inner height + radii) of the capsule. - Radius of the top. - The number of edges of the top. The more edges, the more it resembles an capsule - Radius of bottom. - The number of edges of the bottom. The more edges, the more it resembles an capsule - - - - - Creates a gear shape with the specified radius and number of teeth. - - The radius. - The number of teeth. - The tip percentage. - Height of the tooth. - - - - - Detects the vertices by analyzing the texture data. - - The texture data. - The texture width. - - - - - Detects the vertices by analyzing the texture data. - - The texture data. - The texture width. - if set to true it will perform hole detection. - - - - - Detects the vertices by analyzing the texture data. - - The texture data. - The texture width. - The hull tolerance. - The alpha tolerance. - if set to true it will perform multi part detection. - if set to true it will perform hole detection. - - - - - Serialize the world into an XML file - - - - - An emulation for the Stopwatch class for Windows Phone and Silverlight. - - - - - Creates a new instance of the class and starts the watch immediately. - - An instance of Stopwatch, running. - - - - Creates an instance of the Stopwatch class. - - - - - Completely resets and deactivates the timer. - - - - - Begins the timer. - - - - - Stops the current timer. - - - - - Gets a value indicating whether the instance is currently recording. - - - - - Gets the Elapsed time as a Timespan. - - - - - Gets the Elapsed time as the total number of milliseconds. - - - - - Gets the Elapsed time as the total number of ticks (which is faked - as Silverlight doesn't have a way to get at the actual "Ticks") - - - - - Marching squares over the given domain using the mesh defined via the dimensions - (wid,hei) to build a set of polygons such that f(x,y) less than 0, using the given number - 'bin' for recursive linear inteprolation along cell boundaries. - - if 'comb' is true, then the polygons will also be composited into larger possible concave - polygons. - - - - - - - - - - - Linearly interpolate between (x0 to x1) given a value at these coordinates (v0 and v1) - such as to approximate value(return) = 0 - * - - - Recursive linear interpolation for use in marching squares * - - - Recursive linear interpolation for use in marching squares * - - - Square value for use in marching squares * - - - Look-up table to relate polygon key with the vertices that should be used for - the sub polygon in marching squares - * - Perform a single celled marching square for for the given cell defined by (x0,y0) (x1,y1) - using the function f for recursive interpolation, given the look-up table 'fs' of - the values of 'f' at cell vertices with the result to be stored in 'poly' given the actual - coordinates of 'ax' 'ay' in the marching squares mesh. - * - - - Used in polygon composition to composit polygons into scan lines - Combining polya and polyb into one super-polygon stored in polya. - * - - - - Designed as a complete port of CxFastList from CxStd. - - - - - Iterator to start of list (O(1)) - - - - - Iterator to end of list (O(1)) - - - - - Returns first element of list (O(1)) - - - - - add object to list (O(1)) - - - - - remove object from list, returns true if an element was removed (O(n)) - - - - - pop element from head of list (O(1)) Note: this does not return the object popped! - There is good reason to this, and it regards the Alloc list variants which guarantee - objects are released to the object pool. You do not want to retrieve an element - through pop or else that object may suddenly be used by another piece of code which - retrieves it from the object pool. - - - - - insert object after 'node' returning an iterator to the inserted object. - - - - - removes the element pointed to by 'node' with 'prev' being the previous iterator, - returning an iterator to the element following that of 'node' (O(1)) - - - - - whether the list is empty (O(1)) - - - - - computes size of list (O(n)) - - - - - empty the list (O(1) if CxMixList, O(n) otherwise) - - - - - returns true if 'value' is an element of the list (O(n)) - - - - Associated polygon at coordinate * - Key of original sub-polygon * - - - - Simple class to maintain a terrain. It can keep track - - - - - World to manage terrain in. - - - - - Center of terrain in world units. - - - - - Width of terrain in world units. - - - - - Height of terrain in world units. - - - - - Points per each world unit used to define the terrain in the point cloud. - - - - - Points per cell. - - - - - Points per sub cell. - - - - - Number of iterations to perform in the Marching Squares algorithm. - Note: More then 3 has almost no effect on quality. - - - - - Decomposer to use when regenerating terrain. Can be changed on the fly without consequence. - Note: Some decomposerers are unstable. - - - - - Point cloud defining the terrain. - - - - - Generated bodies. - - - - - Creates a new terrain. - - The World - The area of the terrain. - - - - Creates a new terrain - - The World - The position (center) of the terrain. - The width of the terrain. - The height of the terrain. - - - - Initialize the terrain for use. - - - - - Apply the specified texture data to the terrain. - - - - - - - Modify a single point in the terrain. - - World location to modify. Automatically clipped. - -1 = inside terrain, 1 = outside terrain - - - - Regenerate the terrain. - - - - - The detection type affects the resulting polygon data. - - - - - Holes are integrated into the main polygon. - - - - - The data of the main polygon and hole polygons is returned separately. - - - - - This array is ment to be readonly. - It's not because it is accessed very frequently. - - - - - Get or set the polygon detection type. - - - - - Will detect texture 'holes' if set to true. Slows down the detection. Default is false. - - - - - Will detect texture multiple 'solid' isles if set to true. Slows down the detection. Default is false. - - - - - Will optimize the vertex positions along the interpolated normal between two edges about a half pixel (post processing). Default is false. - - - - - Can be used for scaling. - - - - - Alpha (coverage) tolerance. Default is 20: Every pixel with a coverage value equal or greater to 20 will be counts as solid. - - - - - Default is 1.5f. - - - - - Detects the vertices of the supplied texture data. (PolygonDetectionType.Integrated) - - The texture data. - The texture width. - - - - - Detects the vertices of the supplied texture data. - - The texture data. - The texture width. - if set to true it will perform hole detection. - - - - - Detects the vertices of the supplied texture data. - - The texture data. - The texture width. - if set to true it will perform hole detection. - The hull tolerance. - The alpha tolerance. - if set to true it will perform multi part detection. - - - - - Function to search for an entrance point of a hole in a polygon. It searches the polygon from top to bottom between the polygon edges. - - The polygon to search in. - The last entrance point. - The next holes entrance point. Null if ther are no holes. - - - - Searches the polygon for the x coordinates of the edges that cross the specified y coordinate. - - Polygon to search in. - Y coordinate to check for edges. - Descending sorted list of x coordinates of edges that cross the specified y coordinate. - - - - - - - - - - - - Searches for the next shape. - - Already detected polygons. - Search start coordinate. - Returns the found entrance coordinate. Null if no other shapes found. - True if a new shape was found. - - - - There were no errors in the polygon - - - - - Polygon must have between 3 and Settings.MaxPolygonVertices vertices. - - - - - Polygon must be simple. This means no overlapping edges. - - - - - Polygon must have a counter clockwise winding. - - - - - The polygon is concave, it needs to be convex. - - - - - Polygon area is too small. - - - - - The polygon has a side that is too short. - - - - - You can add holes to this collection. - It will get respected by some of the triangulation algoithms, but otherwise not used. - - - - - Gets the next index. Used for iterating all the edges with wrap-around. - - The current index - - - - Gets the next vertex. Used for iterating all the edges with wrap-around. - - The current index - - - - Gets the previous index. Used for iterating all the edges with wrap-around. - - The current index - - - - Gets the previous vertex. Used for iterating all the edges with wrap-around. - - The current index - - - - Gets the signed area. - If the area is less than 0, it indicates that the polygon is clockwise winded. - - The signed area - - - - Gets the area. - - - - - - Gets the centroid. - - - - - - Returns an AABB that fully contains this polygon. - - - - - Translates the vertices with the specified vector. - - The value. - - - - Translates the vertices with the specified vector. - - The vector. - - - - Scales the vertices with the specified vector. - - The Value. - - - - Scales the vertices with the specified vector. - - The Value. - - - - Rotate the vertices with the defined value in radians. - - Warning: Using this method on an active set of vertices of a Body, - will cause problems with collisions. Use Body.Rotation instead. - - The amount to rotate by in radians. - - - - Determines whether the polygon is convex. - O(n^2) running time. - - Assumptions: - - The polygon is in counter clockwise order - - The polygon has no overlapping edges - - - true if it is convex; otherwise, false. - - - - - Indicates if the vertices are in counter clockwise order. - Warning: If the area of the polygon is 0, it is unable to determine the winding. - - - - - Forces the vertices to be counter clock wise order. - - - - - Checks if the vertices forms an simple polygon by checking for edge crossings. - - - - - Checks if the polygon is valid for use in the engine. - - Performs a full check, for simplicity, convexity, - orientation, minimum angle, and volume. - - From Eric Jordan's convex decomposition library - - PolygonError.NoError if there were no error. - - - - Projects to axis. - - The axis. - The min. - The max. - - - - Winding number test for a point in a polygon. - - See more info about the algorithm here: http://softsurfer.com/Archive/algorithm_0103/algorithm_0103.htm - The point to be tested. - -1 if the winding number is zero and the point is outside - the polygon, 1 if the point is inside the polygon, and 0 if the point - is on the polygons edge. - - - - Compute the sum of the angles made between the test point and each pair of points making up the polygon. - If this sum is 2pi then the point is an interior point, if 0 then the point is an exterior point. - ref: http://ozviz.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/ - Solution 2 - - - - - Transforms the polygon using the defined matrix. - - The matrix to use as transformation. - - - - Modes for Decay. Actual Decay must be implemented in inheriting - classes - - - - - Forcetypes are used in the decay math to properly get the distance. - They are also used to draw a representation in DebugView - - - - - Timing Modes - Switched: Standard on/off mode using the baseclass enabled property - Triggered: When the Trigger() method is called the force is active - for a specified Impulse Length - Curve: Still to be defined. The basic idea is having a Trigger - combined with a curve for the strength - - - - - Curve to be used for Decay in Curve mode - - - - - The Forcetype of the instance - - - - - Provided for reuse to provide Variation functionality in - inheriting classes - - - - - Curve used by Curve Mode as an animated multiplier for the force - strength. - Only positions between 0 and 1 are considered as that range is - stretched to have ImpulseLength. - - - - - Constructor - - - - - Overloaded Contstructor with supplying Timing Mode - - - - - - Global Strength of the force to be applied - - - - - Position of the Force. Can be ignored (left at (0,0) for forces - that are not position-dependent - - - - - Maximum speed of the bodies. Bodies that are travelling faster are - supposed to be ignored - - - - - Maximum Force to be applied. As opposed to Maximum Speed this is - independent of the velocity of - the affected body - - - - - Timing Mode of the force instance - - - - - Time of the current impulse. Incremented in update till - ImpulseLength is reached - - - - - Length of a triggered impulse. Used in both Triggered and Curve Mode - - - - - Indicating if we are currently during an Impulse - (Triggered and Curve Mode) - - - - - Variation of the force applied to each body affected - !! Must be used in inheriting classes properly !! - - - - - See DecayModes - - - - - Start of the distance based Decay. To set a non decaying area - - - - - Maximum distance a force should be applied - - - - - Calculate the Decay for a given body. Meant to ease force - development and stick to the DRY principle and provide unified and - predictable decay math. - - The body to calculate decay for - A multiplier to multiply the force with to add decay - support in inheriting classes - - - - Triggers the trigger modes (Trigger and Curve) - - - - - Inherited from Controller - Depending on the TimingMode perform timing logic and call ApplyForce() - - - - - - Apply the force supplying strength (wich is modified in Update() - according to the TimingMode - - - The strength - - - - Controls the rotational drag that the fluid exerts on the bodies within it. Use higher values will simulate thick fluid, like honey, lower values to - simulate water-like fluids. - - - - - Density of the fluid. Higher values will make things more buoyant, lower values will cause things to sink. - - - - - Controls the linear drag that the fluid exerts on the bodies within it. Use higher values will simulate thick fluid, like honey, lower values to - simulate water-like fluids. - - - - - Acts like waterflow. Defaults to 0,0. - - - - - Initializes a new instance of the class. - - Only bodies inside this AABB will be influenced by the controller - Density of the fluid - Linear drag coefficient of the fluid - Rotational drag coefficient of the fluid - The direction gravity acts. Buoyancy force will act in opposite direction of gravity. - - - - Ignores the controller. The controller has no effect on this body. - - The controller type. - - - - Restore the controller. The controller affects this body. - - The controller type. - - - - Determines whether this body ignores the the specified controller. - - The controller type. - - true if the body has the specified flag; otherwise, false. - - - - - Reference implementation for forces based on AbstractForceController - It supports all features provided by the base class and illustrates proper - usage as an easy to understand example. - As a side-effect it is a nice and easy to use wind force for your projects - - - - - Direction of the windforce - - - - - The amount of Direction randomization. Allowed range is 0-1. - - - - - Ignore the position and apply the force. If off only in the "front" (relative to position and direction) - will be affected - - - - - Put a limit on the linear (translation - the movespeed) and angular (rotation) velocity - of bodies added to this controller. - - - - - Initializes a new instance of the class. - Sets the max linear velocity to Settings.MaxTranslation - Sets the max angular velocity to Settings.MaxRotation - - - - - Initializes a new instance of the class. - Pass in 0 or float.MaxValue to disable the limit. - maxAngularVelocity = 0 will disable the angular velocity limit. - - The max linear velocity. - The max angular velocity. - - - - Gets or sets the max angular velocity. - - The max angular velocity. - - - - Gets or sets the max linear velocity. - - The max linear velocity. - - - - Convert units between display and simulation units. - - - - - Draw shapes. - - - - - Draw joint connections. - - - - - Draw axis aligned bounding boxes. - - - - - Draw center of mass frame. - - - - - Draw useful debug data such as timings and number of bodies, joints, contacts and more. - - - - - Draw contact points between colliding bodies. - - - - - Draw contact normals. Need ContactPoints to be enabled first. - - - - - Draws the vertices of polygons. - - - - - Draws the performance graph. - - - - - Draws controllers. - - - - Implement and register this class with a World to provide debug drawing of physics - entities in your game. - - - - Gets or sets the debug view flags. - - The flags. - - - - Append flags to the current flags. - - The flags. - - - - Remove flags from the current flags. - - The flags. - - - - Draw a closed polygon provided in CCW order. - - The vertices. - The vertex count. - The red value. - The blue value. - The green value. - - - - Draw a solid closed polygon provided in CCW order. - - The vertices. - The vertex count. - The red value. - The blue value. - The green value. - - - - Draw a circle. - - The center. - The radius. - The red value. - The blue value. - The green value. - - - - Draw a solid circle. - - The center. - The radius. - The axis. - The red value. - The blue value. - The green value. - - - - Draw a line segment. - - The start. - The end. - The red value. - The blue value. - The green value. - - - - Draw a transform. Choose your own length scale. - - The transform. - - - - The body type. - - - - - Zero velocity, may be manually moved. Note: even static bodies have mass. - - - - - Zero mass, non-zero velocity set by user, moved by solver - - - - - Positive mass, non-zero velocity determined by forces, moved by solver - - - - Scale the gravity applied to this body. - - - - Set the user data. Use this to store your application specific data. - - The user data. - - - - Gets the total number revolutions the body has made. - - The revolutions. - - - - Gets or sets the body type. - Warning: Calling this mid-update might cause a crash. - - The type of body. - - - - Get or sets the linear velocity of the center of mass. - - The linear velocity. - - - - Gets or sets the angular velocity. Radians/second. - - The angular velocity. - - - - Gets or sets the linear damping. - - The linear damping. - - - - Gets or sets the angular damping. - - The angular damping. - - - - Gets or sets a value indicating whether this body should be included in the CCD solver. - - true if this instance is included in CCD; otherwise, false. - - - - You can disable sleeping on this body. If you disable sleeping, the - body will be woken. - - true if sleeping is allowed; otherwise, false. - - - - Set the sleep state of the body. A sleeping body has very - low CPU cost. - - true if awake; otherwise, false. - - - - Set the active state of the body. An inactive body is not - simulated and cannot be collided with or woken up. - If you pass a flag of true, all fixtures will be added to the - broad-phase. - If you pass a flag of false, all fixtures will be removed from - the broad-phase and all contacts will be destroyed. - Fixtures and joints are otherwise unaffected. You may continue - to create/destroy fixtures and joints on inactive bodies. - Fixtures on an inactive body are implicitly inactive and will - not participate in collisions, ray-casts, or queries. - Joints connected to an inactive body are implicitly inactive. - An inactive body is still owned by a b2World object and remains - in the body list. - - true if active; otherwise, false. - - - - Set this body to have fixed rotation. This causes the mass - to be reset. - - true if it has fixed rotation; otherwise, false. - - - - Gets all the fixtures attached to this body. - - The fixture list. - - - - Get the list of all joints attached to this body. - - The joint list. - - - - Get the list of all contacts attached to this body. - Warning: this list changes during the time step and you may - miss some collisions if you don't use ContactListener. - - The contact list. - - - - Get the world body origin position. - - Return the world position of the body's origin. - - - - Get the angle in radians. - - Return the current world rotation angle in radians. - - - - Gets or sets a value indicating whether this body is static. - - true if this instance is static; otherwise, false. - - - - Gets or sets a value indicating whether this body is kinematic. - - true if this instance is kinematic; otherwise, false. - - - - Gets or sets a value indicating whether this body ignores gravity. - - true if it ignores gravity; otherwise, false. - - - - Get the world position of the center of mass. - - The world position. - - - - Get the local position of the center of mass. - - The local position. - - - - Gets or sets the mass. Usually in kilograms (kg). - - The mass. - - - - Get or set the rotational inertia of the body about the local origin. usually in kg-m^2. - - The inertia. - - - - Body objects can define which categories of bodies they wish to ignore CCD with. - This allows certain bodies to be configured to ignore CCD with objects that - aren't a penetration problem due to the way content has been prepared. - This is compared against the other Body's fixture CollisionCategories within World.SolveTOI(). - - - - - Resets the dynamics of this body. - Sets torque, force and linear/angular velocity to 0 - - - - - Creates a fixture and attach it to this body. - If the density is non-zero, this function automatically updates the mass of the body. - Contacts are not created until the next time step. - Warning: This function is locked during callbacks. - - The shape. - Application specific data - - - - - Destroy a fixture. This removes the fixture from the broad-phase and - destroys all contacts associated with this fixture. This will - automatically adjust the mass of the body if the body is dynamic and the - fixture has positive density. - All fixtures attached to a body are implicitly destroyed when the body is destroyed. - Warning: This function is locked during callbacks. - - The fixture to be removed. - - - - Set the position of the body's origin and rotation. - This breaks any contacts and wakes the other bodies. - Manipulating a body's transform may cause non-physical behavior. - - The world position of the body's local origin. - The world rotation in radians. - - - - Set the position of the body's origin and rotation. - This breaks any contacts and wakes the other bodies. - Manipulating a body's transform may cause non-physical behavior. - - The world position of the body's local origin. - The world rotation in radians. - - - - For teleporting a body without considering new contacts immediately. - - The position. - The angle. - - - - Get the body transform for the body's origin. - - The transform of the body's origin. - - - - Apply a force at a world point. If the force is not - applied at the center of mass, it will generate a torque and - affect the angular velocity. This wakes up the body. - - The world force vector, usually in Newtons (N). - The world position of the point of application. - - - - Applies a force at the center of mass. - - The force. - - - - Applies a force at the center of mass. - - The force. - - - - Apply a force at a world point. If the force is not - applied at the center of mass, it will generate a torque and - affect the angular velocity. This wakes up the body. - - The world force vector, usually in Newtons (N). - The world position of the point of application. - - - - Apply a torque. This affects the angular velocity - without affecting the linear velocity of the center of mass. - This wakes up the body. - - The torque about the z-axis (out of the screen), usually in N-m. - - - - Apply an impulse at a point. This immediately modifies the velocity. - This wakes up the body. - - The world impulse vector, usually in N-seconds or kg-m/s. - - - - Apply an impulse at a point. This immediately modifies the velocity. - It also modifies the angular velocity if the point of application - is not at the center of mass. - This wakes up the body. - - The world impulse vector, usually in N-seconds or kg-m/s. - The world position of the point of application. - - - - Apply an impulse at a point. This immediately modifies the velocity. - This wakes up the body. - - The world impulse vector, usually in N-seconds or kg-m/s. - - - - Apply an impulse at a point. This immediately modifies the velocity. - It also modifies the angular velocity if the point of application - is not at the center of mass. - This wakes up the body. - - The world impulse vector, usually in N-seconds or kg-m/s. - The world position of the point of application. - - - - Apply an angular impulse. - - The angular impulse in units of kg*m*m/s. - - - - This resets the mass properties to the sum of the mass properties of the fixtures. - This normally does not need to be called unless you called SetMassData to override - the mass and you later want to reset the mass. - - - - - Get the world coordinates of a point given the local coordinates. - - A point on the body measured relative the the body's origin. - The same point expressed in world coordinates. - - - - Get the world coordinates of a point given the local coordinates. - - A point on the body measured relative the the body's origin. - The same point expressed in world coordinates. - - - - Get the world coordinates of a vector given the local coordinates. - Note that the vector only takes the rotation into account, not the position. - - A vector fixed in the body. - The same vector expressed in world coordinates. - - - - Get the world coordinates of a vector given the local coordinates. - - A vector fixed in the body. - The same vector expressed in world coordinates. - - - - Gets a local point relative to the body's origin given a world point. - Note that the vector only takes the rotation into account, not the position. - - A point in world coordinates. - The corresponding local point relative to the body's origin. - - - - Gets a local point relative to the body's origin given a world point. - - A point in world coordinates. - The corresponding local point relative to the body's origin. - - - - Gets a local vector given a world vector. - Note that the vector only takes the rotation into account, not the position. - - A vector in world coordinates. - The corresponding local vector. - - - - Gets a local vector given a world vector. - Note that the vector only takes the rotation into account, not the position. - - A vector in world coordinates. - The corresponding local vector. - - - - Get the world linear velocity of a world point attached to this body. - - A point in world coordinates. - The world velocity of a point. - - - - Get the world linear velocity of a world point attached to this body. - - A point in world coordinates. - The world velocity of a point. - - - - Get the world velocity of a local point. - - A point in local coordinates. - The world velocity of a point. - - - - Get the world velocity of a local point. - - A point in local coordinates. - The world velocity of a point. - - - - This is used to prevent connected bodies from colliding. - It may lie, depending on the collideConnected flag. - - The other body. - - - - - Makes a clone of the body. Fixtures and therefore shapes are not included. - Use DeepClone() to clone the body, as well as fixtures and shapes. - - - - - - - Clones the body and all attached fixtures and shapes. Simply said, it makes a complete copy of the body. - - - - - - - A type of body that supports multiple fixtures that can break apart. - - - - - The force needed to break the body apart. - Default: 500 - - - - - Fires when a contact is created - - - - - The filter used by the contact manager. - - - - - Fires when a contact is deleted - - - - - Fires when the broadphase detects that two Fixtures are close to each other. - - - - - Fires after the solver has run - - - - - Fires before the solver runs - - - - - A contact edge is used to connect bodies and contacts together - in a contact graph where each body is a node and each contact - is an edge. A contact edge belongs to a doubly linked list - maintained in each attached body. Each contact has two contact - nodes, one for each attached body. - - - - - The contact - - - - - The next contact edge in the body's contact list - - - - - Provides quick access to the other body attached. - - - - - The previous contact edge in the body's contact list - - - - - The class manages contact between two shapes. A contact exists for each overlapping - AABB in the broad-phase (except if filtered). Therefore a contact object may exist - that has no contact points. - - - - - Get the contact manifold. Do not modify the manifold unless you understand the - internals of Box2D. - - - - Get or set the desired tangent speed for a conveyor belt behavior. In meters per second. - - - Enable/disable this contact. This can be used inside the pre-solve - contact listener. The contact is only disabled for the current - time step (or sub-step in continuous collisions). - NOTE: If you are setting Enabled to a constant true or false, - use the explicit Enable() or Disable() functions instead to - save the CPU from doing a branch operation. - - - - Get the child primitive index for fixture A. - - The child index A. - - - - Get the child primitive index for fixture B. - - The child index B. - - - - Determines whether this contact is touching. - - - true if this instance is touching; otherwise, false. - - - - - Gets the world manifold. - - - - - Update the contact manifold and touching status. - Note: do not assume the fixture AABBs are overlapping or are valid. - - The contact manager. - - - - Evaluate this contact with your own manifold and transforms. - - The manifold. - The first transform. - The second transform. - - - - Evaluate the manifold with supplied transforms. This assumes - modest motion from the original state. This does not change the - point count, impulses, etc. The radii must come from the Shapes - that generated the manifold. - - The manifold. - The transform for A. - The radius for A. - The transform for B. - The radius for B. - World vector pointing from A to B - Torld contact point (point of intersection). - - - - This proxy is used internally to connect fixtures to the broad-phase. - - - - - A fixture is used to attach a Shape to a body for collision detection. A fixture - inherits its transform from its parent. Fixtures hold additional non-geometric data - such as friction, collision filters, etc. - Fixtures are created via Body.CreateFixture. - Warning: You cannot reuse fixtures. - - - - - Fires after two shapes has collided and are solved. This gives you a chance to get the impact force. - - - - - Fires when two fixtures are close to each other. - Due to how the broadphase works, this can be quite inaccurate as shapes are approximated using AABBs. - - - - - Fires when two shapes collide and a contact is created between them. - Note that the first fixture argument is always the fixture that the delegate is subscribed to. - - - - - Fires when two shapes separate and a contact is removed between them. - Note: This can in some cases be called multiple times, as a fixture can have multiple contacts. - Note The first fixture argument is always the fixture that the delegate is subscribed to. - - - - - Defaults to 0 - - If Settings.UseFPECollisionCategories is set to false: - Collision groups allow a certain group of objects to never collide (negative) - or always collide (positive). Zero means no collision group. Non-zero group - filtering always wins against the mask bits. - - If Settings.UseFPECollisionCategories is set to true: - If 2 fixtures are in the same collision group, they will not collide. - - - - - Defaults to Category.All - - The collision mask bits. This states the categories that this - fixture would accept for collision. - Use Settings.UseFPECollisionCategories to change the behavior. - - - - - The collision categories this fixture is a part of. - - If Settings.UseFPECollisionCategories is set to false: - Defaults to Category.Cat1 - - If Settings.UseFPECollisionCategories is set to true: - Defaults to Category.All - - - - - Get the child Shape. You can modify the child Shape, however you should not change the - number of vertices because this will crash some collision caching mechanisms. - - The shape. - - - - Gets or sets a value indicating whether this fixture is a sensor. - - true if this instance is a sensor; otherwise, false. - - - - Get the parent body of this fixture. This is null if the fixture is not attached. - - The body. - - - - Set the user data. Use this to store your application specific data. - - The user data. - - - - Set the coefficient of friction. This will _not_ change the friction of - existing contacts. - - The friction. - - - - Set the coefficient of restitution. This will _not_ change the restitution of - existing contacts. - - The restitution. - - - - Gets a unique ID for this fixture. - - The fixture id. - - - - Restores collisions between this fixture and the provided fixture. - - The fixture. - - - - Ignores collisions between this fixture and the provided fixture. - - The fixture. - - - - Determines whether collisions are ignored between this fixture and the provided fixture. - - The fixture. - - true if the fixture is ignored; otherwise, false. - - - - - Contacts are persistant and will keep being persistant unless they are - flagged for filtering. - This methods flags all contacts associated with the body for filtering. - - - - - Test a point for containment in this fixture. - - A point in world coordinates. - - - - - Cast a ray against this Shape. - - The ray-cast results. - The ray-cast input parameters. - Index of the child. - - - - - Get the fixture's AABB. This AABB may be enlarge and/or stale. - If you need a more accurate AABB, compute it using the Shape and - the body transform. - - The aabb. - Index of the child. - - - - Only compares the values of this fixture, and not the attached shape or body. - This is used for deduplication in serialization only. - - - - - Clones the fixture and attached shape onto the specified body. - - The body you wish to clone the fixture onto. - The cloned fixture. - - - - This is an internal class. - - - - - Maintains a fixed angle between two bodies - - - - - Constructor for AngleJoint - - The first body - The second body - - - - The desired angle between BodyA and BodyB - - - - - Gets or sets the bias factor. - Defaults to 0.2 - - - - - Gets or sets the maximum impulse - Defaults to float.MaxValue - - - - - Gets or sets the softness of the joint - Defaults to 0 - - - - - A distance joint rains two points on two bodies - to remain at a fixed distance from each other. You can view - this as a massless, rigid rod. - - - - - This requires defining an - anchor point on both bodies and the non-zero length of the - distance joint. If you don't supply a length, the local anchor points - is used so that the initial configuration can violate the constraint - slightly. This helps when saving and loading a game. - @warning Do not use a zero or short length. - - The first body - The second body - The first body anchor - The second body anchor - Set to true if you are using world coordinates as anchors. - - - - The local anchor point relative to bodyA's origin. - - - - - The local anchor point relative to bodyB's origin. - - - - - The natural length between the anchor points. - Manipulating the length can lead to non-physical behavior when the frequency is zero. - - - - - The mass-spring-damper frequency in Hertz. A value of 0 - disables softness. - - - - - The damping ratio. 0 = no damping, 1 = critical damping. - - - - - Get the reaction force given the inverse time step. Unit is N. - - - - - - - Get the reaction torque given the inverse time step. - Unit is N*m. This is always zero for a distance joint. - - - - - - - A mouse joint is used to make a point on a body track a - specified world point. This a soft constraint with a maximum - force. This allows the constraint to stretch and without - applying huge forces. - NOTE: this joint is not documented in the manual because it was - developed to be used in the testbed. If you want to learn how to - use the mouse joint, look at the testbed. - - - - - This requires a world target point, - tuning parameters, and the time step. - - The body. - The target. - - - - The local anchor point on BodyA - - - - - The maximum constraint force that can be exerted - to move the candidate body. Usually you will express - as some multiple of the weight (multiplier * mass * gravity). - - - - - The response speed. - - - - - The damping ratio. 0 = no damping, 1 = critical damping. - - - - - Friction joint. This is used for top-down friction. - It provides 2D translational friction and angular friction. - - - - - Constructor for FrictionJoint. - - - - - Set to true if you are using world coordinates as anchors. - - - - The local anchor point on BodyA - - - - - The local anchor point on BodyB - - - - - The maximum friction force in N. - - - - - The maximum friction torque in N-m. - - - - - A gear joint is used to connect two joints together. - Either joint can be a revolute or prismatic joint. - You specify a gear ratio to bind the motions together: - - The ratio can be negative or positive. If one joint is a revolute joint - and the other joint is a prismatic joint, then the ratio will have units - of length or units of 1/length. - - Warning: You have to manually destroy the gear joint if jointA or jointB is destroyed. - - - - - Requires two existing revolute or prismatic joints (any combination will work). - The provided joints must attach a dynamic body to a static body. - - The first joint. - The second joint. - The ratio. - The first body - The second body - - - - The gear ratio. - - - - - The first revolute/prismatic joint attached to the gear joint. - - - - - The second revolute/prismatic joint attached to the gear joint. - - - - - A joint edge is used to connect bodies and joints together - in a joint graph where each body is a node and each joint - is an edge. A joint edge belongs to a doubly linked list - maintained in each attached body. Each joint has two joint - nodes, one for each attached body. - - - - - The joint. - - - - - The next joint edge in the body's joint list. - - - - - Provides quick access to the other body attached. - - - - - The previous joint edge in the body's joint list. - - - - - Indicate if this join is enabled or not. Disabling a joint - means it is still in the simulation, but inactive. - - - - - Constructor for fixed joint - - - - - Gets or sets the type of the joint. - - The type of the joint. - - - - Get the first body attached to this joint. - - - - - Get the second body attached to this joint. - - - - - Get the anchor point on bodyA in world coordinates. - On some joints, this value indicate the anchor point within the world. - - - - - Get the anchor point on bodyB in world coordinates. - On some joints, this value indicate the anchor point within the world. - - - - - Set the user data pointer. - - The data. - - - - Set this flag to true if the attached bodies should collide. - - - - - The Breakpoint simply indicates the maximum Value the JointError can be before it breaks. - The default value is float.MaxValue, which means it never breaks. - - - - - Fires when the joint is broken. - - - - - Get the reaction force on body at the joint anchor in Newtons. - - The inverse delta time. - - - - Get the reaction torque on the body at the joint anchor in N*m. - - The inverse delta time. - - - - Return true if the joint is a fixed type. - - - - - Solves the position constraints. - - - returns true if the position errors are within tolerance. - - - - A motor joint is used to control the relative motion - between two bodies. A typical usage is to control the movement - of a dynamic body with respect to the ground. - - - - - Constructor for MotorJoint. - - The first body - The second body - Set to true if you are using world coordinates as anchors. - - - - The maximum amount of force that can be applied to BodyA - - - - - The maximum amount of torque that can be applied to BodyA - - - - - The linear (translation) offset. - - - - - Get or set the angular offset. - - - - - A prismatic joint. This joint provides one degree of freedom: translation - along an axis fixed in bodyA. Relative rotation is prevented. You can - use a joint limit to restrict the range of motion and a joint motor to - drive the motion or to model joint friction. - - - - - This requires defining a line of - motion using an axis and an anchor point. The definition uses local - anchor points and a local axis so that the initial configuration - can violate the constraint slightly. The joint translation is zero - when the local anchor points coincide in world space. Using local - anchors and a local axis helps when saving and loading a game. - - The first body. - The second body. - The first body anchor. - The second body anchor. - The axis. - Set to true if you are using world coordinates as anchors. - - - - - - - - - - - - - - The local anchor point on BodyA - - - - - The local anchor point on BodyB - - - - - Get the current joint translation, usually in meters. - - - - - - Get the current joint translation speed, usually in meters per second. - - - - - - Is the joint limit enabled? - - true if [limit enabled]; otherwise, false. - - - - Get the lower joint limit, usually in meters. - - - - - - Get the upper joint limit, usually in meters. - - - - - - Set the joint limits, usually in meters. - - The lower limit - The upper limit - - - - Is the joint motor enabled? - - true if [motor enabled]; otherwise, false. - - - - Set the motor speed, usually in meters per second. - - The speed. - - - - Set the maximum motor force, usually in N. - - The force. - - - - Get the current motor impulse, usually in N. - - - - - - Gets the motor force. - - The inverse delta time - - - - The axis at which the joint moves. - - - - - The axis in local coordinates relative to BodyA - - - - - The reference angle. - - - - - The pulley joint is connected to two bodies and two fixed world points. - The pulley supports a ratio such that: - - Yes, the force transmitted is scaled by the ratio. - - Warning: the pulley joint can get a bit squirrelly by itself. They often - work better when combined with prismatic joints. You should also cover the - the anchor points with static shapes to prevent one side from going to zero length. - - - - - Constructor for PulleyJoint. - - The first body. - The second body. - The anchor on the first body. - The anchor on the second body. - The world anchor for the first body. - The world anchor for the second body. - The ratio. - Set to true if you are using world coordinates as anchors. - - - - The local anchor point on BodyA - - - - - The local anchor point on BodyB - - - - - Get the first world anchor. - - - - - - Get the second world anchor. - - - - - - Get the current length of the segment attached to body1. - - - - - - Get the current length of the segment attached to body2. - - - - - - The current length between the anchor point on BodyA and WorldAnchorA - - - - - The current length between the anchor point on BodyB and WorldAnchorB - - - - - Get the pulley ratio. - - - - - - A revolute joint constrains to bodies to share a common point while they - are free to rotate about the point. The relative rotation about the shared - point is the joint angle. You can limit the relative rotation with - a joint limit that specifies a lower and upper angle. You can use a motor - to drive the relative rotation about the shared point. A maximum motor torque - is provided so that infinite forces are not generated. - - - - - Constructor of RevoluteJoint. - - The first body. - The second body. - The first body anchor. - The second anchor. - Set to true if you are using world coordinates as anchors. - - - - Constructor of RevoluteJoint. - - The first body. - The second body. - The shared anchor. - - - - - The local anchor point on BodyA - - - - - The local anchor point on BodyB - - - - - The referance angle computed as BodyB angle minus BodyA angle. - - - - - Get the current joint angle in radians. - - - - - Get the current joint angle speed in radians per second. - - - - - Is the joint limit enabled? - - true if [limit enabled]; otherwise, false. - - - - Get the lower joint limit in radians. - - - - - Get the upper joint limit in radians. - - - - - Set the joint limits, usually in meters. - - The lower limit - The upper limit - - - - Is the joint motor enabled? - - true if [motor enabled]; otherwise, false. - - - - Get or set the motor speed in radians per second. - - - - - Get or set the maximum motor torque, usually in N-m. - - - - - Get or set the current motor impulse, usually in N-m. - - - - - Gets the motor torque in N-m. - - The inverse delta time - - - - A rope joint enforces a maximum distance between two points on two bodies. It has no other effect. - It can be used on ropes that are made up of several connected bodies, and if there is a need to support a heavy body. - This joint is used for stabiliation of heavy objects on soft constraint joints. - - Warning: if you attempt to change the maximum length during the simulation you will get some non-physical behavior. - Use the DistanceJoint instead if you want to dynamically control the length. - - - - - Constructor for RopeJoint. - - The first body - The second body - The anchor on the first body - The anchor on the second body - Set to true if you are using world coordinates as anchors. - - - - The local anchor point on BodyA - - - - - The local anchor point on BodyB - - - - - Get or set the maximum length of the rope. - By default, it is the distance between the two anchor points. - - - - - Gets the state of the joint. - - - - - A weld joint essentially glues two bodies together. A weld joint may - distort somewhat because the island constraint solver is approximate. - - The joint is soft constraint based, which means the two bodies will move - relative to each other, when a force is applied. To combine two bodies - in a rigid fashion, combine the fixtures to a single body instead. - - - - - You need to specify an anchor point where they are attached. - The position of the anchor point is important for computing the reaction torque. - - The first body - The second body - The first body anchor. - The second body anchor. - Set to true if you are using world coordinates as anchors. - - - - The local anchor point on BodyA - - - - - The local anchor point on BodyB - - - - - The bodyB angle minus bodyA angle in the reference state (radians). - - - - - The frequency of the joint. A higher frequency means a stiffer joint, but - a too high value can cause the joint to oscillate. - Default is 0, which means the joint does no spring calculations. - - - - - The damping on the joint. The damping is only used when - the joint has a frequency (> 0). A higher value means more damping. - - - - - A wheel joint. This joint provides two degrees of freedom: translation - along an axis fixed in bodyA and rotation in the plane. You can use a - joint limit to restrict the range of motion and a joint motor to drive - the rotation or to model rotational friction. - This joint is designed for vehicle suspensions. - - - - - Constructor for WheelJoint - - The first body - The second body - The anchor point - The axis - Set to true if you are using world coordinates as anchors. - - - - The local anchor point on BodyA - - - - - The local anchor point on BodyB - - - - - The axis at which the suspension moves. - - - - - The axis in local coordinates relative to BodyA - - - - - The desired motor speed in radians per second. - - - - - The maximum motor torque, usually in N-m. - - - - - Suspension frequency, zero indicates no suspension - - - - - Suspension damping ratio, one indicates critical damping - - - - - Gets the translation along the axis - - - - - Gets the angular velocity of the joint - - - - - Enable/disable the joint motor. - - - - - Gets the torque of the motor - - inverse delta time - - - - This is an internal structure. - - - - - Time step (Delta time) - - - - - dt * inv_dt0 - - - - - Inverse time step (0 if dt == 0). - - - - This is an internal structure. - - - This is an internal structure. - - - Solver Data - - - - The world class manages all physics entities, dynamic simulation, - and asynchronous queries. - - - - - Fires whenever a body has been added - - - - - Fires whenever a body has been removed - - - - - Fires whenever a fixture has been added - - - - - Fires whenever a fixture has been removed - - - - - Fires whenever a joint has been added - - - - - Fires whenever a joint has been removed - - - - - Fires every time a controller is added to the World. - - - - - Fires every time a controlelr is removed form the World. - - - - - Initializes a new instance of the class. - - - - - Get the number of broad-phase proxies. - - The proxy count. - - - - Change the global gravity vector. - - The gravity. - - - - Get the contact manager for testing. - - The contact manager. - - - - Get the world body list. - - Thehead of the world body list. - - - - Get the world joint list. - - The joint list. - - - - Get the world contact list. With the returned contact, use Contact.GetNext to get - the next contact in the world list. A null contact indicates the end of the list. - - The head of the world contact list. - - - - If false, the whole simulation stops. It still processes added and removed geometries. - - - - - Add a rigid body. - - - - - - Destroy a rigid body. - Warning: This automatically deletes all associated shapes and joints. - - The body. - - - - Create a joint to constrain bodies together. This may cause the connected bodies to cease colliding. - - The joint. - - - - Destroy a joint. This may cause the connected bodies to begin colliding. - - The joint. - - - - All adds and removes are cached by the World duing a World step. - To process the changes before the world updates again, call this method. - - - - - Take a time step. This performs collision detection, integration, - and consraint solution. - - The amount of time to simulate, this should not vary. - - - - Call this after you are done with time steps to clear the forces. You normally - call this after each call to Step, unless you are performing sub-steps. By default, - forces will be automatically cleared, so you don't need to call this function. - - - - - Query the world for all fixtures that potentially overlap the provided AABB. - - Inside the callback: - Return true: Continues the query - Return false: Terminate the query - - A user implemented callback class. - The aabb query box. - - - - Query the world for all fixtures that potentially overlap the provided AABB. - Use the overload with a callback for filtering and better performance. - - The aabb query box. - A list of fixtures that were in the affected area. - - - - Ray-cast the world for all fixtures in the path of the ray. Your callback - controls whether you get the closest point, any point, or n-points. - The ray-cast ignores shapes that contain the starting point. - - Inside the callback: - return -1: ignore this fixture and continue - return 0: terminate the ray cast - return fraction: clip the ray to this point - return 1: don't clip the ray and continue - - A user implemented callback class. - The ray starting point. - The ray ending point. - - - - Returns a list of fixtures that are at the specified point. - - The point. - - - - Shift the world origin. Useful for large worlds. - The body shift formula is: position -= newOrigin - @param newOrigin the new origin with respect to the old origin - Warning: Calling this method mid-update might cause a crash. - - - - This delegate is called when a contact is deleted - - - - - This delegate is called when a contact is created - - - - - Creates a capsule. - Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices) - - - - - - Creates a rounded rectangle. - Note: Automatically decomposes the capsule if it contains too many vertices (controlled by Settings.MaxPolygonVertices) - - The world. - The width. - The height. - The x radius. - The y radius. - The segments. - The density. - The position. - - - - - Creates a breakable body. You would want to remove collinear points before using this. - - The world. - The vertices. - The density. - The position. - - - - - An easy to use factory for creating bodies - - - - - An easy to use factory for using joints. - - - - - Creates a revolute joint and adds it to the world - - - - - - - - - - Creates a rope joint and adds it to the world - - - - - Creates a prismatic joint and adds it to the world - - - - - - - - - - - Creates a Wheel Joint and adds it to the world - - - - - Creates an angle joint. - - The world. - The first body. - The second body. - - - - - Creates a chain. - - The world. - The start. - The end. - The width. - The height. - if set to true [fix start]. - if set to true [fix end]. - The number of links. - The link density. - - - - - If true, all collision callbacks have to return the same value, and agree - if there was a collision or not. Swtich this to false to revert to the - collision agreement used in FPE 3.3.x - - - - - Enabling diagnistics causes the engine to gather timing information. - You can see how much time it took to solve the contacts, solve CCD - and update the controllers. - NOTE: If you are using a debug view that shows performance counters, - you might want to enable this. - - - - - Set this to true to skip sanity checks in the engine. This will speed up the - tools by removing the overhead of the checks, but you will need to handle checks - yourself where it is needed. - - - - - The number of velocity iterations used in the solver. - - - - - The number of position iterations used in the solver. - - - - - Enable/Disable Continuous Collision Detection (CCD) - - - - - If true, it will run a GiftWrap convex hull on all polygon inputs. - This makes for a more stable engine when given random input, - but if speed of the creation of polygons are more important, - you might want to set this to false. - - - - - The number of velocity iterations in the TOI solver - - - - - The number of position iterations in the TOI solver - - - - - Maximum number of sub-steps per contact in continuous physics simulation. - - - - - Enable/Disable warmstarting - - - - - Enable/Disable sleeping - - - - - The maximum number of vertices on a convex polygon. - - - - - Farseer Physics Engine has a different way of filtering fixtures than Box2d. - We have both FPE and Box2D filtering in the engine. If you are upgrading - from earlier versions of FPE, set this to true and DefaultFixtureCollisionCategories - to Category.All. - - - - - This is used by the Fixture constructor as the default value - for Fixture.CollisionCategories member. Note that you may need to change this depending - on the setting of UseFPECollisionCategories, above. - - - - - This is used by the Fixture constructor as the default value - for Fixture.CollidesWith member. - - - - - This is used by the Fixture constructor as the default value - for Fixture.IgnoreCCDWith member. - - - - - The maximum number of contact points between two convex shapes. - DO NOT CHANGE THIS VALUE! - - - - - This is used to fatten AABBs in the dynamic tree. This allows proxies - to move by a small amount without triggering a tree adjustment. - This is in meters. - - - - - This is used to fatten AABBs in the dynamic tree. This is used to predict - the future position based on the current displacement. - This is a dimensionless multiplier. - - - - - A small length used as a collision and constraint tolerance. Usually it is - chosen to be numerically significant, but visually insignificant. - - - - - A small angle used as a collision and constraint tolerance. Usually it is - chosen to be numerically significant, but visually insignificant. - - - - - The radius of the polygon/edge shape skin. This should not be modified. Making - this smaller means polygons will have an insufficient buffer for continuous collision. - Making it larger may create artifacts for vertex collision. - - - - - Maximum number of contacts to be handled to solve a TOI impact. - - - - - A velocity threshold for elastic collisions. Any collision with a relative linear - velocity below this threshold will be treated as inelastic. - - - - - The maximum linear position correction used when solving constraints. This helps to - prevent overshoot. - - - - - The maximum angular position correction used when solving constraints. This helps to - prevent overshoot. - - - - - This scale factor controls how fast overlap is resolved. Ideally this would be 1 so - that overlap is removed in one time step. However using values close to 1 often lead - to overshoot. - - - - - The time that a body must be still before it will go to sleep. - - - - - A body cannot sleep if its linear velocity is above this tolerance. - - - - - A body cannot sleep if its angular velocity is above this tolerance. - - - - - The maximum linear velocity of a body. This limit is very large and is used - to prevent numerical problems. You shouldn't need to adjust this. - - - - - The maximum angular velocity of a body. This limit is very large and is used - to prevent numerical problems. You shouldn't need to adjust this. - - - - - Defines the maximum number of iterations made by the GJK algorithm. - - - - - This is only for debugging the solver - - - - - By default, forces are cleared automatically after each call to Step. - The default behavior is modified with this setting. - The purpose of this setting is to support sub-stepping. Sub-stepping is often used to maintain - a fixed sized time step under a variable frame-rate. - When you perform sub-stepping you should disable auto clearing of forces and instead call - ClearForces after all sub-steps are complete in one pass of your game loop. - - - - - Friction mixing law. Feel free to customize this. - - The friction1. - The friction2. - - - - - Restitution mixing law. Feel free to customize this. - - The restitution1. - The restitution2. - - - - - Replaces characters not supported by your spritefont. - - The font. - The input string. - The string to replace illegal characters with. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This is the pivot position - - - - - - - - - - - - - - - - - - - - - - - - - 进入绘画模式,整个对象将画到一张RenderTexture上,然后这种贴图将代替原有的显示内容。 - 可以在onPaint回调里对这张纹理进行进一步操作,实现特殊效果。 - 可能有多个地方要求进入绘画模式,这里用requestorId加以区别,取值是1、2、4、8、16以此类推。1024内内部保留。用户自定义的id从1024开始。 - - 请求者id - 纹理四周的留空。如果特殊处理后的内容大于原内容,那么这里的设置可以使纹理扩大。 - - - - 离开绘画模式 - - - - - - - - - - - 将整个显示对象(如果是容器,则容器包含的整个显示列表)静态化,所有内容被缓冲到一张纹理上。 - DC将保持为1。CPU消耗将降到最低。但对象的任何变化不会更新。 - 当cacheAsBitmap已经为true时,再次调用cacheAsBitmap=true将会刷新一次。 - - - - - - - - - - - - - - - - - - - - - - 将舞台坐标转换为本地坐标 - - - - - - - 将本地坐标转换为舞台坐标 - - - - - - - - - - null if to world space - - - - - - - - null if to world space - - - - - - - - - - FairyBatch is for internal use. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If it is -1, means all elements are active, otherwise, only the specific element is active - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Inspired by kim ki won (http://mypi.ruliweb.daum.net/mypi.htm?id=newtypekorea) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - points must be in clockwise order, and must start from bottom-left if stretchUV is set. - - - - - if you dont want to provide uv, leave it empty. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1---2 - | / | - 0---3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Whether to ignore Unity time scale. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 从start帧开始,播放到end帧(-1表示结尾),重复times次(0表示无限循环),循环结束后,停止在endAt帧(-1表示参数end) - - - - - - - - - - - - - - 不参与剪裁 - - - - - - - - - - 当Mesh更新时被调用 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 绘制顺序 - - - - - 可见性 - - - - - - - - - - - - - - - 是否启用 - - - - - 更新顺序 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for all kind of fonts. - - - - - The name of this font object. - - - - - Character info. - - - - - - - - - - - - - - - - - - - - Can this font be tinted? Will be true for dynamic font and fonts generated by BMFont. - - - - - - - - - - The texture of this font object. - - - - - - - - - - - - - - - 代表图片资源url。 - - - - - 图片宽度。不设置(0)则表示使用原始宽度。 - - - - - 图片高度。不设置(0)则表示使用原始高度。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 接收用户输入的文本控件。因为支持直接输入表情,所以从RichTextField派生。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1 means the rest count from start - - - - - - - - - - - - - - - - 通过本地坐标获得字符索引位置 - - 本地坐标 - - - - - 获得字符的坐标。这个坐标是容器的坐标,不是文本里的坐标。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 立刻重建文本 - - - - - - - - - - - - - - - - 行的宽度 - - - - - 行的高度 - - - - - 行内文本的高度 - - - - - 行的y轴位置 - - - - - 行的y轴位置的备份 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 字符索引 - - - - - 字符所在的行索引 - - - - - 字符的x偏移 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / - - - - - / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - x position in stage coordinates. - - - - - y position in stage coordinates. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1-none,0-left,1-right,2-middle - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Changes the saturation. Typical values are in the range (-1, 1). - Values above zero will raise, values below zero will reduce the saturation. - '-1' will produce a grayscale image. - - - - - - Changes the contrast. Typical values are in the range (-1, 1). - Values above zero will raise, values below zero will reduce the contrast. - - - - - - Changes the brightness. Typical values are in the range (-1, 1). - Values above zero will make the image brighter, values below zero will make it darker. - - - - - - Changes the hue of the image. Typical values are in the range (-1, 1). - - - - - - Tints the image in a certain color, analog to what can be done in Adobe Animate. - - the RGB color with which the image should be tinted. - the intensity with which tinting should be applied. Range (0, 1). - - - - Changes the filter matrix back to the identity matrix - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns a value between 0 and 1 (inclusive) based on the elapsed time and ease selected - - - - - This class contains a C# port of the easing equations created by Robert Penner (http://robertpenner.com/easing). - - - - - Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in: accelerating from zero velocity. - - - Current time (in frames or seconds). - - - Expected easing duration (in frames or seconds). - - - The eased value. - - - - - Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity. - - - Current time (in frames or seconds). - - - Expected easing duration (in frames or seconds). - - - The eased value. - - - - - Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration. - - - Current time (in frames or seconds). - - - Expected easing duration (in frames or seconds). - - - The eased value. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Controller class. - 控制器类。控制器的创建和设计需通过编辑器完成,不建议使用代码创建。 - 最常用的方法是通过selectedIndex获得或改变控制器的活动页面。如果要获得控制器页面改变的通知,使用onChanged事件。 - - - - - Name of the controller - 控制器名称。 - - - - - When controller page changed. - 当控制器活动页面改变时,此事件被触发。 - - - - - Current page index. - 获得或设置当前活动页面索引。 - - - - - Set current page index, no onChanged event. - 通过索引设置当前活动页面,和selectedIndex的区别在于,这个方法不会触发onChanged事件。 - - Page index - - - - Set current page by name, no onChanged event. - 通过页面名称设置当前活动页面,和selectedPage的区别在于,这个方法不会触发onChanged事件。 - - Page name - - - - Current page name. - 获得当前活动页面名称 - - - - - Previouse page index. - 获得上次活动页面索引 - - - - - Previous page name. - 获得上次活动页面名称。 - - - - - Page count of this controller. - 获得页面数量。 - - - - - Get page name by an index. - 通过页面索引获得页面名称。 - - Page index - Page Name - - - - Get page id by name - - - - - - - Add a new page to this controller. - - Page name - - - - Add a new page to this controller at a certain index. - - Page name - Insert position - - - - Remove a page. - - Page name - - - - Removes a page at a certain index. - - - - - - Remove all pages. - - - - - Check if the controller has a page. - - Page name. - - - - - Helper for drag and drop. - 这是一个提供特殊拖放功能的功能类。与GObject.draggable不同,拖动开始后,他使用一个替代的图标作为拖动对象。 - 当玩家释放鼠标/手指,目标组件会发出一个onDrop事件。 - - - - - Loader object for real dragging. - 用于实际拖动的Loader对象。你可以根据实际情况设置loader的大小,对齐等。 - - - - - Is dragging? - 返回当前是否正在拖动。 - - - - - Start dragging. - 开始拖动。 - - Source object. This is the object which initiated the dragging. - Icon to be used as the dragging sign. - Custom data. You can get it in the onDrop event data. - Copy the touchId from InputEvent to here, if has one. - - - - Cancel dragging. - 取消拖动。 - - - - - - - - - - - - - - - The Image will be filled Horizontally - - - - - The Image will be filled Vertically. - - - - - The Image will be filled Radially with the radial center in one of the corners. - - - - - The Image will be filled Radially with the radial center in one of the edges. - - - - - The Image will be filled Radially with the radial center at the center. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GButton class. - - - - - The button will be in down status in these pages. - - - - - Play sound when button is clicked. - - - - - Volume of the click sound. (0-1) - - - - - For radio or checkbox. if false, the button will not change selected status on click. Default is true. - 如果为true,对于单选和多选按钮,当玩家点击时,按钮会自动切换状态。设置为false,则不会。默认为true。 - - - - - Show a popup on click. - 可以为按钮设置一个关联的组件,当按钮被点击时,此组件被自动弹出。 - - - - - Dispatched when the button status was changed. - 如果为单选或多选按钮,当按钮的选中状态发生改变时,此事件触发。 - - - - - Icon of the button. - - - - - Title of the button - - - - - Same of the title. - - - - - Icon value on selected status. - - - - - Title value on selected status. - - - - - Title color. - - - - - - - - - - - - - - - If the button is in selected status. - - - - - Button mode. - - - - - - A controller is connected to this button, the activate page of this controller will change while the button status changed. - 对应编辑器中的单选控制器。 - - - - - Simulates a click on this button. - 模拟点击这个按钮。 - - If the down effect will simulate too. - - - - - - - - - - GComboBox class. - - - - - Visible item count of the drop down list. - - - - - - - - - - Dispatched when selection was changed. - - - - - Icon of the combobox. - - - - - Title of the combobox. - - - - - Same of the title. - - - - - Text color - - - - - - - - - - Items to build up drop down list. - - - - - Values, should be same size of the items. - - - - - Selected index. - - - - - - - - - - Selected value. - - - - - - - - - - - - - - - - Component - - - - - Root container. - - - - - Content container. If the component is not clipped, then container==rootContainer. - - - - - ScrollPane of the component. If the component is not scrollable, the value is null. - - - - - Dispatched when an object was dragged and dropped to this component. - - - - - If true, mouse/touch events cannot pass through the empty area of the component. Default is true. - - - - - Add a child to the component. It will be at the frontmost position. - - A child object - GObject - - - - Adds a child to the component at a certain index. - - A child object - Index - GObject - - - - Removes a child from the component. If the object is not a child, nothing happens. - - A child object - GObject - - - - Removes a child from the component. If the object is not a child, nothing happens. - - A child object - If true, the child will be disposed right away. - GObject - - - - Removes a child at a certain index. Children above the child will move down. - - Index - GObject - - - - Removes a child at a certain index. Children above the child will move down. - - Index - If true, the child will be disposed right away. - GObject - - - - Remove all children. - - - - - Removes a range of children from the container (endIndex included). - - Begin index. - End index.(Included). - If true, the child will be disposed right away. - - - - Returns a child object at a certain index. If index out of bounds, exception raised. - - Index - A child object. - - - - Returns a child object with a certain name. - - Name - A child object. Null if not found. - - - - Returns a visible child object with a certain name. - - Name - A child object. Null if not found. - - - - Returns a child object belong to a group with a certain name. - - A group object - Name - A child object. Null if not found. - - - - Returns a copy of all children with an array. - - An array contains all children - - - - Returns the index of a child within the container, or "-1" if it is not found. - - A child object - Index of the child. -1 If not found. - - - - Moves a child to a certain index. Children at and after the replaced position move up. - - A Child - Index - - - - Moves a child to a certain position which is in front of the child previously at given index. - 与SetChildIndex不同的是,如果child原来在index的前面,那么child插入的位置是index-1,即保证排在原来占据index的对象的前面。 - - - - - - - Swaps the indexes of two children. - - A child object - A child object - - - - Swaps the indexes of two children. - - index of first child - index of second child - - - - The number of children of this component. - - - - - - - - - - - - Adds a controller to the container. - - Controller object - - - - Returns a controller object at a certain index. - - Index - Controller object. - - - - Returns a controller object with a certain name. - - Name - Controller object. Null if not found. - - - - Removes a controller from the container. - - Controller object. - - - - Returns controller list. - - Controller list - - - - Returns a transition object at a certain index. - - Index - transition object. - - - - Returns a transition object at a certain name. - - Name - Transition Object - - - - The mask of the component. - - - - - - - - - - Test if a child is in view. - - A child object - True if in view - - - - Notify the component the bounds should recaculate. - - - - - Make sure the bounds of the component is correct. - Bounds of the component is not updated on every changed. For example, you add a new child to the list, children in the list will be rearranged in next frame. - If you want to access the correct child position immediatelly, call this function first. - - - - - Viwe port width of the container. - - - - - View port height of the container. - - - - - Method for extensions to override - - - - - 每帧调用的一个回调。如果你要override,请记住以下两点: - 1、记得调用base.onUpdate; - 2、不要在方法里进行任何会更改显示列表的操作,例如AddChild、RemoveChild、visible等。 - - - - - Gear is a connection between object and controller. - - - - - Gear is a connection between object and controller. - - - - - Gear is a connection between object and controller. - - - - - Controller object. - - - - - Call when controller active page changed. - - - - - Call when object's properties changed. - - - - - Use tween to apply change. - - - - - Ease type. - - - - - Tween duration in seconds. - - - - - Tween delay in seconds. - - - - - Gear is a connection between object and controller. - - - - - Gear is a connection between object and controller. - - - - - Pages involed in this gear. - - - - - Gear is a connection between object and controller. - - - - - Gear is a connection between object and controller. - - - - - Gear is a connection between object and controller. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gear is a connection between object and controller. - - - - - GGraph class. - 对应编辑器里的图形对象。图形有两个用途,一是用来显示简单的图形,例如矩形等;二是作为一个占位的用途, - 可以将本对象替换为其他对象,或者在它的前后添加其他对象,相当于一个位置和深度的占位;还可以直接将内容设置 - 为原生对象。 - - - - - Replace this object to another object in the display list. - 在显示列表中,将指定对象取代这个图形对象。这个图形对象相当于一个占位的用途。 - - Target object. - - - - Add another object before this object. - 在显示列表中,将另一个对象插入到这个对象的前面。 - - Target object. - - - - Add another object after this object. - 在显示列表中,将另一个对象插入到这个对象的后面。 - - Target object. - - - - 设置内容为一个原生对象。这个图形对象相当于一个占位的用途。 - - 原生对象 - - - - - - - - - Get the shape object. It can be used for drawing. - 获取图形的原生对象,可用于绘制图形。 - - - - - Draw a rectangle. - 画矩形。 - - Width - Height - Line size - Line color - Fill color - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GGroup class. - 组对象,对应编辑器里的高级组。 - - - - - Group layout type. - - - - - - - - - - - - - - - Update group bounds. - 更新组的包围. - - - - - GImage class. - - - - - Color of the image. - - - - - Flip type. - - - - - - Fill method. - - - - - - Fill origin. - - - - - - - - - - Fill clockwise if true. - - - - - Fill amount. (0~1) - - - - - Set texture directly. The image wont own the texture. - - - - - GLabel class. - - - - - Icon of the label. - - - - - Title of the label. - - - - - Same of the title. - - - - - If title is input text. - - - - - Title color of the label - - - - - - - - - - - - - - - - - - - - - Callback function when an item is needed to update its look. - - Item index. - Item object. - - - - - - - - - - - GList class. - - - - - Resource url of the default item. - - - - - 如果true,当item不可见时自动折叠,否则依然占位 - - - - - List selection mode - - - - - - Callback function when an item is needed to update its look. - - - - - Callback funtion to return item resource url. - - - - - - - - - - Dispatched when a list item being clicked. - - - - - Dispatched when a list item being clicked with right button. - - - - - List layout type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If the item will resize itself to fit the list width/height. - - - - - - - - - - - - - - - - - Add a item to list, same as GetFromPool+AddChild - - Item object - - - - Add a item to list, same as GetFromPool+AddChild - - Item resource url - Item object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resize to list size to fit specified item count. - If list layout is single column or flow horizontally, the height will change to fit. - If list layout is single row or flow vertically, the width will change to fit. - - Item count - - - - Resize to list size to fit specified item count. - If list layout is single column or flow horizontally, the height will change to fit. - If list layout is single row or flow vertically, the width will change to fit. - - >Item count - If the result size if smaller than minSize, then use minSize. - - - - - - - - - Scroll the list to make an item with certain index visible. - - Item index - - - - Scroll the list to make an item with certain index visible. - - Item index - True to scroll smoothly, othewise immdediately. - - - - Scroll the list to make an item with certain index visible. - - Item index - True to scroll smoothly, othewise immdediately. - If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view. - - - - 获取当前点击哪个item - - - - - Get first child in view. - - - - - - Set the list to be virtual list. - 设置列表为虚拟列表模式。在虚拟列表模式下,列表不会为每一条列表数据创建一个实体对象,而是根据视口大小创建最小量的显示对象,然后通过itemRenderer指定的回调函数设置列表数据。 - 在虚拟模式下,你不能通过AddChild、RemoveChild等方式管理列表,只能通过设置numItems设置列表数据的长度。 - 如果要刷新列表,可以通过重新设置numItems,或者调用RefreshVirtualList完成。 - ‘单行’或者‘单列’的列表布局可支持不等高的列表项目。 - 除了‘页面’的列表布局,其他布局均支持使用不同资源构建列表项目,你可以在itemProvider里返回。如果不提供,默认使用defaultItem。 - - - - - Set the list to be virtual list, and has loop behavior. - - - - - Set the list item count. - If the list is not virtual, specified number of items will be created. - If the list is virtual, only items in view will be created. - - - - - GLoader class - - - - - Display an error sign if the loader fails to load the content. - UIConfig.loaderErrorSign muse be set. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GMovieClip class. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Play from the start to end, repeat times, set to endAt on complete. - 从start帧开始,播放到end帧(-1表示结尾),重复times次(0表示无限循环),循环结束后,停止在endAt帧(-1表示参数end) - - Start frame - End frame. -1 indicates the last frame. - Repeat times. 0 indicates infinite loop. - Stop frame. -1 indicates to equal to the end parameter. - - - - GObject的id,仅作为内部使用。与name不同,id值是不会相同的。 - id is for internal use only. - - - - - Name of the object. - - - - - User defined data. - - - - - The source width of the object. - - - - - The source height of the object. - - - - - The initial width of the object. - - - - - The initial height of the object. - - - - - - - - - - - - - - - - - - - - - - - - - Relations Object. - - - - - Restricted range of dragging. - - - - - Parent object. - - - - - Lowlevel display object. - - - - - 当前全局正在被拖动的对象 - - - - - - - - - - Dispatched when the object or its child was clicked. - - - - - Dispatched when the object or its child was clicked by right mouse button. Web only. - - - - - Dispatched when the finger touched the object or its child just now. - - - - - - - - - - Dispatched when the finger was lifted from the screen or from the mouse button. - - - - - The cursor or finger hovers over an object. - - - - - The cursor or finger leave an object. - - - - - Dispatched when the object was added to the stage. - - - - - Dispatched when the object was removed from the stage. - - - - - Dispatched on key pressed when the object is in focus. - - - - - Dispatched when links in the object or its child was clicked. - - - - - Dispatched when the object was moved. - - - - - Dispatched when the object was resized. - - - - - Dispatched when drag start. - - - - - Dispatched when dragging. - - - - - Dispatched when drag end. - - - - - - - - - - The x coordinate of the object relative to the local coordinates of the parent. - - - - - The y coordinate of the object relative to the local coordinates of the parent. - - - - - The z coordinate of the object relative to the local coordinates of the parent. - - - - - The x and y coordinates of the object relative to the local coordinates of the parent. - - - - - The x,y,z coordinates of the object relative to the local coordinates of the parent. - - - - - change the x and y coordinates of the object relative to the local coordinates of the parent. - - x value. - y value. - - - - - - - - - - - - change the x,y,z coordinates of the object relative to the local coordinates of the parent. - - x value. - y value. - z value. - - - - Set the object in middle of the parent or GRoot if the parent is not set. - - - - - Set the object in middle of the parent or GRoot if the parent is not set. - - Add relations to maintain the center state. - - - - 设置对象为全屏大小(逻辑屏幕)。 - - - - - The width of the object in pixels. - - - - - The height of the object in pixels. - - - - - The size of the object in pixels. - - - - - actualWidth = width * scalex - - - - - actualHeight = height * scaleY - - - - - Change size. - - Width value. - Height value. - - - - Change size. - - Width value. - Height value. - If pivot is set, the object's positon will change when its size change. Set ignorePivot=true to keep the position. - - - - - - - - - - - - - - The horizontal scale factor. '1' means no scale, cannt be negative. - - - - - The vertical scale factor. '1' means no scale, cannt be negative. - - - - - The scale factor. - - - - - Change the scale factor. - - The horizontal scale factor. - The vertical scale factor - - - - - - - - - The x coordinate of the object's origin in its own coordinate space. - - - - - The y coordinate of the object's origin in its own coordinate space. - - - - - The x and y coordinates of the object's origin in its own coordinate space. - - - - - Change the x and y coordinates of the object's origin in its own coordinate space. - - x value in ratio - y value in ratio - - - - Change the x and y coordinates of the object's origin in its own coordinate space. - - x value in ratio - y value in ratio - If use the pivot as the anchor position - - - - If the object can touch or click. GImage/GTextField is not touchable even it is true. - - - - - If true, apply a grayed effect on this object. - - - - - Enabled is shortcut for grayed and !touchable combination. - - - - - The rotation around the z axis of the object in degrees. - - - - - The rotation around the x axis of the object in degrees. - - - - - The rotation around the y axis of the object in degrees. - - - - - The opacity of the object. 0 = transparent, 1 = opaque. - - - - - The visibility of the object. An invisible object will be untouchable. - - - - - By default(when sortingOrder==0), object added to component is arrange by the added roder. - The bigger is the sorting order, the object is more in front. - - - - - If the object can be focused? - - - - - If the object is focused. Focused object can receive key events. - - - - - Request focus on this object. - - - - - Tooltips of this object. UIConfig.tooltipsWin must be set first. - - - - - - - - - - - - - - - If the object has lowlevel displayobject and the displayobject has a container parent? - - - - - If the object is on stage. - - - - - Resource url of this object. - - - - - Gear to xy controller. - - - - - Gear to size controller. - - - - - Gear to look controller. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Group belonging to. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Transforms a point from the local coordinate system to global (Stage) coordinates. - - - - - - - Transforms a point from global (Stage) coordinates to the local coordinate system. - - - - - - - - - - - - - - - - - - - - - Transforms a point from the local coordinate system to GRoot coordinates. - - - - - - - - Transforms a point from the GRoot coordinate to local coordinates system. - - - - - - - - - - - - - - - - - - - - - - - - GObjectPool is use for GObject pooling. - - - - - Callback function when a new object is creating. - - - - - - Callback function when a new object is creating. - - - - - 需要设置一个manager,加入池里的对象都成为这个manager的孩子 - - - - - Dispose all objects in the pool. - - - - - - - - - - - - - - - - - - - - - - - GProgressBar class. - - - - - - - - - - - - - - - - - - - - 动态改变进度值。 - - - - - - - - - - - - - GRichTextField class. - - - - - - - - - - - - - - - GRoot is a topmost component of UI display list.You dont need to create GRoot. It is created automatically. - - - - - This is called after screen size changed. - - - - - Display a window. - - - - - - Call window.Hide - 关闭一个窗口。将调用Window.Hide方法。 - - - - - - Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. - 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。 - - - - - - Remove a window from stage immediatelly. window.Hide/window.OnHide will never be called. - 立刻关闭一个窗口。不会调用Window.Hide方法,Window.OnHide也不会被调用。 - - - True to dispose the window. - - - - 将一个窗口提到所有窗口的最前面 - - - - - - Display a modal layer and a waiting sign in the front. - 显示一个半透明层和一个等待标志在最前面。半透明层的颜色可以通过UIConfig.modalLayerColor设定。 - 等待标志的资源可以通过UIConfig.globalModalWaiting。等待标志组件会设置为屏幕大小,请内部做好关联。 - - - - - Hide modal layer and waiting sign. - - - - - Close all windows except modal windows. - - - - - Close all windows. - - - - - Get window on top. - - - - - - - - - - - Return true if a modal window is on stage. - - - - - Return true if modal waiting layer is on stage. - - - - - Get current touch target. (including hover) - - - - - - - - - - - - Show a popup object. - 显示一个popup。 - popup的特点是点击popup对象外的区域,popup对象将自动消失。 - - - - - - Show a popup object along with the specific target object. - 显示一个popup。将popup显示在指定对象的上边或者下边。 - popup的特点是点击popup对象外的区域,popup对象将自动消失。 - - - - - - - Show a popup object along with the specific target object. - 显示一个popup。将popup显示在指定对象的上方或者下方。 - popup的特点是点击popup对象外的区域,popup对象将自动消失。 - - - - True to display downwards, false to display upwards, null to display automatically. - - - - - - - - - - - - - If a popup is showing, then close it; otherwise, open it. - - - - - - - - - - - - - - - - - - - - - Close all popups. - - - - - Close a popup. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GScrollBar class. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 当前被拖拽的滚动面板。同一时间只能有一个在进行此操作。 - - - - - - - - - - Dispatched when scrolling. - 在滚动时派发该事件。 - - - - - 在滚动结束时派发该事件。 - - - - - 向下拉过上边缘后释放则派发该事件。 - - - - - 向上拉过下边缘后释放则派发该事件。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 滚动到达边缘时是否允许回弹效果。 - - - - - 是否允许拖拽内容区域进行滚动。 - - - - - 是否允许惯性滚动。 - - - - - 是否允许在左/上边缘显示虚化效果。 - - - - - 当调用ScrollPane.scrollUp/Down/Left/Right时,或者点击滚动条的上下箭头时,滑动的距离。 - 鼠标滚轮触发一次滚动的距离设定为defaultScrollStep*2 - - - - - 滚动位置是否保持贴近在某个元件的边缘。 - - - - - 是否页面滚动模式。 - - - - - - - - - - 是否允许使用鼠标滚轮进行滚动。 - - - - - 当处于惯性滚动时减速的速率。默认值是UIConfig.defaultScrollDecelerationRate。 - 越接近1,减速越慢,意味着滑动的时间和距离更长。 - - - - - 当前X轴滚动位置百分比,0~1(包含)。 - - - - - 设置当前X轴滚动位置百分比,0~1(包含)。 - - - 是否使用缓动到达目标。 - - - - 当前Y轴滚动位置百分比,0~1(包含)。 - - - - - 设置当前Y轴滚动位置百分比,0~1(包含)。 - - - 是否使用缓动到达目标。 - - - - 当前X轴滚动位置,值范围是viewWidth与contentWidth之差。 - - - - - 设置当前X轴滚动位置。 - - - 是否使用缓动到达目标。 - - - - 当前Y轴滚动位置,值范围是viewHeight与contentHeight之差。 - - - - - 设置当前Y轴滚动位置。 - - - 是否使用缓动到达目标。 - - - - 返回当前滚动位置是否在最下边。 - - - - - 返回当前滚动位置是否在最右边。 - - - - - 如果处于分页模式,返回当前在X轴的页码。 - - - - - 如果处于分页模式,可设置X轴的页码。 - - - 是否使用缓动到达目标。 - - - - 如果处于分页模式,返回当前在Y轴的页码。 - - - - - 如果处于分页模式,可设置Y轴的页码。 - - - 是否使用缓动到达目标。 - - - - 这个值与PosX不同在于,他反映的是实时位置,而PosX在有缓动过程的情况下只是终值。 - - - - - 这个值与PosY不同在于,他反映的是实时位置,而PosY在有缓动过程的情况下只是终值。 - - - - - 显示内容宽度。 - - - - - 显示内容高度。 - - - - - 显示区域宽度。 - - - - - 显示区域高度。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - obj can be any object on stage, not limited to the direct child of this container. - - - - - - obj can be any object on stage, not limited to the direct child of this container. - If moving to target position with animation - - - - - - obj can be any object on stage, not limited to the direct child of this container. - If moving to target position with animation - If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view. - - - - - - Rect in local coordinates - If moving to target position with animation - If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view. - - - - - - obj must be the direct child of this container - - - - - 当滚动面板处于拖拽滚动状态或即将进入拖拽状态时,可以调用此方法停止或禁止本次拖拽。 - - - - - 设置Header固定显示。如果size为0,则取消固定显示。 - - Header显示的大小 - - - - 设置Footer固定显示。如果size为0,则取消固定显示。 - - - - - - 内部使用。由虚拟列表调用。在滚动时修改显示内容的大小,需要进行修正,避免滚动跳跃。 - - - - - - - - - 对当前的滚动位置进行循环滚动边界检查。当到达边界时,回退一半内容区域(循环滚动内容大小通常是真实内容大小的偶数倍)。 - - - - - - 对目标位置进行循环滚动边界检查。当到达边界时,回退一半内容区域(循环滚动内容大小通常是真实内容大小的偶数倍)。 - - - - - - 从oldPos滚动至pos,调整pos位置对齐页面、对齐item等(如果需要)。 - - - - - - - 从oldPos滚动至pos,调整目标位置到对齐页面。 - - - - - - - - - 根据当前速度,计算滚动的目标位置,以及到达时间。 - - - - - - - 根据修改后的tweenChange重新计算减速时间。 - - - - - - - - - - - - - - - - - - - - 动效的名称。在编辑器里设定。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 设置动效是否自动播放。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TreeView使用的List对象 - - - - - TreeView的顶层节点,这是个虚拟节点,也就是他不会显示出来。 - - - - - TreeView每级的缩进,单位像素。 - - - - - 当TreeNode需要创建对象的显示对象时回调 - - - - - 当TreeNode需要更新时回调 - - - - - 当TreeNode即将展开或者收缩时回调。可以在回调中动态增加子节点。 - - - - - 点击任意TreeNode时触发 - - - - - 右键点击任意TreeNode时触发 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Global configs. These options should be set before any UI construction. - - - - - Dynamic Font Support. - set defaultFont to system font name(or names joint with comma). e.g. defaultFont="Microsoft YaHei, SimHei" - - - - - Resource using in Window.ShowModalWait for locking the window. - - - - - Resource using in GRoot.ShowModalWait for locking the screen. - - - - - When a modal window is in front, the background becomes dark. - - - - - Default button click sound. - - - - - Default button click sound volume. - - - - - Resource url of horizontal scrollbar - - - - - Resource url of vertical scrollbar - - - - - Scrolling step in pixels - 当调用ScrollPane.scrollUp/Down/Left/Right时,或者点击滚动条的上下箭头时,滑动的距离。 - 鼠标滚轮触发一次滚动的距离设定为defaultScrollStep*2 - - - - - Deceleration ratio of scrollpane when its in touch dragging. - 当手指拖动并释放滚动区域后,内容会滑动一定距离后停下,这个速率就是减速的速率。 - 越接近1,减速越慢,意味着滑动的时间和距离更长。 - 这个是全局设置,也可以通过ScrollPane.decelerationRate进行个性设置。 - - - - - Scrollbar display mode. Recommended 'Auto' for mobile and 'Visible' for web. - - - - - Allow dragging anywhere in container to scroll. - - - - - The "rebound" effect in the scolling container. - - - - - Resources url of PopupMenu. - - - - - Resource url of menu seperator. - - - - - In case of failure of loading content for GLoader, use this sign to indicate an error. - - - - - Resource url of tooltips. - - - - - The number of visible items in ComboBox. - - - - - Pixel offsets of finger to trigger scrolling - - - - - Pixel offsets of finger to trigger dragging - - - - - Pixel offsets of mouse pointer to trigger dragging. - - - - - Allow softness on top or left side for scrollpane. - - - - - When click the window, brings to front automatically. - - - - - - - - - - - - - - - - - - - - if RenderTexture using in paiting mode has depth support. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set content scale factor. - - Design resolution of x axis. - Design resolution of y axis. - - - - Set content scale factor. - - Design resolution of x axis. - Design resolution of y axis. - Match mode. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Package id. It is generated by the Editor, or set by customId. - - - - - Package name. - - - - - The path relative to the content folder. - - - - - Return a UIPackage with a certain id. - - ID of the package. - UIPackage - - - - Return a UIPackage with a certain name. - - Name of the package. - UIPackage - - - - Add a UI package from a path relative to Unity Resources path. - - Path relative to resources path. - UIPackage - - - - Remove a package. All resources in this package will be disposed. - - - - - - - - - - - - - - - - - - Create a UI object. - - Package name. - Resource name. - A UI object. - - - - Create a UI object. - - Package name. - Resource name. - Custom implementation of this object. - A UI object. - - - - Create a UI object. - - Resource url. - A UI object. - - - - Create a UI object. - - Resource url. - Custom implementation of this object. - A UI object. - - - - Get a asset with a certain name. - - Package name. - Resource name. - If resource is atlas, returns NTexture; If resource is sound, returns AudioClip. - - - - Get a asset with a certain name. - - Resource url. - If resource is atlas, returns NTexture; If resource is sound, returns AudioClip. - - - - Get url of an item in package. - - Package name. - Resource name. - Url. - - - - 将'ui://包名/组件名'转换为以内部id表达的url格式。如果传入的url本身就是内部id格式,则直接返回。 - 同时这个方法还带格式检测,如果传入不正确的url,会返回null。 - - - - - - - Set strings source. - - - - - - Set a custom id for package, then you can use it in GetById. - - - - - 获得本包依赖的包的id列表 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Window class. - 窗口使用前首先要设置窗口中需要显示的内容,这通常是在编辑器里制作好的,可以直接使用Window.contentPane进行设置。 - 建议把设置contentPane等初始化操作放置到Window.onInit方法中。 - 另外,FairyGUI还提供了一套机制用于窗口动态创建。动态创建是指初始时仅指定窗口需要使用的资源,等窗口需要显示时才实际开始构建窗口的内容。 - 首先需要在窗口的构造函数中调用Window.addUISource。这个方法需要一个IUISource类型的参数,而IUISource是一个接口, - 用户需要自行实现载入相关UI包的逻辑。当窗口第一次显示之前,IUISource的加载方法将会被调用,并等待载入完成后才返回执行Window.OnInit,然后窗口才会显示。 - - 如果你需要窗口显示时播放动画效果,那么覆盖doShowAnimation编写你的动画代码,并且在动画结束后调用onShown。覆盖onShown编写其他需要在窗口显示时处理的业务逻辑。 - 如果你需要窗口隐藏时播放动画效果,那么覆盖doHideAnimation编写你的动画代码,并且在动画结束时调用Window.hideImmediately(注意不是直接调用onHide!)。覆盖onHide编写其他需要在窗口隐藏时处理的业务逻辑。 - - - - - - - - - - Set a UISource to this window. It must call before the window is shown. When the window is first time to show, - UISource.Load is called. Only after all UISource is loaded, the window will continue to init. - 为窗口添加一个源。这个方法建议在构造函数调用。当窗口第一次显示前,UISource的Load方法将被调用,然后只有所有的UISource - 都ready后,窗口才会继续初始化和显示。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hide window immediately, no OnHide will be called. - - - - - Make the window be center of the screen. - - - Add relations to ensure keeping center on screen size changed. - - - - Switch show and hide status. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Display a modal waiting sign in the front. - 显示一个等待标志在最前面。等待标志的资源可以通过UIConfig.windowModalWaiting。等待标志组件会设置为屏幕大小,请内部做好关联。 - 还可以设定一个requestingCmd作为等待的命令字,在CloseModalWait里传入相同的命令字ModalWait将结束,否则CloseModalWait无效。 - - - - - - - - - - - - Close modal waiting. If rquestingCmd is equal to the value you transfer in ShowModalWait, mowal wait will be closed. - Otherwise, this function has no effect. - 关闭模式等待。如果requestingCmd和ShowModalWait传入的不相同,则这个函数没有任何动作,立即返回。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Determines whether floats are normalized to zero. If the minimal value is flushed to zero we use a slightly bigger number for Epsilon instead. - - - - - - - - - - A simplest and readonly XML class - - - - - - - - - - - - - - - - - - - - - - - - @interval in seconds - @repeat 0 indicate loop infinitely, otherwise the run count - - - - - Cancels a ticket. - You should cancel your ticket when you close the game or leave a server. - - - - - We're trying to connect! - - - - - Client is connected. They move from connecting to Connections - - - - - The connection has been closed remotely or disconnected locally. Check data.State for details. - - - - - Default behaviour is to accept every connection - - - - - Client is connected. They move from connecting to Connections - - - - - The connection has been closed remotely or disconnected locally. Check data.State for details. - - - - High level connection status - - - Dummy value used to indicate an error condition in the API. - Specified connection doesn't exist or has already been closed. - - - We are trying to establish whether peers can talk to each other, - whether they WANT to talk to each other, perform basic auth, - and exchange crypt keys. - - - For connections on the "client" side (initiated locally): - We're in the process of trying to establish a connection. - Depending on the connection type, we might not know who they are. - Note that it is not possible to tell if we are waiting on the - network to complete handshake packets, or for the application layer - to accept the connection. - - - For connections on the "server" side (accepted through listen socket): - We have completed some basic handshake and the client has presented - some proof of identity. The connection is ready to be accepted - using AcceptConnection(). - - In either case, any unreliable packets sent now are almost certain - to be dropped. Attempts to receive packets are guaranteed to fail. - You may send messages if the send mode allows for them to be queued. - but if you close the connection before the connection is actually - established, any queued messages will be discarded immediately. - (We will not attempt to flush the queue and confirm delivery to the - remote host, which ordinarily happens when a connection is closed.) - - - Some connection types use a back channel or trusted 3rd party - for earliest communication. If the server accepts the connection, - then these connections switch into the rendezvous state. During this - state, we still have not yet established an end-to-end route (through - the relay network), and so if you send any messages unreliable, they - are going to be discarded. - - - We've received communications from our peer (and we know - who they are) and are all good. If you close the connection now, - we will make our best effort to flush out any reliable sent data that - has not been acknowledged by the peer. (But note that this happens - from within the application process, so unlike a TCP connection, you are - not totally handing it off to the operating system to deal with it.) - - - Connection has been closed by our peer, but not closed locally. - The connection still exists from an API perspective. You must close the - handle to free up resources. If there are any messages in the inbound queue, - you may retrieve them. Otherwise, nothing may be done with the connection - except to close it. - - This stats is similar to CLOSE_WAIT in the TCP state machine. - - - A disruption in the connection has been detected locally. (E.g. timeout, - local internet connection disrupted, etc.) - - The connection still exists from an API perspective. You must close the - handle to free up resources. - - Attempts to send further messages will fail. Any remaining received messages - in the queue are available. - - - We've disconnected on our side, and from an API perspective the connection is closed. - No more data may be sent or received. All reliable data has been flushed, or else - we've given up and discarded it. We do not yet know for sure that the peer knows - the connection has been closed, however, so we're just hanging around so that if we do - get a packet from them, we can send them the appropriate packets so that they can - know why the connection was closed (and not have to rely on a timeout, which makes - it appear as if something is wrong). - - - We've disconnected on our side, and from an API perspective the connection is closed. - No more data may be sent or received. From a network perspective, however, on the wire, - we have not yet given any indication to the peer that the connection is closed. - We are in the process of flushing out the last bit of reliable data. Once that is done, - we will inform the peer that the connection has been closed, and transition to the - FinWait state. - - Note that no indication is given to the remote host that we have closed the connection, - until the data has been flushed. If the remote host attempts to send us data, we will - do whatever is necessary to keep the connection alive until it can be closed properly. - But in fact the data will be discarded, since there is no way for the application to - read it back. Typically this is not a problem, as application protocols that utilize - the lingering functionality are designed for the remote host to wait for the response - before sending any more data. - - - Connection is completely inactive and ready to be destroyed - - - - The score is just a simple numerical value - - - - - The score represents a time, in seconds - - - - - The score represents a time, in milliseconds - - - - - The top-score is the lowest number - - - - - The top-score is the highest number - - - - - Send the message unreliably. Can be lost. Messages *can* be larger than a - single MTU (UDP packet), but there is no retransmission, so if any piece - of the message is lost, the entire message will be dropped. - - The sending API does have some knowledge of the underlying connection, so - if there is no NAT-traversal accomplished or there is a recognized adjustment - happening on the connection, the packet will be batched until the connection - is open again. - - - - - Disable Nagle's algorithm. - By default, Nagle's algorithm is applied to all outbound messages. This means - that the message will NOT be sent immediately, in case further messages are - sent soon after you send this, which can be grouped together. Any time there - is enough buffered data to fill a packet, the packets will be pushed out immediately, - but partially-full packets not be sent until the Nagle timer expires. - - - - - If the message cannot be sent very soon (because the connection is still doing some initial - handshaking, route negotiations, etc), then just drop it. This is only applicable for unreliable - messages. Using this flag on reliable messages is invalid. - - - - Reliable message send. Can send up to 0.5mb in a single message. - Does fragmentation/re-assembly of messages under the hood, as well as a sliding window for - efficient sends of large chunks of data. - - - - True if unlocked - - - - - Should hold the unlock time if State is true - - - - - Gets the icon of the achievement. This can return a null image even though the image exists if the image - hasn't been downloaded by Steam yet. You can use GetIconAsync if you want to wait for the image to be downloaded. - - - - - Gets the icon of the achievement, waits for it to load if we have to - - - - - Returns the fraction (0-1) of users who have unlocked the specified achievement, or -1 if no data available. - - - - - Make this achievement earned - - - - - Reset this achievement to not achieved - - - - - Accept an incoming connection that has been received on a listen socket. - - - - - Disconnects from the remote host and invalidates the connection handle. Any unread data on the connection is discarded.. - reasonCode is defined and used by you. - - - - - Get/Set connection user data - - - - - A name for the connection, used mostly for debugging - - - - - Flush any messages waiting on the Nagle timer and send them at the next transmission opportunity (often that means right now). - - - - - the name of a leaderboard - - - - - Submit your score and replace your old score even if it was better - - - - - Submit your new score, but won't replace your high score if it's lower - - - - - Attaches a piece of user generated content the user's entry on a leaderboard - - - - - Used to query for a sequential range of leaderboard entries by leaderboard Sort. - - - - - Used to retrieve leaderboard entries relative a user's entry. If there are not enough entries in the leaderboard - before or after the user's entry, Steam will adjust the range to try to return the number of entries requested. - For example, if the user is #1 on the leaderboard and start is set to -2, end is set to 2, Steam will return the first - 5 entries in the leaderboard. If The current user has no entry, this will return null. - - - - - Used to retrieve all leaderboard entries for friends of the current user - - - - - Try to join this room. Will return RoomEnter.Success on success, - and anything else is a failure - - - - - Leave a lobby; this will take effect immediately on the client side - other users in the lobby will be notified by a LobbyChatUpdate_t callback - - - - - Invite another user to the lobby - will return true if the invite is successfully sent, whether or not the target responds - returns false if the local user is not connected to the Steam servers - - - - - returns the number of users in the specified lobby - - - - - Returns current members. Need to be in the lobby to see the users. - - - - - Get data associated with this lobby - - - - - Get data associated with this lobby - - - - - Removes a metadata key from the lobby - - - - - Get all data for this lobby - - - - - Gets per-user metadata for someone in this lobby - - - - - Sets per-user metadata (for the local user implicitly) - - - - - Sends a string to the chat room - - - - - Sends bytes the the chat room - this isn't exposed because there's no way to read raw bytes atm, - and I figure people can send json if they want something more advanced - - - - - Refreshes metadata for a lobby you're not necessarily in right now - you never do this for lobbies you're a member of, only if your - this will send down all the metadata associated with a lobby - this is an asynchronous call - returns false if the local user is not connected to the Steam servers - results will be returned by a LobbyDataUpdate_t callback - if the specified lobby doesn't exist, LobbyDataUpdate_t::m_bSuccess will be set to false - - - - - Max members able to join this lobby. Cannot be over 250. - Can only be set by the owner - - - - - You must be the lobby owner to set the owner - - - - - only lobbies in the same immediate region will be returned - - - - - only lobbies in the same immediate region will be returned - - - - - only lobbies in the same immediate region will be returned - - - - - returns only lobbies with the specified number of slots available - - - - - sets how many results to return, the lower the count the faster it is to download the lobby results - - - - - Run the query, get the matching lobbies - - - - - Any IP, specific port - - - - - Localhost IP, specific port - - - - - Specific IP, specific port - - - - - Specific IP, specific port - - - - - A server query packet. - - - - - Target IP address - - - - - Target port - - - - - This data is pooled. Make a copy if you don't use it immediately. - This buffer is also quite large - so pay attention to Size. - - - - - Size of the data - - - - - - Object that describes a "location" on the Internet with sufficient - detail that we can reasonably estimate an upper bound on the ping between - the two hosts, even if a direct route between the hosts is not possible, - and the connection must be routed through the Steam Datagram Relay network. - This does not contain any information that identifies the host. Indeed, - if two hosts are in the same building or otherwise have nearly identical - networking characteristics, then it's valid to use the same location - object for both of them. - - NOTE: This object should only be used in the same process! Do not serialize it, - send it over the wire, or persist it in a file or database! If you need - to do that, convert it to a string representation using the methods in - ISteamNetworkingUtils(). - - - - - Estimate the round-trip latency between two arbitrary locations, in - milliseconds. This is a conservative estimate, based on routing through - the relay network. For most basic relayed connections, this ping time - will be pretty accurate, since it will be based on the route likely to - be actually used. - - If a direct IP route is used (perhaps via NAT traversal), then the route - will be different, and the ping time might be better. Or it might actually - be a bit worse! Standard IP routing is frequently suboptimal! - - But even in this case, the estimate obtained using this method is a - reasonable upper bound on the ping time. (Also it has the advantage - of returning immediately and not sending any packets.) - - In a few cases we might not able to estimate the route. In this case - a negative value is returned. k_nSteamNetworkingPing_Failed means - the reason was because of some networking difficulty. (Failure to - ping, etc) k_nSteamNetworkingPing_Unknown is returned if we cannot - currently answer the question for some other reason. - - Do you need to be able to do this from a backend/matchmaking server? - You are looking for the "ticketgen" library. - - - - Tags a user as being visible in the screenshot - - - - - Tags a user as being visible in the screenshot - - - - - Tags a user as being visible in the screenshot - - - - - Gets the individual tags for this server - - - - - Add this server to our history list - If we're already in the history list, weill set the last played time to now - - - - - If this server responds to source engine style queries, we'll be able to get a list of rules here - - - - - Remove this server from our history list - - - - - Add this server to our favourite list - - - - - Remove this server from our favourite list - - - - - Destroy a listen socket. All the connections that were accepting on the listen - socket are closed ungracefully. - - - - - Which app we're querying. Defaults to the current app. - - - - - When a new server is added, this function will get called - - - - - Called for every responsive server - - - - - A list of servers that responded. If you're only interested in servers that responded since you - last updated, then simply clear this list. - - - - - A list of servers that were in the master list but didn't respond. - - - - - Query the server list. Task result will be true when finished - - - - - - Exposes a wide range of information and actions for applications and Downloadable Content (DLC). - - - - - posted after the user gains ownership of DLC and that DLC is installed - - - - - posted after the user gains executes a Steam URL with command line or query parameters - such as steam://run/appid//-commandline/?param1=value1(and)param2=value2(and)param3=value3 etc - while the game is already running. The new params can be queried - with GetLaunchQueryParam and GetLaunchCommandLine - - - - - Checks if the active user is subscribed to the current App ID - - - - - Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID - - - - - Checks if the license owned by the user provides low violence depots. - Low violence depots are useful for copies sold in countries that have content restrictions - - - - - Checks whether the current App ID license is for Cyber Cafes. - - - - - CChecks if the user has a VAC ban on their account - - - - - Gets the current language that the user has set. - This falls back to the Steam UI language if the user hasn't explicitly picked a language for the title. - - - - - Gets a list of the languages the current app supports. - - - - - Checks if the active user is subscribed to a specified AppId. - Only use this if you need to check ownership of another game related to yours, a demo for example. - - - - - Checks if the user owns a specific DLC and if the DLC is installed - - - - - Returns the time of the purchase of the app - - - - - Checks if the user is subscribed to the current app through a free weekend - This function will return false for users who have a retail or other type of license - Before using, please ask your Valve technical contact how to package and secure your free weekened - - - - - Returns metadata for all available DLC - - - - - Install/Uninstall control for optional DLC - - - - - Install/Uninstall control for optional DLC - - - - - Returns null if we're not on a beta branch, else the name of the branch - - - - - Allows you to force verify game content on next launch. - - If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a server), - you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit. - - - - - Gets a list of all installed depots for a given App ID in mount order - - - - - Gets the install folder for a specific AppID. - This works even if the application is not installed, based on where the game would be installed with the default Steam library location. - - - - - The app may not actually be owned by the current user, they may have it left over from a free weekend, etc. - - - - - Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed.. - - - - - Gets the associated launch parameter if the game is run via steam://run/appid/?param1=value1;param2=value2;param3=value3 etc. - Parameter names starting with the character '@' are reserved for internal use and will always return an empty string. - Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game, - but it is advised that you not param names beginning with an underscore for your own features. - - - - - Gets the download progress for optional DLC. - - - - - Gets the buildid of this app, may change at any time based on backend updates to the game. - Defaults to 0 if you're not running a build downloaded from steam. - - - - - Asynchronously retrieves metadata details about a specific file in the depot manifest. - Currently provides: - - - - - Get command line if game was launched via Steam URL, e.g. steam://run/appid//command line/. - This method of passing a connect string (used when joining via rich presence, accepting an - invite, etc) is preferable to passing the connect string on the operating system command - line, which is a security risk. In order for rich presence joins to go through this - path and not be placed on the OS command line, you must set a value in your app's - configuration on Steam. Ask Valve for help with this. - - - - - Checks if the current user's Steam client is connected to the Steam servers. - If it's not then no real-time services provided by the Steamworks API will be enabled. The Steam - client will automatically be trying to recreate the connection as often as possible. When the - connection is restored a SteamServersConnected_t callback will be posted. - You usually don't need to check for this yourself. All of the API calls that rely on this will - check internally. Forcefully disabling stuff when the player loses access is usually not a - very good experience for the player and you could be preventing them from accessing APIs that do not - need a live connection to Steam. - - - - - Gets the Steam ID of the account currently logged into the Steam client. This is - commonly called the 'current user', or 'local user'. - A Steam ID is a unique identifier for a Steam accounts, Steam groups, Lobbies and Chat - rooms, and used to differentiate users in all parts of the Steamworks API. - - - - - returns the local players name - guaranteed to not be NULL. - this is the same name as on the users community profile page - - - - - gets the status of the current user - - - - - returns the appID of the current process - - - - - Undocumented Parental Settings - - - - - Called when chat message has been received from a friend. You'll need to turn on - ListenForFriendsMessages to recieve this. (friend, msgtype, message) - - - - - called when a friends' status changes - - - - - Called when the user tries to join a game from their friends list - rich presence will have been set with the "connect" key which is set here - - - - - Posted when game overlay activates or deactivates - the game can use this to be pause or resume single player games - - - - - Called when the user tries to join a different game server from their friends list - game client should attempt to connect to specified server when this is received - - - - - Called when the user tries to join a lobby from their friends list - game client should attempt to connect to specified lobby when this is received - - - - - Callback indicating updated data about friends rich presence information - - - - - The dialog to open. Valid options are: - "friends", - "community", - "players", - "settings", - "officialgamegroup", - "stats", - "achievements". - - - - - "steamid" - Opens the overlay web browser to the specified user or groups profile. - "chat" - Opens a chat window to the specified user, or joins the group chat. - "jointrade" - Opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API. - "stats" - Opens the overlay web browser to the specified user's stats. - "achievements" - Opens the overlay web browser to the specified user's achievements. - "friendadd" - Opens the overlay in minimal mode prompting the user to add the target user as a friend. - "friendremove" - Opens the overlay in minimal mode prompting the user to remove the target friend. - "friendrequestaccept" - Opens the overlay in minimal mode prompting the user to accept an incoming friend invite. - "friendrequestignore" - Opens the overlay in minimal mode prompting the user to ignore an incoming friend invite. - - - - - Activates the Steam Overlay to the Steam store page for the provided app. - - - - - Activates Steam Overlay web browser directly to the specified URL. - - - - - Activates the Steam Overlay to open the invite dialog. Invitations sent from this dialog will be for the provided lobby. - - - - - Mark a target user as 'played with'. - NOTE: The current user must be in game with the other player for the association to work. - - - - - Requests the persona name and optionally the avatar of a specified user. - NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them. - returns true if we're fetching the data, false if we already have it - - - - - Find a rich presence value by key for current user. Will be null if not found. - - - - - Sets a rich presence value by key for current user. - - - - - Clears all of the current user's rich presence data. - - - - - Listens for Steam friends chat messages. - You can then show these chats inline in the game. For example with a Blizzard style chat message system or the chat system in Dota 2. - After enabling this you will receive callbacks when ever the user receives a chat message. - - - - - Undocumented Parental Settings - - - - - Call this if you're going to want to access definition information. You should be able to get - away with calling this once at the start if your game, assuming your items don't change all the time. - This will trigger OnDefinitionsUpdated at which point Definitions should be set. - - - - - Will call LoadItemDefinitions and wait until Definitions is not null - - - - - Try to find the definition that matches this definition ID. - Uses a dictionary so should be about as fast as possible. - - - - - We will try to keep this list of your items automatically up to date. - - - - - Update the list of Items[] - - - - - Get all items and return the InventoryResult - - - - - This is used to grant a specific item to the user. This should - only be used for development prototyping, from a trusted server, - or if you don't care about hacked clients granting arbitrary items. - This call can be disabled by a setting on Steamworks. - - - - - Crafting! Uses the passed items to buy the target item. - You need to have set up the appropriate exchange rules in your item - definitions. This assumes all the items passed in aren't stacked. - - - - - Crafting! Uses the passed items to buy the target item. - You need to have set up the appropriate exchange rules in your item - definitions. This assumes all the items passed in aren't stacked. - - - - - Deserializes a result set and verifies the signature bytes. - This call has a potential soft-failure mode where the Result is expired, it will - still succeed in this mode.The "expired" - result could indicate that the data may be out of date - not just due to timed - expiration( one hour ), but also because one of the items in the result set may - have been traded or consumed since the result set was generated.You could compare - the timestamp from GetResultTimestamp to ISteamUtils::GetServerRealTime to determine - how old the data is. You could simply ignore the "expired" result code and - continue as normal, or you could request the player with expired data to send - an updated result set. - You should call CheckResultSteamID on the result handle when it completes to verify - that a remote player is not pretending to have a different user's inventory. - - - - - Grant all promotional items the user is eligible for - - - - - Trigger an item drop for this user. This is for timed drops. - - - - - Trigger a promo item drop. You can call this at startup, it won't - give users multiple promo drops. - - - - - Start buying a cart load of items. This will return a positive result is the purchase has - begun. You should listen out for SteamUser.OnMicroTxnAuthorizationResponse for a success. - - - - - Functions for clients to access matchmaking services, favorites, and to operate on game lobbies - - - - - Someone invited you to a lobby - - - - - The lobby metadata has changed - - - - - The lobby member metadata has changed - - - - - The lobby member joined - - - - - The lobby member left the room - - - - - The lobby member left the room - - - - - The lobby member was kicked. The 3rd param is the user that kicked them. - - - - - The lobby member was banned. The 3rd param is the user that banned them. - - - - - A chat message was recieved from a member of a lobby - - - - - Creates a new invisible lobby. Call lobby.SetPublic to take it online. - - - - - Get a list of servers that are on your favorites list - - - - - Get a list of servers that you have added to your play history - - - - - Functions to control music playback in the steam client. - This gives games the opportunity to do things like pause the music or lower the volume, - when an important cut scene is shown, and start playing afterwards. - Nothing uses Steam Music though so this can probably get fucked - - - - - Playback status changed - - - - - Volume changed, parameter is new volume - - - - - Checks if Steam Music is enabled - - - - - true if a song is currently playing, paused, or queued up to play; otherwise false. - - - - - Gets the current status of the Steam Music player - - - - - Have the Steam Music player play the previous song. - - - - - Have the Steam Music player skip to the next song - - - - - Gets/Sets the current volume of the Steam Music player - - - - - This SteamId wants to send you a message. You should respond by calling AcceptP2PSessionWithUser - if you want to recieve their messages - - - - - Called when packets can't get through to the specified user. - All queued packets unsent at this point will be dropped, further attempts - to send will retry making the connection (but will be dropped if we fail again). - - - - - This should be called in response to a OnP2PSessionRequest - - - - - This should be called when you're done communicating with a user, as this will - free up all of the resources allocated for the connection under-the-hood. - If the remote user tries to send data to you again, a new OnP2PSessionRequest - callback will be posted - - - - - Checks if a P2P packet is available to read, and gets the size of the message if there is one. - - - - - Reads in a packet that has been sent from another user via SendP2PPacket.. - - - - - Sends a P2P packet to the specified user. - This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections. - NOTE: The first packet send may be delayed as the NAT-traversal code runs. - - - - - Creates a "server" socket that listens for clients to connect to by calling - Connect, over ordinary UDP (IPv4 or IPv6) - - - - - Connect to a socket created via CreateListenSocketIP - - - - - Creates a server that will be relayed via Valve's network (hiding the IP and improving ping) - - - - - Connect to a relay server - - - - - Undocumented Parental Settings - - - - - Return location info for the current host. - - It takes a few seconds to initialize access to the relay network. If - you call this very soon after startup the data may not be available yet. - - This always return the most up-to-date information we have available - right now, even if we are in the middle of re-calculating ping times. - - - - - Same as PingLocation.EstimatePingTo, but assumes that one location is the local host. - This is a bit faster, especially if you need to calculate a bunch of - these in a loop to find the fastest one. - - - - - If you need ping information straight away, wait on this. It will return - immediately if you already have up to date ping data - - - - - [0 - 100] - Randomly discard N pct of packets - - - - - [0 - 100] - Randomly discard N pct of packets - - - - - Delay all packets by N ms - - - - - Delay all packets by N ms - - - - - Undocumented Parental Settings - - - - - Parental Settings Changed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The list of possible Party beacon locations has changed - - - - - The list of active beacons may have changed - - - - - Undocumented Parental Settings - - - - - Creates a new file, writes the bytes to the file, and then closes the file. - If the target file already exists, it is overwritten - - - - - Opens a binary file, reads the contents of the file into a byte array, and then closes the file. - - - - - Checks whether the specified file exists. - - - - - Checks if a specific file is persisted in the steam cloud. - - - - - Gets the specified file's last modified date/time. - - - - - Gets the specified files size in bytes. 0 if not exists. - - - - - Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API. - - - - - Deletes a file from the local disk, and propagates that delete to the cloud. - - - - - Number of bytes total - - - - - Number of bytes used - - - - - Number of bytes remaining until your quota is used - - - - - returns true if IsCloudEnabledForAccount AND IsCloudEnabledForApp - - - - - Checks if the account wide Steam Cloud setting is enabled for this user - or if they disabled it in the Settings->Cloud dialog. - - - - - Checks if the per game Steam Cloud setting is enabled for this user - or if they disabled it in the Game Properties->Update dialog. - - This must only ever be set as the direct result of the user explicitly - requesting that it's enabled or not. This is typically accomplished with - a checkbox within your in-game options - - - - - Gets the total number of local files synchronized by Steam Cloud. - - - - - Get a list of filenames synchronized by Steam Cloud - - - - - Undocumented Parental Settings - - - - - A screenshot has been requested by the user from the Steam screenshot hotkey. - This will only be called if HookScreenshots has been enabled, in which case Steam - will not take the screenshot itself. - - - - - A screenshot successfully written or otherwise added to the library and can now be tagged. - - - - - A screenshot attempt failed - - - - - Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format. - The return value is a handle that is valid for the duration of the game process and can be used to apply tags. - - - - - Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio - as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format. - The return value is a handle that is valid for the duration of the game process and can be used to apply tags. - JPEG, TGA, and PNG formats are supported. - - - - - Causes the Steam overlay to take a screenshot. - If screenshots are being hooked by the game then a - ScreenshotRequested callback is sent back to the game instead. - - - - - Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them. - Hooking is disabled by default, and only ever enabled if you do so with this function. - If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the hotkey or - when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or AddScreenshotToLibrary in response. - - - - - Provides the core of the Steam Game Servers API - - - - - User has been authed or rejected - - - - - Called when a connections to the Steam back-end has been established. - This means the server now is logged on and has a working connection to the Steam master server. - - - - - This will occur periodically if the Steam client is not connected, and has failed when retrying to establish a connection (result, stilltrying) - - - - - Disconnected from Steam - - - - - Run the callbacks. This is also called in Async callbacks. - - - - - Sets whether this should be marked as a dedicated server. - If not, it is assumed to be a listen server. - - - - - Gets or sets the current MaxPlayers. - This doesn't enforce any kind of limit, it just updates the master server. - - - - - Gets or sets the current BotCount. - This doesn't enforce any kind of limit, it just updates the master server. - - - - - Gets or sets the current Map Name. - - - - - Gets or sets the current ModDir - - - - - Gets the current product - - - - - Gets or sets the current Product - - - - - Gets or sets the current ServerName - - - - - Set whether the server should report itself as passworded - - - - - Gets or sets the current GameTags. This is a comma seperated list of tags for this server. - When querying the server list you can filter by these tags. - - - - - Log onto Steam anonymously. - - - - - Log onto Steam anonymously. - - - - - Returns true if the server is connected and registered with the Steam master server - You should have called LogOnAnonymous etc on startup. - - - - - To the best of its ability this tries to get the server's - current public ip address. Be aware that this is likely to return - null for the first few seconds after initialization. - - - - - Enable or disable heartbeats, which are sent regularly to the master server. - Enabled by default. - - - - - Set heartbeat interval, if automatic heartbeats are enabled. - You can leave this at the default. - - - - - Force send a heartbeat to the master server instead of waiting - for the next automatic update (if you've left them enabled) - - - - - Update this connected player's information. You should really call this - any time a player's name or score changes. This keeps the information shown - to server queries up to date. - - - - - Sets a Key Value. These can be anything you like, and are accessible - when querying servers from the server list. - - Information describing gamemodes are common here. - - - - - Remove all key values - - - - - Start authorizing a ticket. This user isn't authorized yet. Wait for a call to OnAuthChange. - - - - - Forget this guy. They're no longer in the game. - - - - - If true, Steam wants to send a packet. You should respond by sending - this packet in an unconnected way to the returned Address and Port. - - Packet to send. The Data passed is pooled - so use it immediately. - True if we want to send a packet - - - - We have received a server query on our game port. Pass it to Steam to handle. - - - - - We have received a server query on our game port. Pass it to Steam to handle. - - - - - Downloads stats for the user - If the user has no stats will return fail - these stats will only be auto-updated for clients playing on the server - - - - - Set the named stat for this user. Setting stats should follow the rules - you defined in Steamworks. - - - - - Set the named stat for this user. Setting stats should follow the rules - you defined in Steamworks. - - - - - Get the named stat for this user. If getting the stat failed, will return - defaultValue. You should have called Refresh for this userid - which downloads - the stats from the backend. If you didn't call it this will always return defaultValue. - - - - - Get the named stat for this user. If getting the stat failed, will return - defaultValue. You should have called Refresh for this userid - which downloads - the stats from the backend. If you didn't call it this will always return defaultValue. - - - - - Unlocks the specified achievement for the specified user. Must have called Refresh on a steamid first. - Remember to use Commit after use. - - - - - Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid first. - Remember to use Commit after use. - - - - - Return true if available, exists and unlocked - - - - - Once you've set a stat change on a user you need to commit your changes. - You can do that using this function. The callback will let you know if - your action succeeded, but most of the time you can fire and forget. - - - - - Functions for accessing and manipulating Steam user information. - This is also where the APIs for Steam Voice are exposed. - - - - - Utility function to fetch a single item. Internally this uses Ugc.FileQuery - - which you can use to query multiple items if you need to. - - - - - Functions for accessing and manipulating Steam user information. - This is also where the APIs for Steam Voice are exposed. - - - - - Called when a connections to the Steam back-end has been established. - This means the Steam client now has a working connection to the Steam servers. - Usually this will have occurred before the game has launched, and should only be seen if the - user has dropped connection due to a networking issue or a Steam server update. - - - - - Called when a connection attempt has failed. - This will occur periodically if the Steam client is not connected, - and has failed when retrying to establish a connection. - - - - - Called if the client has lost connection to the Steam servers. - Real-time services will be disabled until a matching OnSteamServersConnected has been posted. - - - - - Sent by the Steam server to the client telling it to disconnect from the specified game server, - which it may be in the process of or already connected to. - The game client should immediately disconnect upon receiving this message. - This can usually occur if the user doesn't have rights to play on the game server. - - - - - Called whenever the users licenses (owned packages) changes. - - - - - Called when an auth ticket has been validated. - The first parameter is the steamid of this user - The second is the Steam ID that owns the game, this will be different from the first - if the game is being borrowed via Steam Family Sharing - - - - - Used internally for GetAuthSessionTicketAsync - - - - - Called when a user has responded to a microtransaction authorization request. - ( appid, orderid, user authorized ) - - - - - Sent to your game in response to a steam://gamewebcallback/ command from a user clicking a link in the Steam overlay browser. - You can use this to add support for external site signups where you want to pop back into the browser after some web page - signup sequence, and optionally get back some detail about that. - - - - - Starts/Stops voice recording. - Once started, use GetAvailableVoice and GetVoice to get the data, and then call StopVoiceRecording - when the user has released their push-to-talk hotkey or the game session has completed. - - - - - Returns true if we have voice data waiting to be read - - - - - Reads the voice data and returns the number of bytes written. - The compressed data can be transmitted by your application and decoded back into raw audio data using - DecompressVoice on the other side. The compressed data provided is in an arbitrary format and is not meant to be played directly. - This should be called once per frame, and at worst no more than four times a second to keep the microphone input delay as low as - possible. Calling this any less may result in gaps in the returned stream. - - - - - Reads the voice data and returns the bytes. You should obviously ideally be using - ReadVoiceData because it won't be creating a new byte array every call. But this - makes it easier to get it working, so let the babies have their bottle. - - - - - Decodes the compressed voice data returned by GetVoice. - The output data is raw single-channel 16-bit PCM audio.The decoder supports any sample rate from 11025 to 48000. - - - - - Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you. - - - - - Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you. - This waits for a positive response from the backend before returning the ticket. This means - the ticket is definitely ready to go as soon as it returns. Will return null if the callback - times out or returns negatively. - - - - - Checks if the current users looks like they are behind a NAT device. - This is only valid if the user is connected to the Steam servers and may not catch all forms of NAT. - - - - - Gets the Steam level of the user, as shown on their Steam community profile. - - - - - Requests a URL which authenticates an in-game browser for store check-out, and then redirects to the specified URL. - As long as the in-game browser accepts and handles session cookies, Steam microtransaction checkout pages will automatically recognize the user instead of presenting a login page. - NOTE: The URL has a very short lifetime to prevent history-snooping attacks, so you should only call this API when you are about to launch the browser, or else immediately navigate to the result URL using a hidden browser window. - NOTE: The resulting authorization cookie has an expiration time of one day, so it would be a good idea to request and visit a new auth URL every 12 hours. - - - - - Checks whether the current user has verified their phone number. - - - - - Checks whether the current user has Steam Guard two factor authentication enabled on their account. - - - - - Checks whether the user's phone number is used to uniquely identify them. - - - - - Checks whether the current user's phone number is awaiting (re)verification. - - - - - Requests an application ticket encrypted with the secret "encrypted app ticket key". - The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app. - There can only be one call pending, and this call is subject to a 60 second rate limit. - This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/ - - - - - Requests an application ticket encrypted with the secret "encrypted app ticket key". - The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app. - There can only be one call pending, and this call is subject to a 60 second rate limit. - This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/ - - - - - called when the achivement icon is loaded - - - - - called when the latests stats and achievements have been received - from the server - - - - - result of a request to store the user stats for a game - - - - - result of a request to store the achievements for a game, or an - "indicate progress" call. If both m_nCurProgress and m_nMaxProgress - are zero, that means the achievement has been fully unlocked - - - - - Callback indicating that a user's stats have been unloaded - - - - - Get the available achievements - - - - - Tries to get the number of players currently playing this game. - Or -1 if failed. - - - - - Send the changed stats and achievements data to the server for permanent storage. - If this fails then nothing is sent to the server. It's advisable to keep trying until the call is successful. - This call can be rate limited. Call frequency should be on the order of minutes, rather than seconds.You should only be calling this during major state changes such as the end of a round, the map changing, or the user leaving a server. This call is required to display the achievement unlock notification dialog though, so if you have called SetAchievement then it's advisable to call this soon after that. - If you have stats or achievements that you have saved locally but haven't uploaded with this function when your application process ends then this function will automatically be called. - You can find additional debug information written to the %steam_install%\logs\stats_log.txt file. - This function returns true upon success if : - RequestCurrentStats has completed and successfully returned its callback AND - the current game has stats associated with it in the Steamworks Partner backend, and those stats are published. - - - - - Asynchronously request the user's current stats and achievements from the server. - You must always call this first to get the initial status of stats and achievements. - Only after the resulting callback comes back can you start calling the rest of the stats - and achievement functions for the current user. - - - - - Gets a leaderboard by name, it will create it if it's not yet created. - Leaderboards created with this function will not automatically show up in the Steam Community. - You must manually set the Community Name field in the App Admin panel of the Steamworks website. - As such it's generally recommended to prefer creating the leaderboards in the App Admin panel on - the Steamworks website and using FindLeaderboard unless you're expected to have a large amount of - dynamically created leaderboards. - - - - - Adds this amount to the named stat. Internally this calls Get() and adds - to that value. Steam doesn't provide a mechanism for atomically increasing - stats like this, this functionality is added here as a convenience. - - - - - Adds this amount to the named stat. Internally this calls Get() and adds - to that value. Steam doesn't provide a mechanism for atomically increasing - stats like this, this functionality is added here as a convenience. - - - - - Set a stat value. This will automatically call StoreStats() after a successful call - unless you pass false as the last argument. - - - - - Set a stat value. This will automatically call StoreStats() after a successful call - unless you pass false as the last argument. - - - - - Get a Int stat value - - - - - Get a float stat value - - - - - Practically wipes the slate clean for this user. If includeAchievements is true, will wipe - any achievements too. - - - - - - Interface which provides access to a range of miscellaneous utility functions - - - - - The country of the user changed - - - - - Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute - The parameter is the number of minutes left - - - - - Called when Steam wants to shutdown - - - - - Big Picture gamepad text input has been closed. Parameter is true if text was submitted, false if cancelled etc. - - - - - Returns the number of seconds since the application was active - - - - - Returns the number of seconds since the user last moved the mouse etc - - - - - Steam server time. Number of seconds since January 1, 1970, GMT (i.e unix time) - - - - - returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database) - e.g "US" or "UK". - - - - - returns true if the image exists, and the buffer was successfully filled out - results are returned in RGBA format - the destination buffer size should be 4 * height * width * sizeof(char) - - - - - returns the image in RGBA format - - - - - Returns true if we're using a battery (ie, a laptop not plugged in) - - - - - Returns battery power [0-1] - - - - - Sets the position where the overlay instance for the currently calling game should show notifications. - This position is per-game and if this function is called from outside of a game context it will do nothing. - - - - - Returns true if the overlay is running and the user can access it. The overlay process could take a few seconds to - start and hook the game process, so this function will initially return false while the overlay is loading. - - - - - Normally this call is unneeded if your game has a constantly running frame loop that calls the - D3D Present API, or OGL SwapBuffers API every frame. - - However, if you have a game that only refreshes the screen on an event driven basis then that can break - the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also - need to Present() to the screen any time an even needing a notification happens or when the overlay is - brought up over the game by a user. You can use this API to ask the overlay if it currently need a present - in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you - refresh the screen with Present or SwapBuffers to allow the overlay to do it's work. - - - - - Asynchronous call to check if an executable file has been signed using the public key set on the signing tab - of the partner site, for example to refuse to load modified executable files. - - - - - Activates the Big Picture text input dialog which only supports gamepad input - - - - - Returns previously entered text - - - - - returns the language the steam client is running in, you probably want - Apps.CurrentGameLanguage instead, this is for very special usage cases - - - - - returns true if Steam itself is running in VR mode - - - - - Sets the inset of the overlay notification from the corner specified by SetOverlayNotificationPosition - - - - - returns true if Steam and the Steam Overlay are running in Big Picture mode - Games much be launched through the Steam client to enable the Big Picture overlay. During development, - a game can be added as a non-steam game to the developers library to test this feature - - - - - ask SteamUI to create and render its OpenVR dashboard - - - - - Set whether the HMD content will be streamed via Steam In-Home Streaming - If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed. - If this is set to false, then the application window will be streamed instead, and remote input will be allowed. - The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game. - (this is useful for games that have asymmetric multiplayer gameplay) - - - - - Undocumented Parental Settings - - - - - Return true if currently using Steam's live broadcasting - - - - - If we're broadcasting, will return the number of live viewers - - - - - Returns true if this is the local user - - - - - Return true if this is a friend - - - - - Returns true if you have this user blocked - - - - - Return true if this user is playing the game we're running - - - - - Returns true if this friend is online - - - - - Sometimes we don't know the user's name. This will wait until we have - downloaded the information on this user. - - - - - Returns true if this friend is marked as away - - - - - Returns true if this friend is marked as busy - - - - - Returns true if this friend is marked as snoozing - - - - - Invite this friend to the game that we are playing - - - - - Sends a message to a Steam friend. Returns true if success - - - - - Shortcut to call GetProperty( "name" ) - - - - - Shortcut to call GetProperty( "description" ) - - - - - Shortcut to call GetProperty( "icon_url" ) - - - - - Shortcut to call GetProperty( "icon_url_large" ) - - - - - Shortcut to call GetProperty( "price_category" ) - - - - - Shortcut to call GetProperty( "type" ) - - - - - Returns true if this is an item that generates an item, rather - than something that is actual an item - - - - - Shortcut to call GetProperty( "exchange" ) - - - - - Get a list of exchanges that are available to make this item - - - - - Shortcut to call GetBoolProperty( "marketable" ) - - - - - Shortcut to call GetBoolProperty( "tradable" ) - - - - - Gets the property timestamp - - - - - Gets the property modified - - - - - Get a specific property by name - - - - - Read a raw property from the definition schema - - - - - Read a raw property from the definition schema - - - - - Gets a list of all properties on this item - - - - - Returns the price of this item in the local currency (SteamInventory.Currency) - - - - - If the price has been discounted, LocalPrice will differ from LocalBasePrice - (assumed, this isn't documented) - - - - - Return a list of recepies that contain this item - - - - - Only available if the result set was created with the getproperties - - - - - This item is account-locked and cannot be traded or given away. - This is an item status flag which is permanently attached to specific item instances - - - - - The item has been destroyed, traded away, expired, or otherwise invalidated. - This is an action confirmation flag which is only set one time, as part of a result set. - - - - - The item quantity has been decreased by 1 via ConsumeItem API. - This is an action confirmation flag which is only set one time, as part of a result set. - - - - - Consumes items from a user's inventory. If the quantity of the given item goes to zero, it is permanently removed. - Once an item is removed it cannot be recovered.This is not for the faint of heart - if your game implements item removal at all, - a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain item definitions or fully - blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother borrowed my laptop and deleted all of my rare items". - - - - - Split stack into two items - - - - - Add x units of the target item to this item - - - - - Will try to return the date that this item was aquired. You need to have for the items - with their properties for this to work. - - - - - Tries to get the origin property. Need properties for this to work. - Will return a string like "market" - - - - - Small utility class to describe an item with a quantity - - - - - A structured description of an item exchange - - - - - The definition ID of the ingredient. - - - - - If we don't know about this item definition this might be null. - In which case, DefinitionId should still hold the correct id. - - - - - The amount of this item needed. Generally this will be 1. - - - - - The item that this will create. - - - - - The items, with quantity required to create this item. - - - - - Checks whether an inventory result handle belongs to the specified Steam ID. - This is important when using Deserialize, to verify that a remote player is not pretending to have a different user's inventory - - - - - Serialized result sets contain a short signature which can't be forged or replayed across different game sessions. - A result set can be serialized on the local client, transmitted to other players via your game networking, and - deserialized by the remote players.This is a secure way of preventing hackers from lying about posessing - rare/high-value items. Serializes a result set with signature bytes to an output buffer.The size of a serialized - result depends on the number items which are being serialized.When securely transmitting items to other players, - it is recommended to use GetItemsByID first to create a minimal result set. - Results have a built-in timestamp which will be considered "expired" after an hour has elapsed.See DeserializeResult - for expiration handling. - - - - - Creator of the beacon - - - - - Creator of the beacon - - - - - Will attempt to join the party. If successful will return a connection string. - If failed, will return null - - - - - When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your game a ReservationNotification callback. - When that user joins your party, call OnReservationCompleted to notify Steam that the user has joined successfully - - - - - To cancel a reservation (due to timeout or user input), call this. - Steam will open a new reservation slot. - Note: The user may already be in-flight to your game, so it's possible they will still connect and try to join your party. - - - - - Turn off the beacon - - - - - Used to set up the server. - The variables in here are all required to be set, and can't be changed once the server is created. - - - - - The version string is usually in the form x.x.x.x, and is used by the master server to detect when the server is out of date. - If you go into the dedicated server tab on steamworks you'll be able to server the latest version. If this version number is - less than that latest version then your server won't show. - - - - - This should be the same directory game where gets installed into. Just the folder name, not the whole path. I.e. "Rust", "Garrysmod". - - - - - The game description. Setting this to the full name of your game is recommended. - - - - - Is a dedicated server - - - - - Set the Steam quert port - - - - - If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE into usQueryPort, then it causes the game server API to use - "GameSocketShare" mode, which means that the game is responsible for sending and receiving UDP packets for the master - server updater. - - More info about this here: https://partner.steamgames.com/doc/api/ISteamGameServer#HandleIncomingPacket - - - - - Create a Normal Workshop item that can be subscribed to - - - - - Workshop item that is meant to be voted on for the purpose of selling in-game - - - - - https://partner.steamgames.com/doc/features/workshop/implementation#Legal - - - - - The actual ID of this file - - - - - The given title of this item - - - - - The description of this item, in your local language if available - - - - - A list of tags for this item, all lowercase - - - - - App Id of the app that created this item - - - - - App Id of the app that will consume this item. - - - - - User who created this content - - - - - The bayesian average for up votes / total votes, between [0,1] - - - - - Time when the published item was created - - - - - Time when the published item was last updated - - - - - True if this is publically visible - - - - - True if this item is only visible by friends of the creator - - - - - True if this is only visible to the creator - - - - - True if this item has been banned - - - - - Whether the developer of this app has specifically flagged this item as accepted in the Workshop - - - - - Start downloading this item. - If this returns false the item isn#t getting downloaded. - - - - - A case insensitive check for tag - - - - - Allows the user to rate a workshop item up or down. - - - - - Return a URL to view this item online - - - - - The URl to view this item's changelog - - - - - The URL to view the comments on this item - - - - - The URL to discuss this item - - - - - The URL to view this items stats online - - - - - The URL to the preview image for this item - - - - - Edit this item - - - - - Found items must have at least one of the defined tags - - - - - Found items must have all defined tags - - - - - Returns the current Unix Epoch - - - - - Convert an epoch to a datetime - - - - - Convert a DateTime to a unix time - - - - - Returns a StringBuilder. This will get returned and reused later on. - - - - - Returns a StringBuilder. This will get returned and reused later on. - - -
-
diff --git a/Editor/CLEngine.Editor/Project Templates/CLEngine.Windows.csproj b/Editor/CLEngine.Editor/Project Templates/CLEngine.Windows.csproj deleted file mode 100644 index 519bfcf67607bbc0e5daedf483ac03d9c7f6529f..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/CLEngine.Windows.csproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - x86 - Library - Properties - Scripts - Scripts - DesktopGL - v4.7.2 - - - AnyCPU - - - bin\Debug\ - True - Full - False - True - DEBUG;TRACE - - - bin\Release\ - False - None - True - False - TRACE - - - AnyCPU - - - bin\Debug\ - True - Full - False - True - DEBUG;TRACE - - - bin\Release\ - False - None - True - False - TRACE - - - - - False - MonoGame.Framework.dll - - - CLEngine.Core.dll - - - - - - 4.0 - - - 4.0 - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/Project Templates/CLEngine.Windows.exe b/Editor/CLEngine.Editor/Project Templates/CLEngine.Windows.exe deleted file mode 100644 index 2ab75f6e0796a9daa987d271d76de7f13706264d..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/CLEngine.Windows.exe and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/CLEngine.Windows.exe.config b/Editor/CLEngine.Editor/Project Templates/CLEngine.Windows.exe.config deleted file mode 100644 index ecdcf8a54da312b76ada87a3054152b813ce1f9d..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/CLEngine.Windows.exe.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Editor/CLEngine.Editor/Project Templates/Content/Content.mgcb b/Editor/CLEngine.Editor/Project Templates/Content/Content.mgcb deleted file mode 100644 index 182bf8ac484724e01eb94f4079cc993c7d6b2e23..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/Content/Content.mgcb +++ /dev/null @@ -1,15 +0,0 @@ - -#----------------------------- Global Properties ----------------------------# - -/outputDir:bin -/intermediateDir:obj -/platform:DesktopGL -/config: -/profile:Reach -/compress:True - -#-------------------------------- References --------------------------------# - - -#---------------------------------- Content ---------------------------------# - diff --git a/Editor/CLEngine.Editor/Project Templates/Content/FairyGUI.xnb b/Editor/CLEngine.Editor/Project Templates/Content/FairyGUI.xnb deleted file mode 100644 index 3c2d270d9792b390f31fa1f91c99125e4d69d8b3..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/Content/FairyGUI.xnb and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/GameProject.sln b/Editor/CLEngine.Editor/Project Templates/GameProject.sln deleted file mode 100644 index f746c7cc7cf06f9c9f93f2dd0fc89542cac78793..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/GameProject.sln +++ /dev/null @@ -1,21 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -# SharpDevelop 4.3 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{%P_NAME%}", "Scripts.csproj", "{7E75DE74-3DC2-48C0-A888-D29813424CAF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7E75DE74-3DC2-48C0-A888-D29813424CAF}.Debug|Any CPU.ActiveCfg = Debug|x86 - {7E75DE74-3DC2-48C0-A888-D29813424CAF}.Debug|Any CPU.Build.0 = Debug|x86 - {7E75DE74-3DC2-48C0-A888-D29813424CAF}.Release|Any CPU.ActiveCfg = Release|x86 - {7E75DE74-3DC2-48C0-A888-D29813424CAF}.Release|Any CPU.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Editor/CLEngine.Editor/Project Templates/KeraLua.dll b/Editor/CLEngine.Editor/Project Templates/KeraLua.dll deleted file mode 100644 index ddffbe692d3db15516177512ee200d11b775aa37..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/KeraLua.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/Lidgren.Network.dll b/Editor/CLEngine.Editor/Project Templates/Lidgren.Network.dll deleted file mode 100644 index 6efd5428180c78a5f179a80bd1b8427115fe5196..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/Lidgren.Network.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/MonoGame.Framework.dll b/Editor/CLEngine.Editor/Project Templates/MonoGame.Framework.dll deleted file mode 100644 index f1468c213592cadd477fdf741d21d632e35baccb..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/MonoGame.Framework.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/MonoGame.Framework.dll.config b/Editor/CLEngine.Editor/Project Templates/MonoGame.Framework.dll.config deleted file mode 100644 index 09710ae4612160fda053f7e7146e98962d947c4a..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/MonoGame.Framework.dll.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/Editor/CLEngine.Editor/Project Templates/MonoGame.Framework.xml b/Editor/CLEngine.Editor/Project Templates/MonoGame.Framework.xml deleted file mode 100644 index f9e606ed49d3a5d852498988608a5e0d6093e334..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/MonoGame.Framework.xml +++ /dev/null @@ -1,18532 +0,0 @@ - - - - MonoGame.Framework - - - - - Create a bounding box from the given list of points. - - The list of Vector3 instances defining the point cloud to bound - A bounding box that encapsulates the given point cloud. - Thrown if the given list has no points. - - - - Deconstruction method for . - - - - - - - Defines a viewing frustum for intersection operations. - - - - - The number of planes in the frustum. - - - - - The number of corner points in the frustum. - - - - - Gets or sets the of the frustum. - - - - - Gets the near plane of the frustum. - - - - - Gets the far plane of the frustum. - - - - - Gets the left plane of the frustum. - - - - - Gets the right plane of the frustum. - - - - - Gets the top plane of the frustum. - - - - - Gets the bottom plane of the frustum. - - - - - Constructs the frustum by extracting the view planes from a matrix. - - Combined matrix which usually is (View * Projection). - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Containment test between this and specified . - - A for testing. - Result of testing for containment between this and specified . - - - - Containment test between this and specified . - - A for testing. - Result of testing for containment between this and specified as an output parameter. - - - - Containment test between this and specified . - - A for testing. - Result of testing for containment between this and specified . - - - - Containment test between this and specified . - - A for testing. - Result of testing for containment between this and specified . - - - - Containment test between this and specified . - - A for testing. - Result of testing for containment between this and specified as an output parameter. - - - - Containment test between this and specified . - - A for testing. - Result of testing for containment between this and specified . - - - - Containment test between this and specified . - - A for testing. - Result of testing for containment between this and specified as an output parameter. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Returns a copy of internal corners array. - - The array of corners. - - - - Returns a copy of internal corners array. - - The array which values will be replaced to corner values of this instance. It must have size of . - - - - Gets the hash code of this . - - Hash code of this . - - - - Gets whether or not a specified intersects with this . - - A for intersection test. - true if specified intersects with this ; false otherwise. - - - - Gets whether or not a specified intersects with this . - - A for intersection test. - true if specified intersects with this ; false otherwise as an output parameter. - - - - Gets whether or not a specified intersects with this . - - An other for intersection test. - true if other intersects with this ; false otherwise. - - - - Gets whether or not a specified intersects with this . - - A for intersection test. - true if specified intersects with this ; false otherwise. - - - - Gets whether or not a specified intersects with this . - - A for intersection test. - true if specified intersects with this ; false otherwise as an output parameter. - - - - Gets type of intersection between specified and this . - - A for intersection test. - A plane intersection type. - - - - Gets type of intersection between specified and this . - - A for intersection test. - A plane intersection type as an output parameter. - - - - Gets the distance of intersection of and this or null if no intersection happens. - - A for intersection test. - Distance at which ray intersects with this or null if no intersection happens. - - - - Gets the distance of intersection of and this or null if no intersection happens. - - A for intersection test. - Distance at which ray intersects with this or null if no intersection happens as an output parameter. - - - - Returns a representation of this in the format: - {Near:[nearPlane] Far:[farPlane] Left:[leftPlane] Right:[rightPlane] Top:[topPlane] Bottom:[bottomPlane]} - - representation of this . - - - - Describes a sphere in 3D-space for bounding operations. - - - - - The sphere center. - - - - - The sphere radius. - - - - - Constructs a bounding sphere with the specified center and radius. - - The sphere center. - The sphere radius. - - - - Test if a bounding box is fully inside, outside, or just intersecting the sphere. - - The box for testing. - The containment type. - - - - Test if a bounding box is fully inside, outside, or just intersecting the sphere. - - The box for testing. - The containment type as an output parameter. - - - - Test if a frustum is fully inside, outside, or just intersecting the sphere. - - The frustum for testing. - The containment type. - - - - Test if a frustum is fully inside, outside, or just intersecting the sphere. - - The frustum for testing. - The containment type as an output parameter. - - - - Test if a sphere is fully inside, outside, or just intersecting the sphere. - - The other sphere for testing. - The containment type. - - - - Test if a sphere is fully inside, outside, or just intersecting the sphere. - - The other sphere for testing. - The containment type as an output parameter. - - - - Test if a point is fully inside, outside, or just intersecting the sphere. - - The vector in 3D-space for testing. - The containment type. - - - - Test if a point is fully inside, outside, or just intersecting the sphere. - - The vector in 3D-space for testing. - The containment type as an output parameter. - - - - Creates the smallest that can contain a specified . - - The box to create the sphere from. - The new . - - - - Creates the smallest that can contain a specified . - - The box to create the sphere from. - The new as an output parameter. - - - - Creates the smallest that can contain a specified . - - The frustum to create the sphere from. - The new . - - - - Creates the smallest that can contain a specified list of points in 3D-space. - - List of point to create the sphere from. - The new . - - - - Creates the smallest that can contain two spheres. - - First sphere. - Second sphere. - The new . - - - - Creates the smallest that can contain two spheres. - - First sphere. - Second sphere. - The new as an output parameter. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Gets the hash code of this . - - Hash code of this . - - - - Gets whether or not a specified intersects with this sphere. - - The box for testing. - true if intersects with this sphere; false otherwise. - - - - Gets whether or not a specified intersects with this sphere. - - The box for testing. - true if intersects with this sphere; false otherwise. As an output parameter. - - - - Gets whether or not the other intersects with this sphere. - - The other sphere for testing. - true if other intersects with this sphere; false otherwise. - - - - Gets whether or not the other intersects with this sphere. - - The other sphere for testing. - true if other intersects with this sphere; false otherwise. As an output parameter. - - - - Gets whether or not a specified intersects with this sphere. - - The plane for testing. - Type of intersection. - - - - Gets whether or not a specified intersects with this sphere. - - The plane for testing. - Type of intersection as an output parameter. - - - - Gets whether or not a specified intersects with this sphere. - - The ray for testing. - Distance of ray intersection or null if there is no intersection. - - - - Gets whether or not a specified intersects with this sphere. - - The ray for testing. - Distance of ray intersection or null if there is no intersection as an output parameter. - - - - Returns a representation of this in the format: - {Center:[] Radius:[]} - - A representation of this . - - - - Creates a new that contains a transformation of translation and scale from this sphere by the specified . - - The transformation . - Transformed . - - - - Creates a new that contains a transformation of translation and scale from this sphere by the specified . - - The transformation . - Transformed as an output parameter. - - - - Deconstruction method for . - - - - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Describes a 32-bit packed color. - - - - - Constructs an RGBA color from a packed value. - The value is a 32-bit unsigned integer, with R in the least significant octet. - - The packed value. - - - - Constructs an RGBA color from the XYZW unit length components of a vector. - - A representing color. - - - - Constructs an RGBA color from the XYZ unit length components of a vector. Alpha value will be opaque. - - A representing color. - - - - Constructs an RGBA color from a and an alpha value. - - A for RGB values of new instance. - The alpha component value from 0 to 255. - - - - Constructs an RGBA color from color and alpha value. - - A for RGB values of new instance. - Alpha component value from 0.0f to 1.0f. - - - - Constructs an RGBA color from scalars representing red, green and blue values. Alpha value will be opaque. - - Red component value from 0.0f to 1.0f. - Green component value from 0.0f to 1.0f. - Blue component value from 0.0f to 1.0f. - - - - Constructs an RGBA color from scalars representing red, green, blue and alpha values. - - Red component value from 0.0f to 1.0f. - Green component value from 0.0f to 1.0f. - Blue component value from 0.0f to 1.0f. - Alpha component value from 0.0f to 1.0f. - - - - Constructs an RGBA color from scalars representing red, green and blue values. Alpha value will be opaque. - - Red component value from 0 to 255. - Green component value from 0 to 255. - Blue component value from 0 to 255. - - - - Constructs an RGBA color from scalars representing red, green, blue and alpha values. - - Red component value from 0 to 255. - Green component value from 0 to 255. - Blue component value from 0 to 255. - Alpha component value from 0 to 255. - - - - Constructs an RGBA color from scalars representing red, green, blue and alpha values. - - - This overload sets the values directly without clamping, and may therefore be faster than the other overloads. - - - - - - - - - Gets or sets the blue component. - - - - - Gets or sets the green component. - - - - - Gets or sets the red component. - - - - - Gets or sets the alpha component. - - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Gets the hash code of this . - - Hash code of this . - - - - Compares whether current instance is equal to specified object. - - The to compare. - true if the instances are equal; false otherwise. - - - - TransparentBlack color (R:0,G:0,B:0,A:0). - - - - - Transparent color (R:0,G:0,B:0,A:0). - - - - - AliceBlue color (R:240,G:248,B:255,A:255). - - - - - AntiqueWhite color (R:250,G:235,B:215,A:255). - - - - - Aqua color (R:0,G:255,B:255,A:255). - - - - - Aquamarine color (R:127,G:255,B:212,A:255). - - - - - Azure color (R:240,G:255,B:255,A:255). - - - - - Beige color (R:245,G:245,B:220,A:255). - - - - - Bisque color (R:255,G:228,B:196,A:255). - - - - - Black color (R:0,G:0,B:0,A:255). - - - - - BlanchedAlmond color (R:255,G:235,B:205,A:255). - - - - - Blue color (R:0,G:0,B:255,A:255). - - - - - BlueViolet color (R:138,G:43,B:226,A:255). - - - - - Brown color (R:165,G:42,B:42,A:255). - - - - - BurlyWood color (R:222,G:184,B:135,A:255). - - - - - CadetBlue color (R:95,G:158,B:160,A:255). - - - - - Chartreuse color (R:127,G:255,B:0,A:255). - - - - - Chocolate color (R:210,G:105,B:30,A:255). - - - - - Coral color (R:255,G:127,B:80,A:255). - - - - - CornflowerBlue color (R:100,G:149,B:237,A:255). - - - - - Cornsilk color (R:255,G:248,B:220,A:255). - - - - - Crimson color (R:220,G:20,B:60,A:255). - - - - - Cyan color (R:0,G:255,B:255,A:255). - - - - - DarkBlue color (R:0,G:0,B:139,A:255). - - - - - DarkCyan color (R:0,G:139,B:139,A:255). - - - - - DarkGoldenrod color (R:184,G:134,B:11,A:255). - - - - - DarkGray color (R:169,G:169,B:169,A:255). - - - - - DarkGreen color (R:0,G:100,B:0,A:255). - - - - - DarkKhaki color (R:189,G:183,B:107,A:255). - - - - - DarkMagenta color (R:139,G:0,B:139,A:255). - - - - - DarkOliveGreen color (R:85,G:107,B:47,A:255). - - - - - DarkOrange color (R:255,G:140,B:0,A:255). - - - - - DarkOrchid color (R:153,G:50,B:204,A:255). - - - - - DarkRed color (R:139,G:0,B:0,A:255). - - - - - DarkSalmon color (R:233,G:150,B:122,A:255). - - - - - DarkSeaGreen color (R:143,G:188,B:139,A:255). - - - - - DarkSlateBlue color (R:72,G:61,B:139,A:255). - - - - - DarkSlateGray color (R:47,G:79,B:79,A:255). - - - - - DarkTurquoise color (R:0,G:206,B:209,A:255). - - - - - DarkViolet color (R:148,G:0,B:211,A:255). - - - - - DeepPink color (R:255,G:20,B:147,A:255). - - - - - DeepSkyBlue color (R:0,G:191,B:255,A:255). - - - - - DimGray color (R:105,G:105,B:105,A:255). - - - - - DodgerBlue color (R:30,G:144,B:255,A:255). - - - - - Firebrick color (R:178,G:34,B:34,A:255). - - - - - FloralWhite color (R:255,G:250,B:240,A:255). - - - - - ForestGreen color (R:34,G:139,B:34,A:255). - - - - - Fuchsia color (R:255,G:0,B:255,A:255). - - - - - Gainsboro color (R:220,G:220,B:220,A:255). - - - - - GhostWhite color (R:248,G:248,B:255,A:255). - - - - - Gold color (R:255,G:215,B:0,A:255). - - - - - Goldenrod color (R:218,G:165,B:32,A:255). - - - - - Gray color (R:128,G:128,B:128,A:255). - - - - - Green color (R:0,G:128,B:0,A:255). - - - - - GreenYellow color (R:173,G:255,B:47,A:255). - - - - - Honeydew color (R:240,G:255,B:240,A:255). - - - - - HotPink color (R:255,G:105,B:180,A:255). - - - - - IndianRed color (R:205,G:92,B:92,A:255). - - - - - Indigo color (R:75,G:0,B:130,A:255). - - - - - Ivory color (R:255,G:255,B:240,A:255). - - - - - Khaki color (R:240,G:230,B:140,A:255). - - - - - Lavender color (R:230,G:230,B:250,A:255). - - - - - LavenderBlush color (R:255,G:240,B:245,A:255). - - - - - LawnGreen color (R:124,G:252,B:0,A:255). - - - - - LemonChiffon color (R:255,G:250,B:205,A:255). - - - - - LightBlue color (R:173,G:216,B:230,A:255). - - - - - LightCoral color (R:240,G:128,B:128,A:255). - - - - - LightCyan color (R:224,G:255,B:255,A:255). - - - - - LightGoldenrodYellow color (R:250,G:250,B:210,A:255). - - - - - LightGray color (R:211,G:211,B:211,A:255). - - - - - LightGreen color (R:144,G:238,B:144,A:255). - - - - - LightPink color (R:255,G:182,B:193,A:255). - - - - - LightSalmon color (R:255,G:160,B:122,A:255). - - - - - LightSeaGreen color (R:32,G:178,B:170,A:255). - - - - - LightSkyBlue color (R:135,G:206,B:250,A:255). - - - - - LightSlateGray color (R:119,G:136,B:153,A:255). - - - - - LightSteelBlue color (R:176,G:196,B:222,A:255). - - - - - LightYellow color (R:255,G:255,B:224,A:255). - - - - - Lime color (R:0,G:255,B:0,A:255). - - - - - LimeGreen color (R:50,G:205,B:50,A:255). - - - - - Linen color (R:250,G:240,B:230,A:255). - - - - - Magenta color (R:255,G:0,B:255,A:255). - - - - - Maroon color (R:128,G:0,B:0,A:255). - - - - - MediumAquamarine color (R:102,G:205,B:170,A:255). - - - - - MediumBlue color (R:0,G:0,B:205,A:255). - - - - - MediumOrchid color (R:186,G:85,B:211,A:255). - - - - - MediumPurple color (R:147,G:112,B:219,A:255). - - - - - MediumSeaGreen color (R:60,G:179,B:113,A:255). - - - - - MediumSlateBlue color (R:123,G:104,B:238,A:255). - - - - - MediumSpringGreen color (R:0,G:250,B:154,A:255). - - - - - MediumTurquoise color (R:72,G:209,B:204,A:255). - - - - - MediumVioletRed color (R:199,G:21,B:133,A:255). - - - - - MidnightBlue color (R:25,G:25,B:112,A:255). - - - - - MintCream color (R:245,G:255,B:250,A:255). - - - - - MistyRose color (R:255,G:228,B:225,A:255). - - - - - Moccasin color (R:255,G:228,B:181,A:255). - - - - - MonoGame orange theme color (R:231,G:60,B:0,A:255). - - - - - NavajoWhite color (R:255,G:222,B:173,A:255). - - - - - Navy color (R:0,G:0,B:128,A:255). - - - - - OldLace color (R:253,G:245,B:230,A:255). - - - - - Olive color (R:128,G:128,B:0,A:255). - - - - - OliveDrab color (R:107,G:142,B:35,A:255). - - - - - Orange color (R:255,G:165,B:0,A:255). - - - - - OrangeRed color (R:255,G:69,B:0,A:255). - - - - - Orchid color (R:218,G:112,B:214,A:255). - - - - - PaleGoldenrod color (R:238,G:232,B:170,A:255). - - - - - PaleGreen color (R:152,G:251,B:152,A:255). - - - - - PaleTurquoise color (R:175,G:238,B:238,A:255). - - - - - PaleVioletRed color (R:219,G:112,B:147,A:255). - - - - - PapayaWhip color (R:255,G:239,B:213,A:255). - - - - - PeachPuff color (R:255,G:218,B:185,A:255). - - - - - Peru color (R:205,G:133,B:63,A:255). - - - - - Pink color (R:255,G:192,B:203,A:255). - - - - - Plum color (R:221,G:160,B:221,A:255). - - - - - PowderBlue color (R:176,G:224,B:230,A:255). - - - - - Purple color (R:128,G:0,B:128,A:255). - - - - - Red color (R:255,G:0,B:0,A:255). - - - - - RosyBrown color (R:188,G:143,B:143,A:255). - - - - - RoyalBlue color (R:65,G:105,B:225,A:255). - - - - - SaddleBrown color (R:139,G:69,B:19,A:255). - - - - - Salmon color (R:250,G:128,B:114,A:255). - - - - - SandyBrown color (R:244,G:164,B:96,A:255). - - - - - SeaGreen color (R:46,G:139,B:87,A:255). - - - - - SeaShell color (R:255,G:245,B:238,A:255). - - - - - Sienna color (R:160,G:82,B:45,A:255). - - - - - Silver color (R:192,G:192,B:192,A:255). - - - - - SkyBlue color (R:135,G:206,B:235,A:255). - - - - - SlateBlue color (R:106,G:90,B:205,A:255). - - - - - SlateGray color (R:112,G:128,B:144,A:255). - - - - - Snow color (R:255,G:250,B:250,A:255). - - - - - SpringGreen color (R:0,G:255,B:127,A:255). - - - - - SteelBlue color (R:70,G:130,B:180,A:255). - - - - - Tan color (R:210,G:180,B:140,A:255). - - - - - Teal color (R:0,G:128,B:128,A:255). - - - - - Thistle color (R:216,G:191,B:216,A:255). - - - - - Tomato color (R:255,G:99,B:71,A:255). - - - - - Turquoise color (R:64,G:224,B:208,A:255). - - - - - Violet color (R:238,G:130,B:238,A:255). - - - - - Wheat color (R:245,G:222,B:179,A:255). - - - - - White color (R:255,G:255,B:255,A:255). - - - - - WhiteSmoke color (R:245,G:245,B:245,A:255). - - - - - Yellow color (R:255,G:255,B:0,A:255). - - - - - YellowGreen color (R:154,G:205,B:50,A:255). - - - - - Performs linear interpolation of . - - Source . - Destination . - Interpolation factor. - Interpolated . - - - - should be used instead of this function. - - Interpolated . - - - - Multiply by value. - - Source . - Multiplicator. - Multiplication result. - - - - Multiply by value. - - Source . - Multiplicator. - Multiplication result. - - - - Gets a representation for this object. - - A representation for this object. - - - - Gets a representation for this object. - - A representation for this object. - - - - Gets or sets packed value of this . - - - - - Returns a representation of this in the format: - {R:[red] G:[green] B:[blue] A:[alpha]} - - representation of this . - - - - Translate a non-premultipled alpha to a that contains premultiplied alpha. - - A representing color. - A which contains premultiplied alpha data. - - - - Translate a non-premultipled alpha to a that contains premultiplied alpha. - - Red component value. - Green component value. - Blue component value. - Alpha component value. - A which contains premultiplied alpha data. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Deconstruction method for . - - - - - - - - Deconstruction method for with Alpha. - - - - - - - - - Defines how the bounding volumes intersects or contain one another. - - - - - Indicates that there is no overlap between two bounding volumes. - - - - - Indicates that one bounding volume completely contains another volume. - - - - - Indicates that bounding volumes partially overlap one another. - - - - - Defines the continuity of keys on a . - - - - - Interpolation can be used between this key and the next. - - - - - Interpolation cannot be used. A position between the two points returns this point. - - - - - Contains a collection of points in 2D space and provides methods for evaluating features of the curve they define. - - - - - Returns true if this curve is constant (has zero or one points); false otherwise. - - - - - Defines how to handle weighting values that are less than the first control point in the curve. - - - - - Defines how to handle weighting values that are greater than the last control point in the curve. - - - - - The collection of curve keys. - - - - - Constructs a curve. - - - - - Creates a copy of this curve. - - A copy of this curve. - - - - Evaluate the value at a position of this . - - The position on this . - Value at the position on this . - - - - Computes tangents for all keys in the collection. - - The tangent type for both in and out. - - - - Computes tangents for all keys in the collection. - - The tangent in-type. for more details. - The tangent out-type. for more details. - - - - Computes tangent for the specific key in the collection. - - The index of a key in the collection. - The tangent type for both in and out. - - - - Computes tangent for the specific key in the collection. - - The index of key in the collection. - The tangent in-type. for more details. - The tangent out-type. for more details. - - - - The collection of the elements and a part of the class. - - - - - Indexer. - - The index of key in this collection. - at position. - - - - Returns the count of keys in this collection. - - - - - Returns false because it is not a read-only collection. - - - - - Creates a new instance of class. - - - - - Adds a key to this collection. - - New key for the collection. - Throws if is null. - The new key would be added respectively to a position of that key and the position of other keys. - - - - Removes all keys from this collection. - - - - - Creates a copy of this collection. - - A copy of this collection. - - - - Determines whether this collection contains a specific key. - - The key to locate in this collection. - true if the key is found; false otherwise. - - - - Copies the keys of this collection to an array, starting at the array index provided. - - Destination array where elements will be copied. - The zero-based index in the array to start copying from. - - - - Returns an enumerator that iterates through the collection. - - An enumerator for the . - - - - Finds element in the collection and returns its index. - - Element for the search. - Index of the element; or -1 if item is not found. - - - - Removes element at the specified index. - - The index which element will be removed. - - - - Removes specific element. - - The element - true if item is successfully removed; false otherwise. This method also returns false if item was not found. - - - - Key point on the . - - - - - Gets or sets the indicator whether the segment between this point and the next point on the curve is discrete or continuous. - - - - - Gets a position of the key on the curve. - - - - - Gets or sets a tangent when approaching this point from the previous point on the curve. - - - - - Gets or sets a tangent when leaving this point to the next point on the curve. - - - - - Gets a value of this point. - - - - - Creates a new instance of class with position: 0 and value: 0. - - - - - Creates a new instance of class. - - Position on the curve. - Value of the control point. - - - - Creates a new instance of class. - - Position on the curve. - Value of the control point. - Tangent approaching point from the previous point on the curve. - Tangent leaving point toward next point on the curve. - - - - Creates a new instance of class. - - Position on the curve. - Value of the control point. - Tangent approaching point from the previous point on the curve. - Tangent leaving point toward next point on the curve. - Indicates whether the curve is discrete or continuous. - - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Creates a copy of this key. - - A copy of this key. - - - - Defines how the value is determined for position before first point or after the end point on the . - - - - - The value of will be evaluated as first point for positions before the beginning and end point for positions after the end. - - - - - The positions will wrap around from the end to beginning of the for determined the value. - - - - - The positions will wrap around from the end to beginning of the . - The value will be offset by the difference between the values of first and end multiplied by the wrap amount. - If the position is before the beginning of the the difference will be subtracted from its value; otherwise the difference will be added. - - - - - The value at the end of the act as an offset from the same side of the toward the opposite side. - - - - - The linear interpolation will be performed for determined the value. - - - - - Defines the different tangent types to be calculated for points in a . - - - - - The tangent which always has a value equal to zero. - - - - - The tangent which contains a difference between current tangent value and the tangent value from the previous . - - - - - The smoouth tangent which contains the inflection between and by taking into account the values of both neighbors of the . - - - - - Defines the orientation of the display. - - - - - The default orientation. - - - - - The display is rotated counterclockwise into a landscape orientation. Width is greater than height. - - - - - The display is rotated clockwise into a landscape orientation. Width is greater than height. - - - - - The display is rotated as portrait, where height is greater than width. - - - - - The display is rotated as inverted portrait, where height is greater than width. - - - - - Unknown display orientation. - - - - - Provides helper methods to make it easier - to safely raise events. - - - - - Safely raises an event by storing a copy of the event's delegate - in the parameter and checking it for - null before invoking it. - - - The object raising the event. - to be invoked - The passed to - - - - Safely raises an event by storing a copy of the event's delegate - in the parameter and checking it for - null before invoking it. - - The object raising the event. - to be invoked - The passed to - - - - Helper class for processing internal framework events. - - - If you use class, is called automatically. - Otherwise you must call it as part of your game loop. - - - - - Processes framework events. - - - - - Event that is triggered when a is added - to this . - - - - - Event that is triggered when a is removed - from this . - - - - - Removes every from this . - Triggers once for each removed. - - - - - Shuts down the component. - - - - - Shuts down the component. - - - - - The maximum amount of time we will frameskip over and only perform Update calls with no Draw calls. - MonoGame extension. - - - - - The SortingFilteringCollection class provides efficient, reusable - sorting and filtering based on a configurable sort comparer, filter - predicate, and associate change events. - - - - - When implemented in a derived class, reports the default - GameRunBehavior for this platform. - - - - - Gets the Game instance that owns this GamePlatform instance. - - - - - Raises the AsyncRunLoopEnded event. This method must be called by - derived classes when the asynchronous run loop they start has - stopped running. - - - - - Gives derived classes an opportunity to do work before any - components are initialized. Note that the base implementation sets - IsActive to true, so derived classes should either call the base - implementation or set IsActive to true by their own means. - - - - - Gives derived classes an opportunity to do work just before the - run loop is begun. Implementations may also return false to prevent - the run loop from starting. - - - - - - When implemented in a derived, ends the active run loop. - - - - - When implemented in a derived, starts the run loop and blocks - until it has ended. - - - - - When implemented in a derived, starts the run loop and returns - immediately. - - - - - Gives derived classes an opportunity to do work just before Update - is called for all IUpdatable components. Returning false from this - method will result in this round of Update calls being skipped. - - - - - - - Gives derived classes an opportunity to do work just before Draw - is called for all IDrawable components. Returning false from this - method will result in this round of Draw calls being skipped. - - - - - - - When implemented in a derived class, causes the game to enter - full-screen mode. - - - - - When implemented in a derived class, causes the game to exit - full-screen mode. - - - - - Gives derived classes an opportunity to modify - Game.TargetElapsedTime before it is set. - - The proposed new value of TargetElapsedTime. - The new value of TargetElapsedTime that will be set. - - - - Starts a device transition (windowed to full screen or vice versa). - - - Specifies whether the device will be in full-screen mode upon completion of the change. - - - - - Completes a device transition. - - - Screen device name. - - - The new width of the game's client window. - - - The new height of the game's client window. - - - - - Gives derived classes an opportunity to take action after - Game.TargetElapsedTime has been set. - - - - - MSDN: Use this method if your game is recovering from a slow-running state, and ElapsedGameTime is too large to be useful. - Frame timing is generally handled by the Game class, but some platforms still handle it elsewhere. Once all platforms - rely on the Game class's functionality, this method and any overrides should be removed. - - - - - Called by the GraphicsDeviceManager to notify the platform - that the presentation parameters have changed. - - The new presentation parameters. - - - - Performs application-defined tasks associated with freeing, - releasing, or resetting unmanaged resources. - - - - - Log the specified Message. - - - - - - - - Defines how should be runned. - - - - - The game loop will be runned asynchronous. - - - - - The game loop will be runned synchronous. - - - - - Gets or sets a bool that enables usage of Alt+F4 for window closing on desktop platforms. Value is true by default. - - - - - The location of this window on the desktop, eg: global coordinate space - which stretches across all screens. - - - - - Gets or sets the title of the game window. - - - For Windows 8 and Windows 10 UWP this has no effect. For these platforms the title should be - set by using the DisplayName property found in the app manifest file. - - - - - Determines whether the border of the window is visible. Currently only supported on the WinDX and WinGL/Linux platforms. - - - Thrown when trying to use this property on a platform other than the WinDX and WinGL/Linux platforms. - - - - - Use this event to retrieve text for objects like textbox's. - This event is not raised by noncharacter keys. - This event also supports key repeat. - For more information this event is based off: - http://msdn.microsoft.com/en-AU/library/system.windows.forms.control.keypress.aspx - - - This event is only supported on the Windows DirectX, Windows OpenGL and Linux platforms. - - - - - Used by the platform code to control the graphics device. - - - - - Called at the start of rendering a frame. - - Returns true if the frame should be rendered. - - - - Called to create the graphics device. - - Does nothing if the graphics device is already created. - - - - Called after rendering to present the frame to the screen. - - - - - Contains commonly used precalculated values and mathematical operations. - - - - - Represents the mathematical constant e(2.71828175). - - - - - Represents the log base ten of e(0.4342945). - - - - - Represents the log base two of e(1.442695). - - - - - Represents the value of pi(3.14159274). - - - - - Represents the value of pi divided by two(1.57079637). - - - - - Represents the value of pi divided by four(0.7853982). - - - - - Represents the value of pi times two(6.28318548). - - - - - Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates. - - The coordinate on one axis of vertex 1 of the defining triangle. - The coordinate on the same axis of vertex 2 of the defining triangle. - The coordinate on the same axis of vertex 3 of the defining triangle. - The normalized barycentric (areal) coordinate b2, equal to the weighting factor for vertex 2, the coordinate of which is specified in value2. - The normalized barycentric (areal) coordinate b3, equal to the weighting factor for vertex 3, the coordinate of which is specified in value3. - Cartesian coordinate of the specified point with respect to the axis being used. - - - - Performs a Catmull-Rom interpolation using the specified positions. - - The first position in the interpolation. - The second position in the interpolation. - The third position in the interpolation. - The fourth position in the interpolation. - Weighting factor. - A position that is the result of the Catmull-Rom interpolation. - - - - Restricts a value to be within a specified range. - - The value to clamp. - The minimum value. If value is less than min, min will be returned. - The maximum value. If value is greater than max, max will be returned. - The clamped value. - - - - Restricts a value to be within a specified range. - - The value to clamp. - The minimum value. If value is less than min, min will be returned. - The maximum value. If value is greater than max, max will be returned. - The clamped value. - - - - Calculates the absolute value of the difference of two values. - - Source value. - Source value. - Distance between the two values. - - - - Performs a Hermite spline interpolation. - - Source position. - Source tangent. - Source position. - Source tangent. - Weighting factor. - The result of the Hermite spline interpolation. - - - - Linearly interpolates between two values. - - Source value. - Destination value. - Value between 0 and 1 indicating the weight of value2. - Interpolated value. - This method performs the linear interpolation based on the following formula: - value1 + (value2 - value1) * amount. - Passing amount a value of 0 will cause value1 to be returned, a value of 1 will cause value2 to be returned. - See for a less efficient version with more precision around edge cases. - - - - - Linearly interpolates between two values. - This method is a less efficient, more precise version of . - See remarks for more info. - - Source value. - Destination value. - Value between 0 and 1 indicating the weight of value2. - Interpolated value. - This method performs the linear interpolation based on the following formula: - ((1 - amount) * value1) + (value2 * amount). - Passing amount a value of 0 will cause value1 to be returned, a value of 1 will cause value2 to be returned. - This method does not have the floating point precision issue that has. - i.e. If there is a big gap between value1 and value2 in magnitude (e.g. value1=10000000000000000, value2=1), - right at the edge of the interpolation range (amount=1), will return 0 (whereas it should return 1). - This also holds for value1=10^17, value2=10; value1=10^18,value2=10^2... so on. - For an in depth explanation of the issue, see below references: - Relevant Wikipedia Article: https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support - Relevant StackOverflow Answer: http://stackoverflow.com/questions/4353525/floating-point-linear-interpolation#answer-23716956 - - - - - Returns the greater of two values. - - Source value. - Source value. - The greater value. - - - - Returns the greater of two values. - - Source value. - Source value. - The greater value. - - - - Returns the lesser of two values. - - Source value. - Source value. - The lesser value. - - - - Returns the lesser of two values. - - Source value. - Source value. - The lesser value. - - - - Interpolates between two values using a cubic equation. - - Source value. - Source value. - Weighting value. - Interpolated value. - - - - Converts radians to degrees. - - The angle in radians. - The angle in degrees. - - This method uses double precission internally, - though it returns single float - Factor = 180 / pi - - - - - Converts degrees to radians. - - The angle in degrees. - The angle in radians. - - This method uses double precission internally, - though it returns single float - Factor = pi / 180 - - - - - Reduces a given angle to a value between π and -π. - - The angle to reduce, in radians. - The new angle, in radians. - - - - Determines if value is powered by two. - - A value. - true if value is powered by two; otherwise false. - - - - Represents the right-handed 4x4 floating point matrix, which can store translation, scale and rotation information. - - - - - Constructs a matrix. - - A first row and first column value. - A first row and second column value. - A first row and third column value. - A first row and fourth column value. - A second row and first column value. - A second row and second column value. - A second row and third column value. - A second row and fourth column value. - A third row and first column value. - A third row and second column value. - A third row and third column value. - A third row and fourth column value. - A fourth row and first column value. - A fourth row and second column value. - A fourth row and third column value. - A fourth row and fourth column value. - - - - Constructs a matrix. - - A first row of the created matrix. - A second row of the created matrix. - A third row of the created matrix. - A fourth row of the created matrix. - - - - A first row and first column value. - - - - - A first row and second column value. - - - - - A first row and third column value. - - - - - A first row and fourth column value. - - - - - A second row and first column value. - - - - - A second row and second column value. - - - - - A second row and third column value. - - - - - A second row and fourth column value. - - - - - A third row and first column value. - - - - - A third row and second column value. - - - - - A third row and third column value. - - - - - A third row and fourth column value. - - - - - A fourth row and first column value. - - - - - A fourth row and second column value. - - - - - A fourth row and third column value. - - - - - A fourth row and fourth column value. - - - - - The backward vector formed from the third row M31, M32, M33 elements. - - - - - The down vector formed from the second row -M21, -M22, -M23 elements. - - - - - The forward vector formed from the third row -M31, -M32, -M33 elements. - - - - - Returns the identity matrix. - - - - - The left vector formed from the first row -M11, -M12, -M13 elements. - - - - - The right vector formed from the first row M11, M12, M13 elements. - - - - - Position stored in this matrix. - - - - - The upper vector formed from the second row M21, M22, M23 elements. - - - - - Creates a new which contains sum of two matrixes. - - The first matrix to add. - The second matrix to add. - The result of the matrix addition. - - - - Creates a new which contains sum of two matrixes. - - The first matrix to add. - The second matrix to add. - The result of the matrix addition as an output parameter. - - - - Creates a new for spherical billboarding that rotates around specified object position. - - Position of billboard object. It will rotate around that vector. - The camera position. - The camera up vector. - Optional camera forward vector. - The for spherical billboarding. - - - - Creates a new for spherical billboarding that rotates around specified object position. - - Position of billboard object. It will rotate around that vector. - The camera position. - The camera up vector. - Optional camera forward vector. - The for spherical billboarding as an output parameter. - - - - Creates a new for cylindrical billboarding that rotates around specified axis. - - Object position the billboard will rotate around. - Camera position. - Axis of billboard for rotation. - Optional camera forward vector. - Optional object forward vector. - The for cylindrical billboarding. - - - - Creates a new for cylindrical billboarding that rotates around specified axis. - - Object position the billboard will rotate around. - Camera position. - Axis of billboard for rotation. - Optional camera forward vector. - Optional object forward vector. - The for cylindrical billboarding as an output parameter. - - - - Creates a new which contains the rotation moment around specified axis. - - The axis of rotation. - The angle of rotation in radians. - The rotation . - - - - Creates a new which contains the rotation moment around specified axis. - - The axis of rotation. - The angle of rotation in radians. - The rotation as an output parameter. - - - - Creates a new rotation from a . - - of rotation moment. - The rotation . - - - - Creates a new rotation from a . - - of rotation moment. - The rotation as an output parameter. - - - - Creates a new rotation from the specified yaw, pitch and roll values. - - The yaw rotation value in radians. - The pitch rotation value in radians. - The roll rotation value in radians. - The rotation . - For more information about yaw, pitch and roll visit http://en.wikipedia.org/wiki/Euler_angles. - - - - - Creates a new rotation from the specified yaw, pitch and roll values. - - The yaw rotation value in radians. - The pitch rotation value in radians. - The roll rotation value in radians. - The rotation as an output parameter. - For more information about yaw, pitch and roll visit http://en.wikipedia.org/wiki/Euler_angles. - - - - - Creates a new viewing . - - Position of the camera. - Lookup vector of the camera. - The direction of the upper edge of the camera. - The viewing . - - - - Creates a new viewing . - - Position of the camera. - Lookup vector of the camera. - The direction of the upper edge of the camera. - The viewing as an output parameter. - - - - Creates a new projection for orthographic view. - - Width of the viewing volume. - Height of the viewing volume. - Depth of the near plane. - Depth of the far plane. - The new projection for orthographic view. - - - - Creates a new projection for orthographic view. - - Width of the viewing volume. - Height of the viewing volume. - Depth of the near plane. - Depth of the far plane. - The new projection for orthographic view as an output parameter. - - - - Creates a new projection for customized orthographic view. - - Lower x-value at the near plane. - Upper x-value at the near plane. - Lower y-coordinate at the near plane. - Upper y-value at the near plane. - Depth of the near plane. - Depth of the far plane. - The new projection for customized orthographic view. - - - - Creates a new projection for customized orthographic view. - - The viewing volume. - Depth of the near plane. - Depth of the far plane. - The new projection for customized orthographic view. - - - - Creates a new projection for customized orthographic view. - - Lower x-value at the near plane. - Upper x-value at the near plane. - Lower y-coordinate at the near plane. - Upper y-value at the near plane. - Depth of the near plane. - Depth of the far plane. - The new projection for customized orthographic view as an output parameter. - - - - Creates a new projection for perspective view. - - Width of the viewing volume. - Height of the viewing volume. - Distance to the near plane. - Distance to the far plane. - The new projection for perspective view. - - - - Creates a new projection for perspective view. - - Width of the viewing volume. - Height of the viewing volume. - Distance to the near plane. - Distance to the far plane. - The new projection for perspective view as an output parameter. - - - - Creates a new projection for perspective view with field of view. - - Field of view in the y direction in radians. - Width divided by height of the viewing volume. - Distance to the near plane. - Distance to the far plane. - The new projection for perspective view with FOV. - - - - Creates a new projection for perspective view with field of view. - - Field of view in the y direction in radians. - Width divided by height of the viewing volume. - Distance of the near plane. - Distance of the far plane. - The new projection for perspective view with FOV as an output parameter. - - - - Creates a new projection for customized perspective view. - - Lower x-value at the near plane. - Upper x-value at the near plane. - Lower y-coordinate at the near plane. - Upper y-value at the near plane. - Distance to the near plane. - Distance to the far plane. - The new for customized perspective view. - - - - Creates a new projection for customized perspective view. - - The viewing volume. - Distance to the near plane. - Distance to the far plane. - The new for customized perspective view. - - - - Creates a new projection for customized perspective view. - - Lower x-value at the near plane. - Upper x-value at the near plane. - Lower y-coordinate at the near plane. - Upper y-value at the near plane. - Distance to the near plane. - Distance to the far plane. - The new for customized perspective view as an output parameter. - - - - Creates a new rotation around X axis. - - Angle in radians. - The rotation around X axis. - - - - Creates a new rotation around X axis. - - Angle in radians. - The rotation around X axis as an output parameter. - - - - Creates a new rotation around Y axis. - - Angle in radians. - The rotation around Y axis. - - - - Creates a new rotation around Y axis. - - Angle in radians. - The rotation around Y axis as an output parameter. - - - - Creates a new rotation around Z axis. - - Angle in radians. - The rotation around Z axis. - - - - Creates a new rotation around Z axis. - - Angle in radians. - The rotation around Z axis as an output parameter. - - - - Creates a new scaling . - - Scale value for all three axises. - The scaling . - - - - Creates a new scaling . - - Scale value for all three axises. - The scaling as an output parameter. - - - - Creates a new scaling . - - Scale value for X axis. - Scale value for Y axis. - Scale value for Z axis. - The scaling . - - - - Creates a new scaling . - - Scale value for X axis. - Scale value for Y axis. - Scale value for Z axis. - The scaling as an output parameter. - - - - Creates a new scaling . - - representing x,y and z scale values. - The scaling . - - - - Creates a new scaling . - - representing x,y and z scale values. - The scaling as an output parameter. - - - - Creates a new that flattens geometry into a specified as if casting a shadow from a specified light source. - - A vector specifying the direction from which the light that will cast the shadow is coming. - The plane onto which the new matrix should flatten geometry so as to cast a shadow. - A that can be used to flatten geometry onto the specified plane from the specified direction. - - - - Creates a new that flattens geometry into a specified as if casting a shadow from a specified light source. - - A vector specifying the direction from which the light that will cast the shadow is coming. - The plane onto which the new matrix should flatten geometry so as to cast a shadow. - A that can be used to flatten geometry onto the specified plane from the specified direction as an output parameter. - - - - Creates a new translation . - - X coordinate of translation. - Y coordinate of translation. - Z coordinate of translation. - The translation . - - - - Creates a new translation . - - X,Y and Z coordinates of translation. - The translation as an output parameter. - - - - Creates a new translation . - - X,Y and Z coordinates of translation. - The translation . - - - - Creates a new translation . - - X coordinate of translation. - Y coordinate of translation. - Z coordinate of translation. - The translation as an output parameter. - - - - Creates a new reflection . - - The plane that used for reflection calculation. - The reflection . - - - - Creates a new reflection . - - The plane that used for reflection calculation. - The reflection as an output parameter. - - - - Creates a new world . - - The position vector. - The forward direction vector. - The upward direction vector. Usually . - The world . - - - - Creates a new world . - - The position vector. - The forward direction vector. - The upward direction vector. Usually . - The world as an output parameter. - - - - Decomposes this matrix to translation, rotation and scale elements. Returns true if matrix can be decomposed; false otherwise. - - Scale vector as an output parameter. - Rotation quaternion as an output parameter. - Translation vector as an output parameter. - true if matrix can be decomposed; false otherwise. - - - - Returns a determinant of this . - - Determinant of this - See more about determinant here - http://en.wikipedia.org/wiki/Determinant. - - - - - Divides the elements of a by the elements of another matrix. - - Source . - Divisor . - The result of dividing the matrix. - - - - Divides the elements of a by the elements of another matrix. - - Source . - Divisor . - The result of dividing the matrix as an output parameter. - - - - Divides the elements of a by a scalar. - - Source . - Divisor scalar. - The result of dividing a matrix by a scalar. - - - - Divides the elements of a by a scalar. - - Source . - Divisor scalar. - The result of dividing a matrix by a scalar as an output parameter. - - - - Compares whether current instance is equal to specified without any tolerance. - - The to compare. - true if the instances are equal; false otherwise. - - - - Compares whether current instance is equal to specified without any tolerance. - - The to compare. - true if the instances are equal; false otherwise. - - - - Gets the hash code of this . - - Hash code of this . - - - - Creates a new which contains inversion of the specified matrix. - - Source . - The inverted matrix. - - - - Creates a new which contains inversion of the specified matrix. - - Source . - The inverted matrix as output parameter. - - - - Creates a new that contains linear interpolation of the values in specified matrixes. - - The first . - The second . - Weighting value(between 0.0 and 1.0). - >The result of linear interpolation of the specified matrixes. - - - - Creates a new that contains linear interpolation of the values in specified matrixes. - - The first . - The second . - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified matrixes as an output parameter. - - - - Creates a new that contains a multiplication of two matrix. - - Source . - Source . - Result of the matrix multiplication. - - - - Creates a new that contains a multiplication of two matrix. - - Source . - Source . - Result of the matrix multiplication as an output parameter. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - Result of the matrix multiplication with a scalar. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - Result of the matrix multiplication with a scalar as an output parameter. - - - - Copy the values of specified to the float array. - - The source . - The array which matrix values will be stored. - - Required for OpenGL 2.0 projection matrix stuff. - - - - - Returns a matrix with the all values negated. - - Source . - Result of the matrix negation. - - - - Returns a matrix with the all values negated. - - Source . - Result of the matrix negation as an output parameter. - - - - Adds two matrixes. - - Source on the left of the add sign. - Source on the right of the add sign. - Sum of the matrixes. - - - - Divides the elements of a by the elements of another . - - Source on the left of the div sign. - Divisor on the right of the div sign. - The result of dividing the matrixes. - - - - Divides the elements of a by a scalar. - - Source on the left of the div sign. - Divisor scalar on the right of the div sign. - The result of dividing a matrix by a scalar. - - - - Compares whether two instances are equal without any tolerance. - - Source on the left of the equal sign. - Source on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal without any tolerance. - - Source on the left of the not equal sign. - Source on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Multiplies two matrixes. - - Source on the left of the mul sign. - Source on the right of the mul sign. - Result of the matrix multiplication. - - Using matrix multiplication algorithm - see http://en.wikipedia.org/wiki/Matrix_multiplication. - - - - - Multiplies the elements of matrix by a scalar. - - Source on the left of the mul sign. - Scalar value on the right of the mul sign. - Result of the matrix multiplication with a scalar. - - - - Subtracts the values of one from another . - - Source on the left of the sub sign. - Source on the right of the sub sign. - Result of the matrix subtraction. - - - - Inverts values in the specified . - - Source on the right of the sub sign. - Result of the inversion. - - - - Creates a new that contains subtraction of one matrix from another. - - The first . - The second . - The result of the matrix subtraction. - - - - Creates a new that contains subtraction of one matrix from another. - - The first . - The second . - The result of the matrix subtraction as an output parameter. - - - - Returns a representation of this in the format: - {M11:[] M12:[] M13:[] M14:[]} - {M21:[] M12:[] M13:[] M14:[]} - {M31:[] M32:[] M33:[] M34:[]} - {M41:[] M42:[] M43:[] M44:[]} - - A representation of this . - - - - Swap the matrix rows and columns. - - The matrix for transposing operation. - The new which contains the transposing result. - - - - Swap the matrix rows and columns. - - The matrix for transposing operation. - The new which contains the transposing result as an output parameter. - - - - Helper method for using the Laplace expansion theorem using two rows expansions to calculate major and - minor determinants of a 4x4 matrix. This method is used for inverting a matrix. - - - - - Provides functionality to handle input from keyboards, mice, gamepads, etc. - - - - - Defines the buttons on gamepad. - - - - - Directional pad up. - - - - - Directional pad down. - - - - - Directional pad left. - - - - - Directional pad right. - - - - - START button. - - - - - BACK button. - - - - - Left stick button (pressing the left stick). - - - - - Right stick button (pressing the right stick). - - - - - Left bumper (shoulder) button. - - - - - Right bumper (shoulder) button. - - - - - Big button. - - - - - A button. - - - - - B button. - - - - - X button. - - - - - Y button. - - - - - Left stick is towards the left. - - - - - Right trigger. - - - - - Left trigger. - - - - - Right stick is towards up. - - - - - Right stick is towards down. - - - - - Right stick is towards the right. - - - - - Right stick is towards the left. - - - - - Left stick is towards up. - - - - - Left stick is towards down. - - - - - Left stick is towards the right. - - - - - Defines a button state for buttons of mouse, gamepad or joystick. - - - - - The button is released. - - - - - The button is pressed. - - - - - Supports querying the game controllers and setting the vibration motors. - - - - - Returns the capabilites of the connected controller. - - Player index for the controller you want to query. - The capabilites of the controller. - - - - Returns the capabilites of the connected controller. - - Index for the controller you want to query. - The capabilites of the controller. - - - - Gets the current state of a game pad controller with an independent axes dead zone. - - Player index for the controller you want to query. - The state of the controller. - - - - Gets the current state of a game pad controller with an independent axes dead zone. - - Index for the controller you want to query. - The state of the controller. - - - - Gets the current state of a game pad controller, using a specified dead zone - on analog stick positions. - - Player index for the controller you want to query. - Enumerated value that specifies what dead zone type to use. - The state of the controller. - - - - Gets the current state of a game pad controller, using a specified dead zone - on analog stick positions. - - Index for the controller you want to query. - Enumerated value that specifies what dead zone type to use. - The state of the controller. - - - - Gets the current state of a game pad controller, using a specified dead zone - on analog stick positions. - - Player index for the controller you want to query. - Enumerated value that specifies what dead zone type to use for the left stick. - Enumerated value that specifies what dead zone type to use for the right stick. - The state of the controller. - - - - Gets the current state of a game pad controller, using a specified dead zone - on analog stick positions. - - Index for the controller you want to query. - Enumerated value that specifies what dead zone type to use for the left stick. - Enumerated value that specifies what dead zone type to use for the right stick. - The state of the controller. - - - - Sets the vibration motor speeds on the controller device if supported. - - Player index that identifies the controller to set. - The speed of the left motor, between 0.0 and 1.0. This motor is a low-frequency motor. - The speed of the right motor, between 0.0 and 1.0. This motor is a high-frequency motor. - Returns true if the vibration motors were set. - - - - Sets the vibration motor speeds on the controller device if supported. - - Index for the controller you want to query. - The speed of the left motor, between 0.0 and 1.0. This motor is a low-frequency motor. - The speed of the right motor, between 0.0 and 1.0. This motor is a high-frequency motor. - Returns true if the vibration motors were set. - - - - The maximum number of game pads supported on this system. Attempting to - access a gamepad index higher than this number will result in an - being thrown by the API. - - - - - A struct that represents the current button states for the controller. - - - - - Gets a value indicating if the button A is pressed. - - if the button A is pressed; otherwise, . - - - - Gets a value indicating if the button B is pressed. - - if the button B is pressed; otherwise, . - - - - Gets a value indicating if the button Back is pressed. - - if the button Back is pressed; otherwise, . - - - - Gets a value indicating if the button X is pressed. - - if the button X is pressed; otherwise, . - - - - Gets a value indicating if the button Y is pressed. - - if the button Y is pressed; otherwise, . - - - - Gets a value indicating if the button Start is pressed. - - if the button Start is pressed; otherwise, . - - - - Gets a value indicating if the left shoulder button is pressed. - - if the left shoulder button is pressed; otherwise, . - - - - Gets a value indicating if the left stick button is pressed. - - if the left stick button is pressed; otherwise, . - - - - Gets a value indicating if the right shoulder button is pressed. - - if the right shoulder button is pressed; otherwise, . - - - - Gets a value indicating if the right stick button is pressed. - - if the right stick button is pressed; otherwise, . - - - - Gets a value indicating if the guide button is pressed. - - if the guide button is pressed; otherwise, . - - - - Determines whether two specified instances of are equal. - - The first object to compare. - The second object to compare. - true if and are equal; otherwise, false. - - - - Determines whether two specified instances of are not equal. - - The first object to compare. - The second object to compare. - true if and are not equal; otherwise, false. - - - - Returns a value indicating whether this instance is equal to a specified object. - - An object to compare to this instance. - true if is a and has the same value as this instance; otherwise, false. - - - - Serves as a hash function for a object. - - A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table. - - - - Returns a that represents the current . - - A that represents the current . - - - - A stuct that represents the controller capabilities. - - - - - Gets a value indicating if the controller is connected. - - true if it is connected; otherwise, false. - - - - Gets the gamepad display name. - - This property is not available in XNA. - - String representing the display name of the gamepad. - - - - Gets the unique identifier of the gamepad. - - This property is not available in XNA. - - String representing the unique identifier of the gamepad. - - - - Gets a value indicating whether the controller has the button A. - - true if it has the button A; otherwise, false. - - - - Gets a value indicating whether the controller has the button Back. - - true if it has the button Back; otherwise, false. - - - - Gets a value indicating whether the controller has the button B. - - true if it has the button B; otherwise, false. - - - - Gets a value indicating whether the controller has the directional pad down button. - - true if it has the directional pad down button; otherwise, false. - - - - Gets a value indicating whether the controller has the directional pad left button. - - true if it has the directional pad left button; otherwise, false. - - - - Gets a value indicating whether the controller has the directional pad right button. - - true if it has the directional pad right button; otherwise, false. - - - - Gets a value indicating whether the controller has the directional pad up button. - - true if it has the directional pad up button; otherwise, false. - - - - Gets a value indicating whether the controller has the left shoulder button. - - true if it has the left shoulder button; otherwise, false. - - - - Gets a value indicating whether the controller has the left stick button. - - true if it has the left stick button; otherwise, false. - - - - Gets a value indicating whether the controller has the right shoulder button. - - true if it has the right shoulder button; otherwise, false. - - - - Gets a value indicating whether the controller has the right stick button. - - true if it has the right stick button; otherwise, false. - - - - Gets a value indicating whether the controller has the button Start. - - true if it has the button Start; otherwise, false. - - - - Gets a value indicating whether the controller has the button X. - - true if it has the button X; otherwise, false. - - - - Gets a value indicating whether the controller has the button Y. - - true if it has the button Y; otherwise, false. - - - - Gets a value indicating whether the controller has the guide button. - - true if it has the guide button; otherwise, false. - - - - Gets a value indicating whether the controller has X axis for the left stick (thumbstick) button. - - true if it has X axis for the left stick (thumbstick) button; otherwise, false. - - - - Gets a value indicating whether the controller has Y axis for the left stick (thumbstick) button. - - true if it has Y axis for the left stick (thumbstick) button; otherwise, false. - - - - Gets a value indicating whether the controller has X axis for the right stick (thumbstick) button. - - true if it has X axis for the right stick (thumbstick) button; otherwise, false. - - - - Gets a value indicating whether the controller has Y axis for the right stick (thumbstick) button. - - true if it has Y axis for the right stick (thumbstick) button; otherwise, false. - - - - Gets a value indicating whether the controller has the left trigger button. - - true if it has the left trigger button; otherwise, false. - - - - Gets a value indicating whether the controller has the right trigger button. - - true if it has the right trigger button; otherwise, false. - - - - Gets a value indicating whether the controller has the left vibration motor. - - true if it has the left vibration motor; otherwise, false. - - - - Gets a value indicating whether the controller has the right vibration motor. - - true if it has the right vibration motor; otherwise, false. - - - - Gets a value indicating whether the controller has a microphone. - - true if it has a microphone; otherwise, false. - - - - Gets the type of the controller. - - A representing the controller type.. - - - - Determines whether a specified instance of - is equal to another specified . - - The first to compare. - The second to compare. - true if left and right are equal; otherwise, false. - - - - Determines whether a specified instance of - is not equal to another specified . - - The first to compare. - The second to compare. - true if left and right are not equal; otherwise, false. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - true if the specified is equal to the current - ; otherwise, false. - - - - Serves as a hash function for a object. - - A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table. - - - - Returns a that represents the current . - - A that represents the current . - - - - Specifies a type of dead zone processing to apply to Xbox 360 Controller - analog sticks when calling GetState. - - - - - The values of each stick are not processed and are returned by GetState as - "raw" values. This is best if you intend to implement your own dead zone - processing. - - - - - The X and Y positions of each stick are compared against the dead zone independently. - This setting is the default when calling GetState. - - - - - The combined X and Y position of each stick is compared to the dead zone. - This provides better control than IndependentAxes when the stick is used - as a two-dimensional control surface, such as when controlling a character's - view in a first-person game. - - - - - Gets a value indicating wethever down is pressed on the directional pad. - - if the down button is pressed; otherwise, . - - - - Gets a value indicating wethever left is pressed on the directional pad. - - if the left button is pressed; otherwise, . - - - - Gets a value indicating wethever right is pressed on the directional pad. - - if the right button is pressed; otherwise, . - - - - Gets a value indicating wethever up is pressed on the directional pad. - - if the up button is pressed; otherwise, . - - - - Initializes a new instance of the struct. - - Current state of directional pad up. - Current state of directional pad down. - Current state of directional pad left. - Current state of directional pad right. - - - - Determines whether two specified instances of are equal. - - The first object to compare. - The second object to compare. - true if and are equal; otherwise, false. - - - - Determines whether two specified instances of are not equal. - - The first object to compare. - The second object to compare. - true if and are not equal; otherwise, false. - - - - Returns a value indicating whether this instance is equal to a specified object. - - An object to compare to this instance. - true if is a and has the same value as this instance; otherwise, false. - - - - Serves as a hash function for a object. - - A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table. - - - - Returns a that represents the current - in a format of 0000 where each number represents a boolean value of each respecting object property: Left, Up, Right, Down. - - A that represents the current . - - - - Represents specific information about the state of the controller, - including the current state of buttons and sticks. - - This is implemented as a partial struct to allow for individual platforms - to offer additional data without separate state queries to GamePad. - - - - - The default initialized gamepad state. - - - - - Gets a value indicating if the controller is connected. - - true if it is connected; otherwise, false. - - - - Gets the packet number associated with this state. - - The packet number. - - - - Gets a structure that identifies what buttons on the controller are pressed. - - The buttons structure. - - - - Gets a structure that identifies what directions of the directional pad on the controller are pressed. - - The directional pad structure. - - - - Gets a structure that indicates the position of the controller sticks (thumbsticks). - - The thumbsticks position. - - - - Gets a structure that identifies the position of triggers on the controller. - - Positions of the triggers. - - - - Initializes a new instance of the struct - using the specified GamePadThumbSticks, GamePadTriggers, GamePadButtons, and GamePadDPad. - - Initial thumbstick state. - Initial trigger state.. - Initial button state. - Initial directional pad state. - - - - Initializes a new instance of the struct - using the specified stick, trigger, and button values. - - Left stick value. Each axis is clamped between −1.0 and 1.0. - Right stick value. Each axis is clamped between −1.0 and 1.0. - Left trigger value. This value is clamped between 0.0 and 1.0. - Right trigger value. This value is clamped between 0.0 and 1.0. - Button(s) to initialize as pressed. - - - - Initializes a new instance of the struct - using the specified stick, trigger, and button values. - - Left stick value. Each axis is clamped between −1.0 and 1.0. - Right stick value. Each axis is clamped between −1.0 and 1.0. - Left trigger value. This value is clamped between 0.0 and 1.0. - Right trigger value. This value is clamped between 0.0 and 1.0. - Array of Buttons to initialize as pressed. - - - - Gets the button mask along with 'virtual buttons' like LeftThumbstickLeft. - - - - - Determines whether specified input device buttons are pressed in this GamePadState. - - true, if button was pressed, false otherwise. - Buttons to query. Specify a single button, or combine multiple buttons using a bitwise OR operation. - - - - Determines whether specified input device buttons are released (not pressed) in this GamePadState. - - true, if button was released (not pressed), false otherwise. - Buttons to query. Specify a single button, or combine multiple buttons using a bitwise OR operation. - - - - Determines whether a specified instance of is equal - to another specified . - - The first to compare. - The second to compare. - true if left and right are equal; otherwise, false. - - - - Determines whether a specified instance of is not - equal to another specified . - - The first to compare. - The second to compare. - true if left and right are not equal; otherwise, false. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - true if the specified is equal to the current - ; otherwise, false. - - - - Serves as a hash function for a object. - - A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table. - - - - Returns a that represents the current . - - A that represents the current . - - - - A struct that represents the current stick (thumbstick) states for the controller. - - - - - Gets a value indicating the position of the left stick (thumbstick). - - A indicating the current position of the left stick (thumbstick). - - - - Gets a value indicating the position of the right stick (thumbstick). - - A indicating the current position of the right stick (thumbstick). - - - - Determines whether two specified instances of are equal. - - The first object to compare. - The second object to compare. - true if and are equal; otherwise, false. - - - - Determines whether two specified instances of are not equal. - - The first object to compare. - The second object to compare. - true if and are not equal; otherwise, false. - - - - Returns a value indicating whether this instance is equal to a specified object. - - An object to compare to this instance. - true if is a and has the same value as this instance; otherwise, false. - - - - Serves as a hash function for a object. - - A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table. - - - - Returns a that represents the current . - - A that represents the current . - - - - A struct that countains information on the left and the right trigger buttons. - - - - - Gets the position of the left trigger. - - A value from 0.0f to 1.0f representing left trigger. - - - - Gets the position of the right trigger. - - A value from 0.0f to 1.0f representing right trigger. - - - - Initializes a new instance of the struct. - - The position of the left trigger, the value will get clamped between 0.0f and 1.0f. - The position of the right trigger, the value will get clamped between 0.0f and 1.0f. - - - - Determines whether two specified instances of are equal. - - The first object to compare. - The second object to compare. - true if and are equal; otherwise, false. - - - - Determines whether two specified instances of are not equal. - - The first object to compare. - The second object to compare. - true if and are not equal; otherwise, false. - - - - Returns a value indicating whether this instance is equal to a specified object. - - An object to compare to this instance. - true if is a and has the same value as this instance; otherwise, false. - - - - Serves as a hash function for a object. - - A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table. - - - - Returns a that represents the current . - - A that represents the current . - - - - Defines a type of gamepad. - - - - - Unknown. - - - - - GamePad is the XBOX controller. - - - - - GamePad is a wheel. - - - - - GamePad is an arcade stick. - - - - - GamePad is a flight stick. - - - - - GamePad is a dance pad. - - - - - GamePad is a guitar. - - - - - GamePad is an alternate guitar. - - - - - GamePad is a drum kit. - - - - - GamePad is a big button pad. - - - - - Allows interaction with joysticks. Unlike the number of Buttons/Axes/DPads is not limited. - - - - - Gets a value indicating whether the current platform supports reading raw joystick data. - - true if the current platform supports reading raw joystick data; otherwise, false. - - - - Gets the capabilites of the joystick. - - Index of the joystick you want to access. - The capabilites of the joystick. - - - - Gets the current state of the joystick. - - Index of the joystick you want to access. - The state of the joystick. - - - - Describes joystick capabilities. - - - - - Gets a value indicating whether the joystick is connected. - - true if the joystick is connected; otherwise, false. - - - - Gets the unique identifier of the joystick. - - String representing the unique identifier of the joystick. - - - - Gets a value indicating if the joystick is a gamepad. - - true if the joystick is a gamepad; otherwise, false. - - - - Gets the axis count. - - The number of axes that the joystick possesses. - - - - Gets the button count. - - The number of buttons that the joystick possesses. - - - - Gets the hat count. - - The number of hats/dpads that the joystick possesses. - - - - Determines whether a specified instance of - is equal to another specified . - - The first to compare. - The second to compare. - true if left and right are equal; otherwise, false. - - - - Determines whether a specified instance of - is not equal to another specified . - - The first to compare. - The second to compare. - true if left and right are not equal; otherwise, false. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - true if the specified is equal to the current - ; otherwise, false. - - - - Serves as a hash function for a object. - - A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table. - - - - Returns a that represents the current . - - A that represents the current . - - - - Describes joystick hat state. - - - - - Gets if joysticks hat "down" is pressed. - - if the button is pressed otherwise, . - - - - Gets if joysticks hat "left" is pressed. - - if the button is pressed otherwise, . - - - - Gets if joysticks hat "right" is pressed. - - if the button is pressed otherwise, . - - - - Gets if joysticks hat "up" is pressed. - - if the button is pressed otherwise, . - - - - Determines whether a specified instance of is equal - to another specified . - - The first to compare. - The second to compare. - true if left and right are equal; otherwise, false. - - - - Determines whether a specified instance of is not - equal to another specified . - - The first to compare. - The second to compare. - true if left and right are not equal; otherwise, false. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - true if the specified is equal to the current - ; otherwise, false. - - - - Serves as a hash function for a object. - - A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table. - - - - Returns a that represents the current in a format of 0000 where each number represents a boolean value of each respecting object property: Left, Up, Right, Down. - - A that represents the current . - - - - Describes current joystick state. - - - - - Gets a value indicating whether the joystick is connected. - - true if the joystick is connected; otherwise, false. - - - - Gets the joystick axis values. - - An array list of ints that indicate axis values. - - - - Gets the joystick button values. - - An array list of ButtonState that indicate button values. - - - - Gets the joystick hat values. - - An array list of that indicate hat values. - - - - Determines whether a specified instance of is - equal to another specified . - - The first to compare. - The second to compare. - true if left and right are equal; otherwise, false. - - - - Determines whether a specified instance of is not - equal to another specified . - - The first to compare. - The second to compare. - true if left and right are not equal; otherwise, false. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - true if the specified is equal to the current - ; otherwise, false. - - - - Serves as a hash function for a object. - - A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a - hash table. - - - - Returns a that represents the current . - - A that represents the current . - - - - Allows getting keystrokes from keyboard. - - - - - Returns the current keyboard state. - - Current keyboard state. - - - - Returns the current keyboard state for a given player. - - Player index of the keyboard. - Current keyboard state. - - - - Holds the state of keystrokes by a keyboard. - - - - - Gets the current state of the Caps Lock key. - - - - - Gets the current state of the Num Lock key. - - - - - Initializes a new instance of the class. - - List of keys to be flagged as pressed on initialization. - Caps Lock state. - Num Lock state. - - - - Initializes a new instance of the class. - - List of keys to be flagged as pressed on initialization. - - - - Returns the state of a specified key. - - The key to query. - The state of the key. - - - - Gets whether given key is currently being pressed. - - The key to query. - true if the key is pressed; false otherwise. - - - - Gets whether given key is currently being not pressed. - - The key to query. - true if the key is not pressed; false otherwise. - - - - Returns an array of values holding keys that are currently being pressed. - - The keys that are currently being pressed. - - - - Gets the hash code for instance. - - Hash code of the object. - - - - Compares whether two instances are equal. - - instance to the left of the equality operator. - instance to the right of the equality operator. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance to the left of the inequality operator. - instance to the right of the inequality operator. - true if the instances are different; false otherwise. - - - - Compares whether current instance is equal to specified object. - - The to compare. - true if the provided instance is same with current; false otherwise. - - - - Defines the keys on a keyboard. - - - - - Reserved. - - - - - BACKSPACE key. - - - - - TAB key. - - - - - ENTER key. - - - - - CAPS LOCK key. - - - - - ESC key. - - - - - SPACEBAR key. - - - - - PAGE UP key. - - - - - PAGE DOWN key. - - - - - END key. - - - - - HOME key. - - - - - LEFT ARROW key. - - - - - UP ARROW key. - - - - - RIGHT ARROW key. - - - - - DOWN ARROW key. - - - - - SELECT key. - - - - - PRINT key. - - - - - EXECUTE key. - - - - - PRINT SCREEN key. - - - - - INS key. - - - - - DEL key. - - - - - HELP key. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - A key. - - - - - B key. - - - - - C key. - - - - - D key. - - - - - E key. - - - - - F key. - - - - - G key. - - - - - H key. - - - - - I key. - - - - - J key. - - - - - K key. - - - - - L key. - - - - - M key. - - - - - N key. - - - - - O key. - - - - - P key. - - - - - Q key. - - - - - R key. - - - - - S key. - - - - - T key. - - - - - U key. - - - - - V key. - - - - - W key. - - - - - X key. - - - - - Y key. - - - - - Z key. - - - - - Left Windows key. - - - - - Right Windows key. - - - - - Applications key. - - - - - Computer Sleep key. - - - - - Numeric keypad 0 key. - - - - - Numeric keypad 1 key. - - - - - Numeric keypad 2 key. - - - - - Numeric keypad 3 key. - - - - - Numeric keypad 4 key. - - - - - Numeric keypad 5 key. - - - - - Numeric keypad 6 key. - - - - - Numeric keypad 7 key. - - - - - Numeric keypad 8 key. - - - - - Numeric keypad 9 key. - - - - - Multiply key. - - - - - Add key. - - - - - Separator key. - - - - - Subtract key. - - - - - Decimal key. - - - - - Divide key. - - - - - F1 key. - - - - - F2 key. - - - - - F3 key. - - - - - F4 key. - - - - - F5 key. - - - - - F6 key. - - - - - F7 key. - - - - - F8 key. - - - - - F9 key. - - - - - F10 key. - - - - - F11 key. - - - - - F12 key. - - - - - F13 key. - - - - - F14 key. - - - - - F15 key. - - - - - F16 key. - - - - - F17 key. - - - - - F18 key. - - - - - F19 key. - - - - - F20 key. - - - - - F21 key. - - - - - F22 key. - - - - - F23 key. - - - - - F24 key. - - - - - NUM LOCK key. - - - - - SCROLL LOCK key. - - - - - Left SHIFT key. - - - - - Right SHIFT key. - - - - - Left CONTROL key. - - - - - Right CONTROL key. - - - - - Left ALT key. - - - - - Right ALT key. - - - - - Browser Back key. - - - - - Browser Forward key. - - - - - Browser Refresh key. - - - - - Browser Stop key. - - - - - Browser Search key. - - - - - Browser Favorites key. - - - - - Browser Start and Home key. - - - - - Volume Mute key. - - - - - Volume Down key. - - - - - Volume Up key. - - - - - Next Track key. - - - - - Previous Track key. - - - - - Stop Media key. - - - - - Play/Pause Media key. - - - - - Start Mail key. - - - - - Select Media key. - - - - - Start Application 1 key. - - - - - Start Application 2 key. - - - - - The OEM Semicolon key on a US standard keyboard. - - - - - For any country/region, the '+' key. - - - - - For any country/region, the ',' key. - - - - - For any country/region, the '-' key. - - - - - For any country/region, the '.' key. - - - - - The OEM question mark key on a US standard keyboard. - - - - - The OEM tilde key on a US standard keyboard. - - - - - The OEM open bracket key on a US standard keyboard. - - - - - The OEM pipe key on a US standard keyboard. - - - - - The OEM close bracket key on a US standard keyboard. - - - - - The OEM singled/double quote key on a US standard keyboard. - - - - - Used for miscellaneous characters; it can vary by keyboard. - - - - - The OEM angle bracket or backslash key on the RT 102 key keyboard. - - - - - IME PROCESS key. - - - - - Attn key. - - - - - CrSel key. - - - - - ExSel key. - - - - - Erase EOF key. - - - - - Play key. - - - - - Zoom key. - - - - - PA1 key. - - - - - CLEAR key. - - - - - Green ChatPad key. - - - - - Orange ChatPad key. - - - - - PAUSE key. - - - - - IME Convert key. - - - - - IME NoConvert key. - - - - - Kana key on Japanese keyboards. - - - - - Kanji key on Japanese keyboards. - - - - - OEM Auto key. - - - - - OEM Copy key. - - - - - OEM Enlarge Window key. - - - - - Identifies the state of a keyboard key. - - - - - Key is released. - - - - - Key is pressed. - - - - - Allows reading position and button click information from mouse. - - - - - Gets or sets the window handle for current mouse processing. - - - - - This API is an extension to XNA. - Gets mouse state information that includes position and button - presses for the provided window - - Current state of the mouse. - - - - Gets mouse state information that includes position and button presses - for the primary window - - Current state of the mouse. - - - - Sets mouse cursor's relative position to game-window. - - Relative horizontal position of the cursor. - Relative vertical position of the cursor. - - - - Sets the cursor image to the specified MouseCursor. - - Mouse cursor to use for the cursor image. - - - - Describes a mouse cursor. - - - - - Gets the default arrow cursor. - - - - - Gets the cursor that appears when the mouse is over text editing regions. - - - - - Gets the waiting cursor that appears while the application/system is busy. - - - - - Gets the crosshair ("+") cursor. - - - - - Gets the cross between Arrow and Wait cursors. - - - - - Gets the northwest/southeast ("\") cursor. - - - - - Gets the northeast/southwest ("/") cursor. - - - - - Gets the horizontal west/east ("-") cursor. - - - - - Gets the vertical north/south ("|") cursor. - - - - - Gets the size all cursor which points in all directions. - - - - - Gets the cursor that points that something is invalid, usually a cross. - - - - - Gets the hand cursor, usually used for web links. - - - - - Creates a mouse cursor from the specified texture. - - Texture to use as the cursor image. - X cordinate of the image that will be used for mouse position. - Y cordinate of the image that will be used for mouse position. - - - - Represents a mouse state with cursor position and button press information. - - - - - Initializes a new instance of the MouseState. - - Horizontal position of the mouse in relation to the window. - Vertical position of the mouse in relation to the window. - Mouse scroll wheel's value. - Left mouse button's state. - Middle mouse button's state. - Right mouse button's state. - XBUTTON1's state. - XBUTTON2's state. - Normally should be used to get mouse current state. The constructor is provided for simulating mouse input. - - - - Initializes a new instance of the MouseState. - - Horizontal position of the mouse in relation to the window. - Vertical position of the mouse in relation to the window. - Mouse scroll wheel's value. - Left mouse button's state. - Middle mouse button's state. - Right mouse button's state. - XBUTTON1's state. - XBUTTON2's state. - Mouse horizontal scroll wheel's value. - Normally should be used to get mouse current state. The constructor is provided for simulating mouse input. - - - - Compares whether two MouseState instances are equal. - - MouseState instance on the left of the equal sign. - MouseState instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two MouseState instances are not equal. - - MouseState instance on the left of the equal sign. - MouseState instance on the right of the equal sign. - true if the objects are not equal; false otherwise. - - - - Compares whether current instance is equal to specified object. - - The MouseState to compare. - - - - - Gets the hash code for MouseState instance. - - Hash code of the object. - - - - Gets horizontal position of the cursor in relation to the window. - - - - - Gets vertical position of the cursor in relation to the window. - - - - - Gets cursor position. - - - - - Gets state of the left mouse button. - - - - - Gets state of the middle mouse button. - - - - - Gets state of the right mouse button. - - - - - Returns cumulative scroll wheel value since the game start. - - - - - Returns the cumulative horizontal scroll wheel value since the game start - - - - - Gets state of the XButton1. - - - - - Gets state of the XButton2. - - - - - Represents data from a multi-touch gesture over a span of time. - - - - - Gets the type of the gesture. - - - - - Gets the starting time for this multi-touch gesture sample. - - - - - Gets the position of the first touch-point in the gesture sample. - - - - - Gets the position of the second touch-point in the gesture sample. - - - - - Gets the delta information for the first touch-point in the gesture sample. - - - - - Gets the delta information for the second touch-point in the gesture sample. - - - - - Initializes a new . - - - - - - - - - - - Enumuration of values that represent different gestures that can be processed by . - - - - - No gestures. - - - - - The user touched a single point. - - - - - States completion of a drag gesture(VerticalDrag, HorizontalDrag, or FreeDrag). - - No position or delta information is available for this sample. - - - - States that a touch was combined with a quick swipe. - - Flicks does not contain position information. The velocity of it can be read from - - - - The use touched a point and then performed a free-form drag. - - - - - The use touched a single point for approximately one second. - - As this is a single event, it will not be contionusly fired while the user is holding the touch-point. - - - - The user touched the screen and performed either left to right or right to left drag gesture. - - - - - The user either converged or diverged two touch-points on the screen which is like a two-finger drag. - - When this gesture-type is enabled and two fingers are down, it takes precedence over drag gestures. - - - - An in-progress pinch operation was completed. - - No position or delta information is available for this sample. - - - - The user tapped the device twice which is always preceded by a Tap gesture. - - If the time between two touchs are long enough, insted two seperate single Tap gestures will be generated. - - - - The user touched the screen and performed either top to bottom or bottom to top drag gesture. - - - - - Provides state information for a touch screen enabled device. - - - - - States if a touch screen is available. - - - - - Initializes a new instance of the with a pre-determined set of touch locations. - - Array of items to initialize with. - - - - Returns specified by ID. - - - - - - - - States if touch collection is read only. - - - - - Returns the index of the first occurrence of specified item in the collection. - - to query. - - - - - Inserts a item into the indicated position. - - The position to insert into. - The item to insert. - - - - Removes the item at specified index. - - Index of the item that will be removed from collection. - - - - Gets or sets the item at the specified index of the collection. - - Position of the item. - - - - - Adds a to the collection. - - The item to be added. - - - - Clears all the items in collection. - - - - - Returns true if specified item exists in the collection, false otherwise./> - - The item to query for. - Returns true if queried item is found, false otherwise. - - - - Copies the collection to specified array starting from the given index. - - The array to copy items. - The starting index of the copy operation. - - - - Returns the number of items that exist in the collection. - - - - - Removes the specified item from the collection. - - The item to remove. - - - - - Returns an enumerator for the . - - Enumerable list of objects. - - - - Returns an enumerator for the . - - Enumerable list of objects. - - - - Returns an enumerator for the . - - Enumerable list of objects. - - - - Provides the ability to iterate through the TouchLocations in an TouchCollection. - - - - - Gets the current element in the TouchCollection. - - - - - Advances the enumerator to the next element of the TouchCollection. - - - - - Immediately releases the unmanaged resources used by this object. - - - - - Attributes - - - - - True if this touch was pressed and released on the same frame. - In this case we will keep it around for the user to get by GetState that frame. - However if they do not call GetState that frame, this touch will be forgotten. - - - - - Helper for assigning an invalid touch location. - - - - - Returns a copy of the touch with the state changed to moved. - - The new touch location. - - - - Updates the touch location using the new event. - - The next event for this touch location. - - - - Holds the possible state information for a touch location.. - - - - - This touch location position is invalid. - - Typically, you will encounter this state when a new touch location attempts to get the previous state of itself. - - - - This touch location position was updated or pressed at the same position. - - - - - This touch location position is new. - - - - - This touch location position was released. - - - - - Allows retrieval of information from Touch Panel device. - - - - - Gets the current state of the touch panel. - - - - - - Returns the next available gesture on touch panel device. - - - - - - The window handle of the touch panel. Purely for Xna compatibility. - - - - - Gets or sets the display height of the touch panel. - - - - - Gets or sets the display orientation of the touch panel. - - - - - Gets or sets the display width of the touch panel. - - - - - Gets or sets enabled gestures. - - - - - Returns true if a touch gesture is available. - - - - - Allows retrieval of capabilities information from touch panel device. - - - - - Returns true if a device is available for use. - - - - - Returns the maximum number of touch locations tracked by the touch panel device. - - - - - The reserved touchId for all mouse touch points. - - - - - The current touch state. - - - - - The current gesture state. - - - - - The positional scale to apply to touch input. - - - - - The current size of the display. - - - - - The next touch location identifier. - The value 1 is reserved for the mouse touch point. - - - - - The current timestamp that we use for setting the timestamp of new TouchLocations - - - - - The mapping between platform specific touch ids - and the touch ids we assign to touch locations. - - - - - The window handle of the touch panel. Purely for Xna compatibility. - - - - - Returns capabilities of touch panel device. - - - - - - Age all the touches, so any that were Pressed become Moved, and any that were Released are removed - - - - - Apply the given new touch to the state. If it is a Pressed it will be added as a new touch, otherwise we update the existing touch it matches - - - - - This will release all touch locations. It should only be - called on platforms where touch state is reset all at once. - - - - - Gets or sets the display height of the touch panel. - - - - - Gets or sets the display orientation of the touch panel. - - - - - Gets or sets the display width of the touch panel. - - - - - Gets or sets enabled gestures. - - - - - Returns true if a touch gesture is available. - - - - - Returns the next available gesture on touch panel device. - - - - - - Maximum distance a touch location can wiggle and - not be considered to have moved. - - - - - The pinch touch locations. - - - - - If true the pinch touch locations are valid and - a pinch gesture has begun. - - - - - Used to disable emitting of tap gestures. - - - - - Used to disable emitting of hold gestures. - - - - - Support for playing sound effects and XACT audio. - - - - - Represents how many channels are used in the audio data. - - - - Single channel. - - - Two channels. - - - - Represents a 3D audio emitter. Used to simulate 3D audio effects. - - - - Initializes a new AudioEmitter instance. - - - Gets or sets a scale applied to the Doppler effect between the AudioEmitter and an AudioListener. - - Defaults to 1.0 - A value of 1.0 leaves the Doppler effect unmodified. - - - - Gets or sets the emitter's forward vector. - - Defaults to Vector3.Forward. (new Vector3(0, 0, -1)) - Used with AudioListener.Velocity to calculate Doppler values. - The Forward and Up values must be orthonormal. - - - - Gets or sets the position of this emitter. - - - Gets or sets the emitter's Up vector. - - Defaults to Vector3.Up. (new Vector3(0, -1, 1)). - The Up and Forward vectors must be orthonormal. - - - - Gets or sets the emitter's velocity vector. - - Defaults to Vector3.Zero. - This value is only used when calculating Doppler values. - - - - - Represents a 3D audio listener. Used when simulating 3D Audio. - - - - Gets or sets the listener's forward vector. - - Defaults to Vector3.Forward. (new Vector3(0, 0, -1)) - Used with AudioListener.Velocity and AudioEmitter.Velocity to calculate Doppler values. - The Forward and Up vectors must be orthonormal. - - - - Gets or sets the listener's position. - - Defaults to Vector3.Zero. - - - - - Gets or sets the listener's up vector.. - - - Defaults to Vector3.Up (New Vector3(0, -1, 0)). - Used with AudioListener.Velocity and AudioEmitter.Velocity to calculate Doppler values. - The values of the Forward and Up vectors must be orthonormal. - - - - Gets or sets the listener's velocity vector. - - Defaults to Vector3.Zero. - Scaled by DopplerScale to calculate the Doppler effect value applied to a Cue. - This value is only used to calculate Doppler values. - - - - - Load a WAV file from stream. - - The stream positioned at the start of the WAV file. - Gets the OpenAL format enumeration value. - Gets the frequency or sample rate. - Gets the number of channels. - Gets the block alignment, important for compressed sounds. - Gets the number of bits per sample. - Gets the number of samples per block. - Gets the total number of samples. - The byte buffer containing the waveform data or compressed blocks. - - - - A for which the audio buffer is provided by the game at run time. - - - - - This value has no effect on DynamicSoundEffectInstance. - It may not be set. - - - - - Returns the number of audio buffers queued for playback. - - - - - The event that occurs when the number of queued audio buffers is less than or equal to 2. - - - This event may occur when is called or during playback when a buffer is completed. - - - - Sample rate, in Hertz (Hz). - Number of channels (mono or stereo). - - - - Returns the duration of an audio buffer of the specified size, based on the settings of this instance. - - Size of the buffer, in bytes. - The playback length of the buffer. - - - - Returns the size, in bytes, of a buffer of the specified duration, based on the settings of this instance. - - The playback length of the buffer. - The data size of the buffer, in bytes. - - - - Plays or resumes the DynamicSoundEffectInstance. - - - - - Pauses playback of the DynamicSoundEffectInstance. - - - - - Resumes playback of the DynamicSoundEffectInstance. - - - - - Immediately stops playing the DynamicSoundEffectInstance. - - - Calling this also releases all queued buffers. - - - - - Stops playing the DynamicSoundEffectInstance. - If the parameter is false, this call has no effect. - - - Calling this also releases all queued buffers. - - When set to false, this call has no effect. - - - - Queues an audio buffer for playback. - - - The buffer length must conform to alignment requirements for the audio format. - - The buffer containing PCM audio data. - - - - Queues an audio buffer for playback. - - - The buffer length must conform to alignment requirements for the audio format. - - The buffer containing PCM audio data. - The starting position of audio data. - The amount of bytes to use. - - - - Handles the buffer events of all DynamicSoundEffectInstance instances. - - - - - Updates buffer queues of the currently playing instances. - - - XNA posts events always on the main thread. - - - - - The exception thrown when the system attempts to play more SoundEffectInstances than allotted. - - - Most platforms have a hard limit on how many sounds can be played simultaneously. This exception is thrown when that limit is exceeded. - - - - - The exception thrown when no audio hardware is present, or driver issues are detected. - - - - A message describing the error. - - - A message describing the error. - The exception that is the underlying cause of the current exception. If not null, the current exception is raised in a try/catch block that handled the innerException. - - - - Sets up the hardware resources used by the controller. - - - - - Open the sound device, sets up an audio context, and makes the new context - the current context. Note that this method will stop the playback of - music that was running prior to the game start. If any error occurs, then - the state of the controller is reset. - - True if the sound controller was setup, and false if not. - - - - Destroys the AL context and closes the device, when they exist. - - - - - Dispose of the OpenALSoundCOntroller. - - - - - Dispose of the OpenALSoundCOntroller. - - If true, the managed resources are to be disposed. - - - - Reserves a sound buffer and return its identifier. If there are no available sources - or the controller was not able to setup the hardware then an - is thrown. - - The source number of the reserved sound buffer. - - - Represents a loaded sound resource. - - A SoundEffect represents the buffer used to hold audio data and metadata. SoundEffectInstances are used to play from SoundEffects. Multiple SoundEffectInstance objects can be created and played from the same SoundEffect object. - The only limit on the number of loaded SoundEffects is restricted by available memory. When a SoundEffect is disposed, all SoundEffectInstances created from it will become invalid. - SoundEffect.Play() can be used for 'fire and forget' sounds. If advanced playback controls like volume or pitch is required, use SoundEffect.CreateInstance(). - - - - - Create a sound effect. - - The buffer with the sound data. - The sound data sample rate in hertz. - The number of channels in the sound data. - This only supports uncompressed 16bit PCM wav data. - - - - Create a sound effect. - - The buffer with the sound data. - The offset to the start of the sound data in bytes. - The length of the sound data in bytes. - The sound data sample rate in hertz. - The number of channels in the sound data. - The position where the sound should begin looping in samples. - The duration of the sound data loop in samples. - This only supports uncompressed 16bit PCM wav data. - - - - Releases unmanaged resources and performs other cleanup operations before the - is reclaimed by garbage collection. - - - - - Creates a new SoundEffectInstance for this SoundEffect. - - A new SoundEffectInstance for this SoundEffect. - Creating a SoundEffectInstance before calling SoundEffectInstance.Play() allows you to access advanced playback features, such as volume, pitch, and 3D positioning. - - - - Creates a new SoundEffect object based on the specified data stream. - - A stream containing the wave data. - A new SoundEffect object. - The stream must point to the head of a valid wave file in the RIFF bitstream format. The formats supported are: - - - 8-bit unsigned PCM - 16-bit signed PCM - 24-bit signed PCM - 32-bit IEEE float PCM - MS-ADPCM 4-bit compressed - IMA/ADPCM (IMA4) 4-bit compressed - - - - - - - Returns the duration for 16-bit PCM audio. - - The length of the audio data in bytes. - Sample rate, in Hertz (Hz). Must be between 8000 Hz and 48000 Hz - Number of channels in the audio data. - The duration of the audio data. - - - - Returns the data size in bytes for 16bit PCM audio. - - The total duration of the audio data. - Sample rate, in Hertz (Hz), of audio data. Must be between 8,000 and 48,000 Hz. - Number of channels in the audio data. - The size in bytes of a single sample of audio data. - - - Gets an internal SoundEffectInstance and plays it. - True if a SoundEffectInstance was successfully played, false if not. - - Play returns false if more SoundEffectInstances are currently playing then the platform allows. - To loop a sound or apply 3D effects, call SoundEffect.CreateInstance() and SoundEffectInstance.Play() instead. - SoundEffectInstances used by SoundEffect.Play() are pooled internally. - - - - Gets an internal SoundEffectInstance and plays it with the specified volume, pitch, and panning. - True if a SoundEffectInstance was successfully created and played, false if not. - Volume, ranging from 0.0 (silence) to 1.0 (full volume). Volume during playback is scaled by SoundEffect.MasterVolume. - Pitch adjustment, ranging from -1.0 (down an octave) to 0.0 (no change) to 1.0 (up an octave). - Panning, ranging from -1.0 (left speaker) to 0.0 (centered), 1.0 (right speaker). - - Play returns false if more SoundEffectInstances are currently playing then the platform allows. - To apply looping or simulate 3D audio, call SoundEffect.CreateInstance() and SoundEffectInstance.Play() instead. - SoundEffectInstances used by SoundEffect.Play() are pooled internally. - - - - - Returns a sound effect instance from the pool or null if none are available. - - - - Gets the duration of the SoundEffect. - - - Gets or sets the asset name of the SoundEffect. - - - - Gets or sets the master volume scale applied to all SoundEffectInstances. - - - Each SoundEffectInstance has its own Volume property that is independent to SoundEffect.MasterVolume. During playback SoundEffectInstance.Volume is multiplied by SoundEffect.MasterVolume. - This property is used to adjust the volume on all current and newly created SoundEffectInstances. The volume of an individual SoundEffectInstance can be adjusted on its own. - - - - - Gets or sets the scale of distance calculations. - - - DistanceScale defaults to 1.0 and must be greater than 0.0. - Higher values reduce the rate of falloff between the sound and listener. - - - - - Gets or sets the scale of Doppler calculations applied to sounds. - - - DopplerScale defaults to 1.0 and must be greater or equal to 0.0 - Affects the relative velocity of emitters and listeners. - Higher values more dramatically shift the pitch for the given relative velocity of the emitter and listener. - - - - Returns the speed of sound used when calculating the Doppler effect.. - - Defaults to 343.5. Value is measured in meters per second. - Has no effect on distance attenuation. - - - - Indicates whether the object is disposed. - - - Releases the resources held by this . - - - - Releases the resources held by this . - - If set to true, Dispose was called explicitly. - If the disposing parameter is true, the Dispose method was called explicitly. This - means that managed objects referenced by this instance should be disposed or released as - required. If the disposing parameter is false, Dispose was called by the finalizer and - no managed objects should be touched because we do not know if they are still valid or - not at that time. Unmanaged resources should always be released. - - - Represents a single instance of a playing, paused, or stopped sound. - - SoundEffectInstances are created through SoundEffect.CreateInstance() and used internally by SoundEffect.Play() - - - - Enables or Disables whether the SoundEffectInstance should repeat after playback. - This value has no effect on an already playing sound. - - - Gets or sets the pan, or speaker balance.. - Pan value ranging from -1.0 (left speaker) to 0.0 (centered), 1.0 (right speaker). Values outside of this range will throw an exception. - - - Gets or sets the pitch adjustment. - Pitch adjustment, ranging from -1.0 (down an octave) to 0.0 (no change) to 1.0 (up an octave). Values outside of this range will throw an Exception. - - - Gets or sets the volume of the SoundEffectInstance. - Volume, ranging from 0.0 (silence) to 1.0 (full volume). Volume during playback is scaled by SoundEffect.MasterVolume. - - This is the volume relative to SoundEffect.MasterVolume. Before playback, this Volume property is multiplied by SoundEffect.MasterVolume when determining the final mix volume. - - - - Gets the SoundEffectInstance's current playback state. - - - Indicates whether the object is disposed. - - - - Releases unmanaged resources and performs other cleanup operations before the - is reclaimed by garbage collection. - - - - Applies 3D positioning to the SoundEffectInstance using a single listener. - Data about the listener. - Data about the source of emission. - - - Applies 3D positioning to the SoundEffectInstance using multiple listeners. - Data about each listener. - Data about the source of emission. - - - Pauses playback of a SoundEffectInstance. - Paused instances can be resumed with SoundEffectInstance.Play() or SoundEffectInstance.Resume(). - - - Plays or resumes a SoundEffectInstance. - Throws an exception if more sounds are playing than the platform allows. - - - Resumes playback for a SoundEffectInstance. - Only has effect on a SoundEffectInstance in a paused state. - - - Immediately stops playing a SoundEffectInstance. - - - Stops playing a SoundEffectInstance, either immediately or as authored. - Determined whether the sound stops immediately, or after playing its release phase and/or transitions. - Stopping a sound with the immediate argument set to false will allow it to play any release phases, such as fade, before coming to a stop. - - - Releases the resources held by this . - - - - Releases the resources held by this . - - If set to true, Dispose was called explicitly. - If the disposing parameter is true, the Dispose method was called explicitly. This - means that managed objects referenced by this instance should be disposed or released as - required. If the disposing parameter is false, Dispose was called by the finalizer and - no managed objects should be touched because we do not know if they are still valid or - not at that time. Unmanaged resources should always be released. - - - - Creates a standalone SoundEffectInstance from given wavedata. - - - - - Gets the OpenAL sound controller, constructs the sound buffer, and sets up the event delegates for - the reserved and recycled events. - - - - - Converts the XNA [-1, 1] pitch range to OpenAL pitch (0, INF) or Android SoundPool playback rate [0.5, 2]. - The pitch of the sound in the Microsoft XNA range. - - - - - Gets a value indicating whether the platform has capacity for more sounds to be played at this time. - - true if more sounds can be played; otherwise, false. - - - - Add the specified instance to the pool if it is a pooled instance and removes it from the - list of playing instances. - - The SoundEffectInstance - - - - Adds the SoundEffectInstance to the list of playing instances. - - The SoundEffectInstance to add to the playing list. - - - - Returns a pooled SoundEffectInstance if one is available, or allocates a new - SoundEffectInstance if the pool is empty. - - The SoundEffectInstance. - - - - Iterates the list of playing instances, returning them to the pool if they - have stopped playing. - - - - - Iterates the list of playing instances, stop them and return them to the pool if they are instances of the given SoundEffect. - - The SoundEffect - - - Described the playback state of a SoundEffectInstance. - - - The SoundEffectInstance is currently playing. - - - The SoundEffectInstance is currently paused. - - - The SoundEffectInstance is currently stopped. - - - - Microphone state. - - - - - Provides microphones capture features. - - - Provides microphones capture features. - - - - - Returns the friendly name of the microphone. - - - - - Gets or sets the capture buffer duration. This value must be greater than 100 milliseconds, lower than 1000 milliseconds, and must be 10 milliseconds aligned (BufferDuration % 10 == 10). - - - - - Determines if the microphone is a wired headset. - Note: XNA could know if a headset microphone was plugged in an Xbox 360 controller but MonoGame can't. - Hence, this is always true on mobile platforms, and always false otherwise. - - - - - Returns the sample rate of the captured audio. - Note: default value is 44100hz - - - - - Returns the state of the Microphone. - - - - - Returns all compatible microphones. - - - - - Returns the default microphone. - - - - - Returns the duration based on the size of the buffer (assuming 16-bit PCM data). - - Size, in bytes - TimeSpan of the duration. - - - - Returns the size, in bytes, of the array required to hold the specified duration of 16-bit PCM data. - - TimeSpan of the duration of the sample. - Size, in bytes, of the buffer. - - - - Starts microphone capture. - - - - - Stops microphone capture. - - - - - Gets the latest available data from the microphone. - - Buffer, in bytes, of the captured data (16-bit PCM). - The buffer size, in bytes, of the captured data. - - - - Gets the latest available data from the microphone. - - Buffer, in bytes, of the captured data (16-bit PCM). - Byte offset. - Amount, in bytes. - The buffer size, in bytes, of the captured data. - - - - Event fired when the audio data are available. - - - - - The exception thrown when no audio hardware is present, or driver issues are detected. - - - - A message describing the error. - - - A message describing the error. - The exception that is the underlying cause of the current exception. If not null, the current exception is raised in a try/catch block that handled the innerException. - - - - Provides functionality for manipulating multiple sounds at a time. - - - - - Gets the category's friendly name. - - - - - Pauses all associated sounds. - - - - - Resumes all associated paused sounds. - - - - - Stops all associated sounds. - - - - - Determines whether two AudioCategory instances are equal. - - First AudioCategory instance to compare. - Second AudioCategory instance to compare. - true if the objects are equal or false if they aren't. - - - - Determines whether two AudioCategory instances are not equal. - - First AudioCategory instance to compare. - Second AudioCategory instance to compare. - true if the objects are not equal or false if they are. - - - - Determines whether two AudioCategory instances are equal. - - AudioCategory to compare with this instance. - true if the objects are equal or false if they aren't - - - - Determines whether two AudioCategory instances are equal. - - Object to compare with this instance. - true if the objects are equal or false if they aren't. - - - - Gets the hash code for this instance. - - Hash code for this object. - - - - Returns the name of this AudioCategory - - Friendly name of the AudioCategory - - - - Class used to create and manipulate code audio objects. - - - - - The current content version. - - - - Path to a XACT settings file. - - - Path to a XACT settings file. - Determines how many milliseconds the engine will look ahead when determing when to transition to another sound. - A string that specifies the audio renderer to use. - For the best results, use a lookAheadTime of 250 milliseconds or greater. - - - - Performs periodic work required by the audio engine. - - Must be called at least once per frame. - - - Returns an audio category by name. - Friendly name of the category to get. - The AudioCategory with a matching name. Throws an exception if not found. - - - Gets the value of a global variable. - Friendly name of the variable. - float value of the queried variable. - A global variable has global scope. It can be accessed by all code within a project. - - - Sets the value of a global variable. - Friendly name of the variable. - Value of the global variable. - - - - This event is triggered when the AudioEngine is disposed. - - - - - Is true if the AudioEngine has been disposed. - - - - - Disposes the AudioEngine. - - - - Controls how Cue objects should cease playback when told to stop. - - - Stop normally, playing any pending release phases or transitions. - - - Immediately stops the cue, ignoring any pending release phases or transitions. - - - Manages the playback of a sound or set of sounds. - - Cues are comprised of one or more sounds. - Cues also define specific properties such as pitch or volume. - Cues are referenced through SoundBank objects. - - - - Indicates whether or not the cue is currently paused. - IsPlaying and IsPaused both return true if a cue is paused while playing. - - - Indicates whether or not the cue is currently playing. - IsPlaying and IsPaused both return true if a cue is paused while playing. - - - Indicates whether or not the cue is currently stopped. - - - Gets the friendly name of the cue. - The friendly name is a value set from the designer. - - - Pauses playback. - - - Requests playback of a prepared or preparing Cue. - Calling Play when the Cue already is playing can result in an InvalidOperationException. - - - Resumes playback of a paused Cue. - - - Stops playback of a Cue. - Specifies if the sound should play any pending release phases or transitions before stopping. - - - - Sets the value of a cue-instance variable based on its friendly name. - - Friendly name of the variable to set. - Value to assign to the variable. - The friendly name is a value set from the designer. - - - Gets a cue-instance variable value based on its friendly name. - Friendly name of the variable. - Value of the variable. - - Cue-instance variables are useful when multiple instantiations of a single cue (and its associated sounds) are required (for example, a "car" cue where there may be more than one car at any given time). While a global variable allows multiple audio elements to be controlled in unison, a cue instance variable grants discrete control of each instance of a cue, even for each copy of the same cue. - The friendly name is a value set from the designer. - - - - Updates the simulated 3D Audio settings calculated between an AudioEmitter and AudioListener. - The listener to calculate. - The emitter to calculate. - - This must be called before Play(). - Calling this method automatically converts the sound to monoaural and sets the speaker mix for any sound played by this cue to a value calculated with the listener's and emitter's positions. Any stereo information in the sound will be discarded. - - - - - This event is triggered when the Cue is disposed. - - - - - Is true if the Cue has been disposed. - - - - - Disposes the Cue. - - - - Represents a collection of Cues. - - - - Is true if the SoundBank has any live Cues in use. - - - - AudioEngine that will be associated with this sound bank. - Path to a .xsb SoundBank file. - - - - Returns a pooled Cue object. - - Friendly name of the cue to get. - a unique Cue object from a pool. - - Cue instances are unique, even when sharing the same name. This allows multiple instances to simultaneously play. - - - - - Plays a cue. - - Name of the cue to play. - - - - Plays a cue with static 3D positional information. - - - Commonly used for short lived effects. To dynamically change the 3D - positional information on a cue over time use and . - The name of the cue to play. - The listener state. - The cue emitter state. - - - - This event is triggered when the SoundBank is disposed. - - - - - Is true if the SoundBank has been disposed. - - - - - Disposes the SoundBank. - - - - Represents a collection of wave files. - - - - - - - - - - - Instance of the AudioEngine to associate this wave bank with. - Path to the .xwb file to load. - This constructor immediately loads all wave data into memory at once. - - - Instance of the AudioEngine to associate this wave bank with. - Path to the .xwb to stream from. - DVD sector-aligned offset within the wave bank data file. - Stream packet size, in sectors, to use for each stream. The minimum value is 2. - - This constructor streams wave data as needed. - Note that packetsize is in sectors, which is 2048 bytes. - AudioEngine.Update() must be called at least once before using data from a streaming wave bank. - - - - - This event is triggered when the WaveBank is disposed. - - - - - Is true if the WaveBank has been disposed. - - - - - Disposes the WaveBank. - - - - - Set the combined volume scale from the parent objects. - - The volume scale. - - - - Set the volume for the clip. - - The volume level. - - - - The runtime support for loading content pipeline content. - - - - - Virtual property to allow a derived ContentManager to have it's assets reloaded - - - - - External reference reader, provided for compatibility with XNA Framework built content - - - - - Creates an instance of the attribute. - - - - - Returns the overriden XML element name or the default "Item". - - - - - Returns true if the default CollectionItemName value was overridden. - - - - - This is used to specify the XML element name to use for each item in a collection. - - - - - Creates an instance of the attribute. - - The XML element name to use for each item in the collection. - - - - The XML element name to use for each item in the collection. - - - - - This is used to specify the type to use when deserializing this object at runtime. - - - - - Creates an instance of the attribute. - - The name of the type to use at runtime. - - - - The name of the type to use at runtime. - - - - - This is used to specify the version when deserializing this object at runtime. - - - - - Creates an instance of the attribute. - - The version passed to the type at runtime. - - - - The version passed to the type at runtime. - - - - - Removes Version, Culture and PublicKeyToken from a type string. - - - Supports multiple generic types (e.g. Dictionary<TKey,TValue>) and nested generic types (e.g. List<List<int>>). - - - A - - - A - - - - - Adds the type creator. - - - Type string. - - - Create function. - - - - - Returns a value indicating what side (positive/negative) of a plane a point is - - The point to check with - The plane to check against - Greater than zero if on the positive side, less than zero if on the negative size, 0 otherwise - - - - Returns the perpendicular distance from a point to a plane - - The point to check - The place to check - The perpendicular distance from the point to the plane - - - - Transforms a normalized plane by a matrix. - - The normalized plane to transform. - The transformation matrix. - The transformed plane. - - - - Transforms a normalized plane by a matrix. - - The normalized plane to transform. - The transformation matrix. - The transformed plane. - - - - Transforms a normalized plane by a quaternion rotation. - - The normalized plane to transform. - The quaternion rotation. - The transformed plane. - - - - Transforms a normalized plane by a quaternion rotation. - - The normalized plane to transform. - The quaternion rotation. - The transformed plane. - - - - Deconstruction method for . - - - - - - - Defines the intersection between a and a bounding volume. - - - - - There is no intersection, the bounding volume is in the negative half space of the plane. - - - - - There is no intersection, the bounding volume is in the positive half space of the plane. - - - - - The plane is intersected. - - - - - Defines the index of player for various MonoGame components. - - - - - The first player index. - - - - - The second player index. - - - - - The third player index. - - - - - The fourth player index. - - - - - Describes a 2D-point. - - - - - The x coordinate of this . - - - - - The y coordinate of this . - - - - - Returns a with coordinates 0, 0. - - - - - Constructs a point with X and Y from two values. - - The x coordinate in 2d-space. - The y coordinate in 2d-space. - - - - Constructs a point with X and Y set to the same value. - - The x and y coordinates in 2d-space. - - - - Adds two points. - - Source on the left of the add sign. - Source on the right of the add sign. - Sum of the points. - - - - Subtracts a from a . - - Source on the left of the sub sign. - Source on the right of the sub sign. - Result of the subtraction. - - - - Multiplies the components of two points by each other. - - Source on the left of the mul sign. - Source on the right of the mul sign. - Result of the multiplication. - - - - Divides the components of a by the components of another . - - Source on the left of the div sign. - Divisor on the right of the div sign. - The result of dividing the points. - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Gets the hash code of this . - - Hash code of this . - - - - Returns a representation of this in the format: - {X:[] Y:[]} - - representation of this . - - - - Gets a representation for this object. - - A representation for this object. - - - - Deconstruction method for . - - - - - - - The arguments to the event. - - - - - Create a new instance of the event. - - The default settings to be used in device creation. - - - - The default settings that will be used in device creation. - - - - - An efficient mathematical representation for three dimensional rotations. - - - - - The x coordinate of this . - - - - - The y coordinate of this . - - - - - The z coordinate of this . - - - - - The rotation component of this . - - - - - Constructs a quaternion with X, Y, Z and W from four values. - - The x coordinate in 3d-space. - The y coordinate in 3d-space. - The z coordinate in 3d-space. - The rotation component. - - - - Constructs a quaternion with X, Y, Z from and rotation component from a scalar. - - The x, y, z coordinates in 3d-space. - The rotation component. - - - - Constructs a quaternion from . - - The x, y, z coordinates in 3d-space and the rotation component. - - - - Returns a quaternion representing no rotation. - - - - - Creates a new that contains the sum of two quaternions. - - Source . - Source . - The result of the quaternion addition. - - - - Creates a new that contains the sum of two quaternions. - - Source . - Source . - The result of the quaternion addition as an output parameter. - - - - Creates a new that contains concatenation between two quaternion. - - The first to concatenate. - The second to concatenate. - The result of rotation of followed by rotation. - - - - Creates a new that contains concatenation between two quaternion. - - The first to concatenate. - The second to concatenate. - The result of rotation of followed by rotation as an output parameter. - - - - Transforms this quaternion into its conjugated version. - - - - - Creates a new that contains conjugated version of the specified quaternion. - - The quaternion which values will be used to create the conjugated version. - The conjugate version of the specified quaternion. - - - - Creates a new that contains conjugated version of the specified quaternion. - - The quaternion which values will be used to create the conjugated version. - The conjugated version of the specified quaternion as an output parameter. - - - - Creates a new from the specified axis and angle. - - The axis of rotation. - The angle in radians. - The new quaternion builded from axis and angle. - - - - Creates a new from the specified axis and angle. - - The axis of rotation. - The angle in radians. - The new quaternion builded from axis and angle as an output parameter. - - - - Creates a new from the specified . - - The rotation matrix. - A quaternion composed from the rotation part of the matrix. - - - - Creates a new from the specified . - - The rotation matrix. - A quaternion composed from the rotation part of the matrix as an output parameter. - - - - Creates a new from the specified yaw, pitch and roll angles. - - Yaw around the y axis in radians. - Pitch around the x axis in radians. - Roll around the z axis in radians. - A new quaternion from the concatenated yaw, pitch, and roll angles. - - - - Creates a new from the specified yaw, pitch and roll angles. - - Yaw around the y axis in radians. - Pitch around the x axis in radians. - Roll around the z axis in radians. - A new quaternion from the concatenated yaw, pitch, and roll angles as an output parameter. - - - - Divides a by the other . - - Source . - Divisor . - The result of dividing the quaternions. - - - - Divides a by the other . - - Source . - Divisor . - The result of dividing the quaternions as an output parameter. - - - - Returns a dot product of two quaternions. - - The first quaternion. - The second quaternion. - The dot product of two quaternions. - - - - Returns a dot product of two quaternions. - - The first quaternion. - The second quaternion. - The dot product of two quaternions as an output parameter. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Gets the hash code of this . - - Hash code of this . - - - - Returns the inverse quaternion which represents the opposite rotation. - - Source . - The inverse quaternion. - - - - Returns the inverse quaternion which represents the opposite rotation. - - Source . - The inverse quaternion as an output parameter. - - - - Returns the magnitude of the quaternion components. - - The magnitude of the quaternion components. - - - - Returns the squared magnitude of the quaternion components. - - The squared magnitude of the quaternion components. - - - - Performs a linear blend between two quaternions. - - Source . - Source . - The blend amount where 0 returns and 1 . - The result of linear blending between two quaternions. - - - - Performs a linear blend between two quaternions. - - Source . - Source . - The blend amount where 0 returns and 1 . - The result of linear blending between two quaternions as an output parameter. - - - - Performs a spherical linear blend between two quaternions. - - Source . - Source . - The blend amount where 0 returns and 1 . - The result of spherical linear blending between two quaternions. - - - - Performs a spherical linear blend between two quaternions. - - Source . - Source . - The blend amount where 0 returns and 1 . - The result of spherical linear blending between two quaternions as an output parameter. - - - - Creates a new that contains subtraction of one from another. - - Source . - Source . - The result of the quaternion subtraction. - - - - Creates a new that contains subtraction of one from another. - - Source . - Source . - The result of the quaternion subtraction as an output parameter. - - - - Creates a new that contains a multiplication of two quaternions. - - Source . - Source . - The result of the quaternion multiplication. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - The result of the quaternion multiplication with a scalar. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - The result of the quaternion multiplication with a scalar as an output parameter. - - - - Creates a new that contains a multiplication of two quaternions. - - Source . - Source . - The result of the quaternion multiplication as an output parameter. - - - - Flips the sign of the all the quaternion components. - - Source . - The result of the quaternion negation. - - - - Flips the sign of the all the quaternion components. - - Source . - The result of the quaternion negation as an output parameter. - - - - Scales the quaternion magnitude to unit length. - - - - - Scales the quaternion magnitude to unit length. - - Source . - The unit length quaternion. - - - - Scales the quaternion magnitude to unit length. - - Source . - The unit length quaternion an output parameter. - - - - Returns a representation of this in the format: - {X:[] Y:[] Z:[] W:[]} - - A representation of this . - - - - Gets a representation for this object. - - A representation for this object. - - - - Adds two quaternions. - - Source on the left of the add sign. - Source on the right of the add sign. - Sum of the vectors. - - - - Divides a by the other . - - Source on the left of the div sign. - Divisor on the right of the div sign. - The result of dividing the quaternions. - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Multiplies two quaternions. - - Source on the left of the mul sign. - Source on the right of the mul sign. - Result of the quaternions multiplication. - - - - Multiplies the components of quaternion by a scalar. - - Source on the left of the mul sign. - Scalar value on the right of the mul sign. - Result of the quaternion multiplication with a scalar. - - - - Subtracts a from a . - - Source on the left of the sub sign. - Source on the right of the sub sign. - Result of the quaternion subtraction. - - - - Flips the sign of the all the quaternion components. - - Source on the right of the sub sign. - The result of the quaternion negation. - - - - Deconstruction method for . - - Receives the start position of the ray. - Receives the direction of the ray. - - - - Describes a 2D-rectangle. - - - - - The x coordinate of the top-left corner of this . - - - - - The y coordinate of the top-left corner of this . - - - - - The width of this . - - - - - The height of this . - - - - - Returns a with X=0, Y=0, Width=0, Height=0. - - - - - Returns the x coordinate of the left edge of this . - - - - - Returns the x coordinate of the right edge of this . - - - - - Returns the y coordinate of the top edge of this . - - - - - Returns the y coordinate of the bottom edge of this . - - - - - Whether or not this has a and - of 0, and a of (0, 0). - - - - - The top-left coordinates of this . - - - - - The width-height coordinates of this . - - - - - A located in the center of this . - - - If or is an odd number, - the center point will be rounded down. - - - - - Creates a new instance of struct, with the specified - position, width, and height. - - The x coordinate of the top-left corner of the created . - The y coordinate of the top-left corner of the created . - The width of the created . - The height of the created . - - - - Creates a new instance of struct, with the specified - location and size. - - The x and y coordinates of the top-left corner of the created . - The width and height of the created . - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Gets whether or not the provided coordinates lie within the bounds of this . - - The x coordinate of the point to check for containment. - The y coordinate of the point to check for containment. - true if the provided coordinates lie inside this ; false otherwise. - - - - Gets whether or not the provided coordinates lie within the bounds of this . - - The x coordinate of the point to check for containment. - The y coordinate of the point to check for containment. - true if the provided coordinates lie inside this ; false otherwise. - - - - Gets whether or not the provided lies within the bounds of this . - - The coordinates to check for inclusion in this . - true if the provided lies inside this ; false otherwise. - - - - Gets whether or not the provided lies within the bounds of this . - - The coordinates to check for inclusion in this . - true if the provided lies inside this ; false otherwise. As an output parameter. - - - - Gets whether or not the provided lies within the bounds of this . - - The coordinates to check for inclusion in this . - true if the provided lies inside this ; false otherwise. - - - - Gets whether or not the provided lies within the bounds of this . - - The coordinates to check for inclusion in this . - true if the provided lies inside this ; false otherwise. As an output parameter. - - - - Gets whether or not the provided lies within the bounds of this . - - The to check for inclusion in this . - true if the provided 's bounds lie entirely inside this ; false otherwise. - - - - Gets whether or not the provided lies within the bounds of this . - - The to check for inclusion in this . - true if the provided 's bounds lie entirely inside this ; false otherwise. As an output parameter. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Gets the hash code of this . - - Hash code of this . - - - - Adjusts the edges of this by specified horizontal and vertical amounts. - - Value to adjust the left and right edges. - Value to adjust the top and bottom edges. - - - - Adjusts the edges of this by specified horizontal and vertical amounts. - - Value to adjust the left and right edges. - Value to adjust the top and bottom edges. - - - - Gets whether or not the other intersects with this rectangle. - - The other rectangle for testing. - true if other intersects with this rectangle; false otherwise. - - - - Gets whether or not the other intersects with this rectangle. - - The other rectangle for testing. - true if other intersects with this rectangle; false otherwise. As an output parameter. - - - - Creates a new that contains overlapping region of two other rectangles. - - The first . - The second . - Overlapping region of the two rectangles. - - - - Creates a new that contains overlapping region of two other rectangles. - - The first . - The second . - Overlapping region of the two rectangles as an output parameter. - - - - Changes the of this . - - The x coordinate to add to this . - The y coordinate to add to this . - - - - Changes the of this . - - The x coordinate to add to this . - The y coordinate to add to this . - - - - Changes the of this . - - The x and y components to add to this . - - - - Changes the of this . - - The x and y components to add to this . - - - - Returns a representation of this in the format: - {X:[] Y:[] Width:[] Height:[]} - - representation of this . - - - - Creates a new that completely contains two other rectangles. - - The first . - The second . - The union of the two rectangles. - - - - Creates a new that completely contains two other rectangles. - - The first . - The second . - The union of the two rectangles as an output parameter. - - - - Deconstruction method for . - - - - - - - - - This class is used for the game window's TextInput event as EventArgs. - - - - - Checks if the code is currently running on the UI thread. - - true if the code is currently running on the UI thread. - - - - Throws an exception if the code is not currently running on the UI thread. - - Thrown if the code is not currently running on the UI thread. - - - - Runs the given action on the UI thread and blocks the current thread while the action is running. - If the current thread is the UI thread, the action will run immediately. - - The action to be run on the UI thread - - - - Runs all pending actions. Must be called from the UI thread. - - - - - Returns an open stream to an exsiting file in the title storage area. - - The filepath relative to the title storage area. - A open stream or null if the file is not found. - - - - Describes a 2D-vector. - - - - - The x coordinate of this . - - - - - The y coordinate of this . - - - - - Returns a with components 0, 0. - - - - - Returns a with components 1, 1. - - - - - Returns a with components 1, 0. - - - - - Returns a with components 0, 1. - - - - - Constructs a 2d vector with X and Y from two values. - - The x coordinate in 2d-space. - The y coordinate in 2d-space. - - - - Constructs a 2d vector with X and Y set to the same value. - - The x and y coordinates in 2d-space. - - - - Inverts values in the specified . - - Source on the right of the sub sign. - Result of the inversion. - - - - Adds two vectors. - - Source on the left of the add sign. - Source on the right of the add sign. - Sum of the vectors. - - - - Subtracts a from a . - - Source on the left of the sub sign. - Source on the right of the sub sign. - Result of the vector subtraction. - - - - Multiplies the components of two vectors by each other. - - Source on the left of the mul sign. - Source on the right of the mul sign. - Result of the vector multiplication. - - - - Multiplies the components of vector by a scalar. - - Source on the left of the mul sign. - Scalar value on the right of the mul sign. - Result of the vector multiplication with a scalar. - - - - Multiplies the components of vector by a scalar. - - Scalar value on the left of the mul sign. - Source on the right of the mul sign. - Result of the vector multiplication with a scalar. - - - - Divides the components of a by the components of another . - - Source on the left of the div sign. - Divisor on the right of the div sign. - The result of dividing the vectors. - - - - Divides the components of a by a scalar. - - Source on the left of the div sign. - Divisor scalar on the right of the div sign. - The result of dividing a vector by a scalar. - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Performs vector addition on and . - - The first vector to add. - The second vector to add. - The result of the vector addition. - - - - Performs vector addition on and - , storing the result of the - addition in . - - The first vector to add. - The second vector to add. - The result of the vector addition. - - - - Creates a new that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 2d-triangle. - - The first vector of 2d-triangle. - The second vector of 2d-triangle. - The third vector of 2d-triangle. - Barycentric scalar b2 which represents a weighting factor towards second vector of 2d-triangle. - Barycentric scalar b3 which represents a weighting factor towards third vector of 2d-triangle. - The cartesian translation of barycentric coordinates. - - - - Creates a new that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 2d-triangle. - - The first vector of 2d-triangle. - The second vector of 2d-triangle. - The third vector of 2d-triangle. - Barycentric scalar b2 which represents a weighting factor towards second vector of 2d-triangle. - Barycentric scalar b3 which represents a weighting factor towards third vector of 2d-triangle. - The cartesian translation of barycentric coordinates as an output parameter. - - - - Creates a new that contains CatmullRom interpolation of the specified vectors. - - The first vector in interpolation. - The second vector in interpolation. - The third vector in interpolation. - The fourth vector in interpolation. - Weighting factor. - The result of CatmullRom interpolation. - - - - Creates a new that contains CatmullRom interpolation of the specified vectors. - - The first vector in interpolation. - The second vector in interpolation. - The third vector in interpolation. - The fourth vector in interpolation. - Weighting factor. - The result of CatmullRom interpolation as an output parameter. - - - - Clamps the specified value within a range. - - The value to clamp. - The min value. - The max value. - The clamped value. - - - - Clamps the specified value within a range. - - The value to clamp. - The min value. - The max value. - The clamped value as an output parameter. - - - - Returns the distance between two vectors. - - The first vector. - The second vector. - The distance between two vectors. - - - - Returns the distance between two vectors. - - The first vector. - The second vector. - The distance between two vectors as an output parameter. - - - - Returns the squared distance between two vectors. - - The first vector. - The second vector. - The squared distance between two vectors. - - - - Returns the squared distance between two vectors. - - The first vector. - The second vector. - The squared distance between two vectors as an output parameter. - - - - Divides the components of a by the components of another . - - Source . - Divisor . - The result of dividing the vectors. - - - - Divides the components of a by the components of another . - - Source . - Divisor . - The result of dividing the vectors as an output parameter. - - - - Divides the components of a by a scalar. - - Source . - Divisor scalar. - The result of dividing a vector by a scalar. - - - - Divides the components of a by a scalar. - - Source . - Divisor scalar. - The result of dividing a vector by a scalar as an output parameter. - - - - Returns a dot product of two vectors. - - The first vector. - The second vector. - The dot product of two vectors. - - - - Returns a dot product of two vectors. - - The first vector. - The second vector. - The dot product of two vectors as an output parameter. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Gets the hash code of this . - - Hash code of this . - - - - Creates a new that contains hermite spline interpolation. - - The first position vector. - The first tangent vector. - The second position vector. - The second tangent vector. - Weighting factor. - The hermite spline interpolation vector. - - - - Creates a new that contains hermite spline interpolation. - - The first position vector. - The first tangent vector. - The second position vector. - The second tangent vector. - Weighting factor. - The hermite spline interpolation vector as an output parameter. - - - - Returns the length of this . - - The length of this . - - - - Returns the squared length of this . - - The squared length of this . - - - - Creates a new that contains linear interpolation of the specified vectors. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors. - - - - Creates a new that contains linear interpolation of the specified vectors. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors as an output parameter. - - - - Creates a new that contains linear interpolation of the specified vectors. - Uses on MathHelper for the interpolation. - Less efficient but more precise compared to . - See remarks section of on MathHelper for more info. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors. - - - - Creates a new that contains linear interpolation of the specified vectors. - Uses on MathHelper for the interpolation. - Less efficient but more precise compared to . - See remarks section of on MathHelper for more info. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors as an output parameter. - - - - Creates a new that contains a maximal values from the two vectors. - - The first vector. - The second vector. - The with maximal values from the two vectors. - - - - Creates a new that contains a maximal values from the two vectors. - - The first vector. - The second vector. - The with maximal values from the two vectors as an output parameter. - - - - Creates a new that contains a minimal values from the two vectors. - - The first vector. - The second vector. - The with minimal values from the two vectors. - - - - Creates a new that contains a minimal values from the two vectors. - - The first vector. - The second vector. - The with minimal values from the two vectors as an output parameter. - - - - Creates a new that contains a multiplication of two vectors. - - Source . - Source . - The result of the vector multiplication. - - - - Creates a new that contains a multiplication of two vectors. - - Source . - Source . - The result of the vector multiplication as an output parameter. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - The result of the vector multiplication with a scalar. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - The result of the multiplication with a scalar as an output parameter. - - - - Creates a new that contains the specified vector inversion. - - Source . - The result of the vector inversion. - - - - Creates a new that contains the specified vector inversion. - - Source . - The result of the vector inversion as an output parameter. - - - - Turns this to a unit vector with the same direction. - - - - - Creates a new that contains a normalized values from another vector. - - Source . - Unit vector. - - - - Creates a new that contains a normalized values from another vector. - - Source . - Unit vector as an output parameter. - - - - Creates a new that contains reflect vector of the given vector and normal. - - Source . - Reflection normal. - Reflected vector. - - - - Creates a new that contains reflect vector of the given vector and normal. - - Source . - Reflection normal. - Reflected vector as an output parameter. - - - - Creates a new that contains cubic interpolation of the specified vectors. - - Source . - Source . - Weighting value. - Cubic interpolation of the specified vectors. - - - - Creates a new that contains cubic interpolation of the specified vectors. - - Source . - Source . - Weighting value. - Cubic interpolation of the specified vectors as an output parameter. - - - - Creates a new that contains subtraction of on from a another. - - Source . - Source . - The result of the vector subtraction. - - - - Creates a new that contains subtraction of on from a another. - - Source . - Source . - The result of the vector subtraction as an output parameter. - - - - Returns a representation of this in the format: - {X:[] Y:[]} - - A representation of this . - - - - Gets a representation for this object. - - A representation for this object. - - - - Creates a new that contains a transformation of 2d-vector by the specified . - - Source . - The transformation . - Transformed . - - - - Creates a new that contains a transformation of 2d-vector by the specified . - - Source . - The transformation . - Transformed as an output parameter. - - - - Creates a new that contains a transformation of 2d-vector by the specified , representing the rotation. - - Source . - The which contains rotation transformation. - Transformed . - - - - Creates a new that contains a transformation of 2d-vector by the specified , representing the rotation. - - Source . - The which contains rotation transformation. - Transformed as an output parameter. - - - - Apply transformation on vectors within array of by the specified and places the results in an another array. - - Source array. - The starting index of transformation in the source array. - The transformation . - Destination array. - The starting index in the destination array, where the first should be written. - The number of vectors to be transformed. - - - - Apply transformation on vectors within array of by the specified and places the results in an another array. - - Source array. - The starting index of transformation in the source array. - The which contains rotation transformation. - Destination array. - The starting index in the destination array, where the first should be written. - The number of vectors to be transformed. - - - - Apply transformation on all vectors within array of by the specified and places the results in an another array. - - Source array. - The transformation . - Destination array. - - - - Apply transformation on all vectors within array of by the specified and places the results in an another array. - - Source array. - The which contains rotation transformation. - Destination array. - - - - Creates a new that contains a transformation of the specified normal by the specified . - - Source which represents a normal vector. - The transformation . - Transformed normal. - - - - Creates a new that contains a transformation of the specified normal by the specified . - - Source which represents a normal vector. - The transformation . - Transformed normal as an output parameter. - - - - Apply transformation on normals within array of by the specified and places the results in an another array. - - Source array. - The starting index of transformation in the source array. - The transformation . - Destination array. - The starting index in the destination array, where the first should be written. - The number of normals to be transformed. - - - - Apply transformation on all normals within array of by the specified and places the results in an another array. - - Source array. - The transformation . - Destination array. - - - - Deconstruction method for . - - - - - - - Describes a 3D-vector. - - - - - The x coordinate of this . - - - - - The y coordinate of this . - - - - - The z coordinate of this . - - - - - Returns a with components 0, 0, 0. - - - - - Returns a with components 1, 1, 1. - - - - - Returns a with components 1, 0, 0. - - - - - Returns a with components 0, 1, 0. - - - - - Returns a with components 0, 0, 1. - - - - - Returns a with components 0, 1, 0. - - - - - Returns a with components 0, -1, 0. - - - - - Returns a with components 1, 0, 0. - - - - - Returns a with components -1, 0, 0. - - - - - Returns a with components 0, 0, -1. - - - - - Returns a with components 0, 0, 1. - - - - - Constructs a 3d vector with X, Y and Z from three values. - - The x coordinate in 3d-space. - The y coordinate in 3d-space. - The z coordinate in 3d-space. - - - - Constructs a 3d vector with X, Y and Z set to the same value. - - The x, y and z coordinates in 3d-space. - - - - Constructs a 3d vector with X, Y from and Z from a scalar. - - The x and y coordinates in 3d-space. - The z coordinate in 3d-space. - - - - Performs vector addition on and . - - The first vector to add. - The second vector to add. - The result of the vector addition. - - - - Performs vector addition on and - , storing the result of the - addition in . - - The first vector to add. - The second vector to add. - The result of the vector addition. - - - - Creates a new that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 3d-triangle. - - The first vector of 3d-triangle. - The second vector of 3d-triangle. - The third vector of 3d-triangle. - Barycentric scalar b2 which represents a weighting factor towards second vector of 3d-triangle. - Barycentric scalar b3 which represents a weighting factor towards third vector of 3d-triangle. - The cartesian translation of barycentric coordinates. - - - - Creates a new that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 3d-triangle. - - The first vector of 3d-triangle. - The second vector of 3d-triangle. - The third vector of 3d-triangle. - Barycentric scalar b2 which represents a weighting factor towards second vector of 3d-triangle. - Barycentric scalar b3 which represents a weighting factor towards third vector of 3d-triangle. - The cartesian translation of barycentric coordinates as an output parameter. - - - - Creates a new that contains CatmullRom interpolation of the specified vectors. - - The first vector in interpolation. - The second vector in interpolation. - The third vector in interpolation. - The fourth vector in interpolation. - Weighting factor. - The result of CatmullRom interpolation. - - - - Creates a new that contains CatmullRom interpolation of the specified vectors. - - The first vector in interpolation. - The second vector in interpolation. - The third vector in interpolation. - The fourth vector in interpolation. - Weighting factor. - The result of CatmullRom interpolation as an output parameter. - - - - Clamps the specified value within a range. - - The value to clamp. - The min value. - The max value. - The clamped value. - - - - Clamps the specified value within a range. - - The value to clamp. - The min value. - The max value. - The clamped value as an output parameter. - - - - Computes the cross product of two vectors. - - The first vector. - The second vector. - The cross product of two vectors. - - - - Computes the cross product of two vectors. - - The first vector. - The second vector. - The cross product of two vectors as an output parameter. - - - - Returns the distance between two vectors. - - The first vector. - The second vector. - The distance between two vectors. - - - - Returns the distance between two vectors. - - The first vector. - The second vector. - The distance between two vectors as an output parameter. - - - - Returns the squared distance between two vectors. - - The first vector. - The second vector. - The squared distance between two vectors. - - - - Returns the squared distance between two vectors. - - The first vector. - The second vector. - The squared distance between two vectors as an output parameter. - - - - Divides the components of a by the components of another . - - Source . - Divisor . - The result of dividing the vectors. - - - - Divides the components of a by a scalar. - - Source . - Divisor scalar. - The result of dividing a vector by a scalar. - - - - Divides the components of a by a scalar. - - Source . - Divisor scalar. - The result of dividing a vector by a scalar as an output parameter. - - - - Divides the components of a by the components of another . - - Source . - Divisor . - The result of dividing the vectors as an output parameter. - - - - Returns a dot product of two vectors. - - The first vector. - The second vector. - The dot product of two vectors. - - - - Returns a dot product of two vectors. - - The first vector. - The second vector. - The dot product of two vectors as an output parameter. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Gets the hash code of this . - - Hash code of this . - - - - Creates a new that contains hermite spline interpolation. - - The first position vector. - The first tangent vector. - The second position vector. - The second tangent vector. - Weighting factor. - The hermite spline interpolation vector. - - - - Creates a new that contains hermite spline interpolation. - - The first position vector. - The first tangent vector. - The second position vector. - The second tangent vector. - Weighting factor. - The hermite spline interpolation vector as an output parameter. - - - - Returns the length of this . - - The length of this . - - - - Returns the squared length of this . - - The squared length of this . - - - - Creates a new that contains linear interpolation of the specified vectors. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors. - - - - Creates a new that contains linear interpolation of the specified vectors. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors as an output parameter. - - - - Creates a new that contains linear interpolation of the specified vectors. - Uses on MathHelper for the interpolation. - Less efficient but more precise compared to . - See remarks section of on MathHelper for more info. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors. - - - - Creates a new that contains linear interpolation of the specified vectors. - Uses on MathHelper for the interpolation. - Less efficient but more precise compared to . - See remarks section of on MathHelper for more info. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors as an output parameter. - - - - Creates a new that contains a maximal values from the two vectors. - - The first vector. - The second vector. - The with maximal values from the two vectors. - - - - Creates a new that contains a maximal values from the two vectors. - - The first vector. - The second vector. - The with maximal values from the two vectors as an output parameter. - - - - Creates a new that contains a minimal values from the two vectors. - - The first vector. - The second vector. - The with minimal values from the two vectors. - - - - Creates a new that contains a minimal values from the two vectors. - - The first vector. - The second vector. - The with minimal values from the two vectors as an output parameter. - - - - Creates a new that contains a multiplication of two vectors. - - Source . - Source . - The result of the vector multiplication. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - The result of the vector multiplication with a scalar. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - The result of the multiplication with a scalar as an output parameter. - - - - Creates a new that contains a multiplication of two vectors. - - Source . - Source . - The result of the vector multiplication as an output parameter. - - - - Creates a new that contains the specified vector inversion. - - Source . - The result of the vector inversion. - - - - Creates a new that contains the specified vector inversion. - - Source . - The result of the vector inversion as an output parameter. - - - - Turns this to a unit vector with the same direction. - - - - - Creates a new that contains a normalized values from another vector. - - Source . - Unit vector. - - - - Creates a new that contains a normalized values from another vector. - - Source . - Unit vector as an output parameter. - - - - Creates a new that contains reflect vector of the given vector and normal. - - Source . - Reflection normal. - Reflected vector. - - - - Creates a new that contains reflect vector of the given vector and normal. - - Source . - Reflection normal. - Reflected vector as an output parameter. - - - - Creates a new that contains cubic interpolation of the specified vectors. - - Source . - Source . - Weighting value. - Cubic interpolation of the specified vectors. - - - - Creates a new that contains cubic interpolation of the specified vectors. - - Source . - Source . - Weighting value. - Cubic interpolation of the specified vectors as an output parameter. - - - - Creates a new that contains subtraction of on from a another. - - Source . - Source . - The result of the vector subtraction. - - - - Creates a new that contains subtraction of on from a another. - - Source . - Source . - The result of the vector subtraction as an output parameter. - - - - Returns a representation of this in the format: - {X:[] Y:[] Z:[]} - - A representation of this . - - - - Creates a new that contains a transformation of 3d-vector by the specified . - - Source . - The transformation . - Transformed . - - - - Creates a new that contains a transformation of 3d-vector by the specified . - - Source . - The transformation . - Transformed as an output parameter. - - - - Creates a new that contains a transformation of 3d-vector by the specified , representing the rotation. - - Source . - The which contains rotation transformation. - Transformed . - - - - Creates a new that contains a transformation of 3d-vector by the specified , representing the rotation. - - Source . - The which contains rotation transformation. - Transformed as an output parameter. - - - - Apply transformation on vectors within array of by the specified and places the results in an another array. - - Source array. - The starting index of transformation in the source array. - The transformation . - Destination array. - The starting index in the destination array, where the first should be written. - The number of vectors to be transformed. - - - - Apply transformation on vectors within array of by the specified and places the results in an another array. - - Source array. - The starting index of transformation in the source array. - The which contains rotation transformation. - Destination array. - The starting index in the destination array, where the first should be written. - The number of vectors to be transformed. - - - - Apply transformation on all vectors within array of by the specified and places the results in an another array. - - Source array. - The transformation . - Destination array. - - - - Apply transformation on all vectors within array of by the specified and places the results in an another array. - - Source array. - The which contains rotation transformation. - Destination array. - - - - Creates a new that contains a transformation of the specified normal by the specified . - - Source which represents a normal vector. - The transformation . - Transformed normal. - - - - Creates a new that contains a transformation of the specified normal by the specified . - - Source which represents a normal vector. - The transformation . - Transformed normal as an output parameter. - - - - Apply transformation on normals within array of by the specified and places the results in an another array. - - Source array. - The starting index of transformation in the source array. - The transformation . - Destination array. - The starting index in the destination array, where the first should be written. - The number of normals to be transformed. - - - - Apply transformation on all normals within array of by the specified and places the results in an another array. - - Source array. - The transformation . - Destination array. - - - - Deconstruction method for . - - - - - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Adds two vectors. - - Source on the left of the add sign. - Source on the right of the add sign. - Sum of the vectors. - - - - Inverts values in the specified . - - Source on the right of the sub sign. - Result of the inversion. - - - - Subtracts a from a . - - Source on the left of the sub sign. - Source on the right of the sub sign. - Result of the vector subtraction. - - - - Multiplies the components of two vectors by each other. - - Source on the left of the mul sign. - Source on the right of the mul sign. - Result of the vector multiplication. - - - - Multiplies the components of vector by a scalar. - - Source on the left of the mul sign. - Scalar value on the right of the mul sign. - Result of the vector multiplication with a scalar. - - - - Multiplies the components of vector by a scalar. - - Scalar value on the left of the mul sign. - Source on the right of the mul sign. - Result of the vector multiplication with a scalar. - - - - Divides the components of a by the components of another . - - Source on the left of the div sign. - Divisor on the right of the div sign. - The result of dividing the vectors. - - - - Divides the components of a by a scalar. - - Source on the left of the div sign. - Divisor scalar on the right of the div sign. - The result of dividing a vector by a scalar. - - - - Describes a 4D-vector. - - - - - The x coordinate of this . - - - - - The y coordinate of this . - - - - - The z coordinate of this . - - - - - The w coordinate of this . - - - - - Returns a with components 0, 0, 0, 0. - - - - - Returns a with components 1, 1, 1, 1. - - - - - Returns a with components 1, 0, 0, 0. - - - - - Returns a with components 0, 1, 0, 0. - - - - - Returns a with components 0, 0, 1, 0. - - - - - Returns a with components 0, 0, 0, 1. - - - - - Constructs a 3d vector with X, Y, Z and W from four values. - - The x coordinate in 4d-space. - The y coordinate in 4d-space. - The z coordinate in 4d-space. - The w coordinate in 4d-space. - - - - Constructs a 3d vector with X and Z from and Z and W from the scalars. - - The x and y coordinates in 4d-space. - The z coordinate in 4d-space. - The w coordinate in 4d-space. - - - - Constructs a 3d vector with X, Y, Z from and W from a scalar. - - The x, y and z coordinates in 4d-space. - The w coordinate in 4d-space. - - - - Constructs a 4d vector with X, Y, Z and W set to the same value. - - The x, y, z and w coordinates in 4d-space. - - - - Performs vector addition on and . - - The first vector to add. - The second vector to add. - The result of the vector addition. - - - - Performs vector addition on and - , storing the result of the - addition in . - - The first vector to add. - The second vector to add. - The result of the vector addition. - - - - Creates a new that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 4d-triangle. - - The first vector of 4d-triangle. - The second vector of 4d-triangle. - The third vector of 4d-triangle. - Barycentric scalar b2 which represents a weighting factor towards second vector of 4d-triangle. - Barycentric scalar b3 which represents a weighting factor towards third vector of 4d-triangle. - The cartesian translation of barycentric coordinates. - - - - Creates a new that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 4d-triangle. - - The first vector of 4d-triangle. - The second vector of 4d-triangle. - The third vector of 4d-triangle. - Barycentric scalar b2 which represents a weighting factor towards second vector of 4d-triangle. - Barycentric scalar b3 which represents a weighting factor towards third vector of 4d-triangle. - The cartesian translation of barycentric coordinates as an output parameter. - - - - Creates a new that contains CatmullRom interpolation of the specified vectors. - - The first vector in interpolation. - The second vector in interpolation. - The third vector in interpolation. - The fourth vector in interpolation. - Weighting factor. - The result of CatmullRom interpolation. - - - - Creates a new that contains CatmullRom interpolation of the specified vectors. - - The first vector in interpolation. - The second vector in interpolation. - The third vector in interpolation. - The fourth vector in interpolation. - Weighting factor. - The result of CatmullRom interpolation as an output parameter. - - - - Clamps the specified value within a range. - - The value to clamp. - The min value. - The max value. - The clamped value. - - - - Clamps the specified value within a range. - - The value to clamp. - The min value. - The max value. - The clamped value as an output parameter. - - - - Returns the distance between two vectors. - - The first vector. - The second vector. - The distance between two vectors. - - - - Returns the distance between two vectors. - - The first vector. - The second vector. - The distance between two vectors as an output parameter. - - - - Returns the squared distance between two vectors. - - The first vector. - The second vector. - The squared distance between two vectors. - - - - Returns the squared distance between two vectors. - - The first vector. - The second vector. - The squared distance between two vectors as an output parameter. - - - - Divides the components of a by the components of another . - - Source . - Divisor . - The result of dividing the vectors. - - - - Divides the components of a by a scalar. - - Source . - Divisor scalar. - The result of dividing a vector by a scalar. - - - - Divides the components of a by a scalar. - - Source . - Divisor scalar. - The result of dividing a vector by a scalar as an output parameter. - - - - Divides the components of a by the components of another . - - Source . - Divisor . - The result of dividing the vectors as an output parameter. - - - - Returns a dot product of two vectors. - - The first vector. - The second vector. - The dot product of two vectors. - - - - Returns a dot product of two vectors. - - The first vector. - The second vector. - The dot product of two vectors as an output parameter. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Compares whether current instance is equal to specified . - - The to compare. - true if the instances are equal; false otherwise. - - - - Gets the hash code of this . - - Hash code of this . - - - - Creates a new that contains hermite spline interpolation. - - The first position vector. - The first tangent vector. - The second position vector. - The second tangent vector. - Weighting factor. - The hermite spline interpolation vector. - - - - Creates a new that contains hermite spline interpolation. - - The first position vector. - The first tangent vector. - The second position vector. - The second tangent vector. - Weighting factor. - The hermite spline interpolation vector as an output parameter. - - - - Returns the length of this . - - The length of this . - - - - Returns the squared length of this . - - The squared length of this . - - - - Creates a new that contains linear interpolation of the specified vectors. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors. - - - - Creates a new that contains linear interpolation of the specified vectors. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors as an output parameter. - - - - Creates a new that contains linear interpolation of the specified vectors. - Uses on MathHelper for the interpolation. - Less efficient but more precise compared to . - See remarks section of on MathHelper for more info. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors. - - - - Creates a new that contains linear interpolation of the specified vectors. - Uses on MathHelper for the interpolation. - Less efficient but more precise compared to . - See remarks section of on MathHelper for more info. - - The first vector. - The second vector. - Weighting value(between 0.0 and 1.0). - The result of linear interpolation of the specified vectors as an output parameter. - - - - Creates a new that contains a maximal values from the two vectors. - - The first vector. - The second vector. - The with maximal values from the two vectors. - - - - Creates a new that contains a maximal values from the two vectors. - - The first vector. - The second vector. - The with maximal values from the two vectors as an output parameter. - - - - Creates a new that contains a minimal values from the two vectors. - - The first vector. - The second vector. - The with minimal values from the two vectors. - - - - Creates a new that contains a minimal values from the two vectors. - - The first vector. - The second vector. - The with minimal values from the two vectors as an output parameter. - - - - Creates a new that contains a multiplication of two vectors. - - Source . - Source . - The result of the vector multiplication. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - The result of the vector multiplication with a scalar. - - - - Creates a new that contains a multiplication of and a scalar. - - Source . - Scalar value. - The result of the multiplication with a scalar as an output parameter. - - - - Creates a new that contains a multiplication of two vectors. - - Source . - Source . - The result of the vector multiplication as an output parameter. - - - - Creates a new that contains the specified vector inversion. - - Source . - The result of the vector inversion. - - - - Creates a new that contains the specified vector inversion. - - Source . - The result of the vector inversion as an output parameter. - - - - Turns this to a unit vector with the same direction. - - - - - Creates a new that contains a normalized values from another vector. - - Source . - Unit vector. - - - - Creates a new that contains a normalized values from another vector. - - Source . - Unit vector as an output parameter. - - - - Creates a new that contains cubic interpolation of the specified vectors. - - Source . - Source . - Weighting value. - Cubic interpolation of the specified vectors. - - - - Creates a new that contains cubic interpolation of the specified vectors. - - Source . - Source . - Weighting value. - Cubic interpolation of the specified vectors as an output parameter. - - - - Creates a new that contains subtraction of on from a another. - - Source . - Source . - The result of the vector subtraction. - - - - Creates a new that contains subtraction of on from a another. - - Source . - Source . - The result of the vector subtraction as an output parameter. - - - - Creates a new that contains a transformation of 2d-vector by the specified . - - Source . - The transformation . - Transformed . - - - - Creates a new that contains a transformation of 2d-vector by the specified . - - Source . - The which contains rotation transformation. - Transformed . - - - - Creates a new that contains a transformation of 3d-vector by the specified . - - Source . - The transformation . - Transformed . - - - - Creates a new that contains a transformation of 3d-vector by the specified . - - Source . - The which contains rotation transformation. - Transformed . - - - - Creates a new that contains a transformation of 4d-vector by the specified . - - Source . - The transformation . - Transformed . - - - - Creates a new that contains a transformation of 4d-vector by the specified . - - Source . - The which contains rotation transformation. - Transformed . - - - - Creates a new that contains a transformation of 2d-vector by the specified . - - Source . - The transformation . - Transformed as an output parameter. - - - - Creates a new that contains a transformation of 2d-vector by the specified . - - Source . - The which contains rotation transformation. - Transformed as an output parameter. - - - - Creates a new that contains a transformation of 3d-vector by the specified . - - Source . - The transformation . - Transformed as an output parameter. - - - - Creates a new that contains a transformation of 3d-vector by the specified . - - Source . - The which contains rotation transformation. - Transformed as an output parameter. - - - - Creates a new that contains a transformation of 4d-vector by the specified . - - Source . - The transformation . - Transformed as an output parameter. - - - - Creates a new that contains a transformation of 4d-vector by the specified . - - Source . - The which contains rotation transformation. - Transformed as an output parameter. - - - - Apply transformation on vectors within array of by the specified and places the results in an another array. - - Source array. - The starting index of transformation in the source array. - The transformation . - Destination array. - The starting index in the destination array, where the first should be written. - The number of vectors to be transformed. - - - - Apply transformation on vectors within array of by the specified and places the results in an another array. - - Source array. - The starting index of transformation in the source array. - The which contains rotation transformation. - Destination array. - The starting index in the destination array, where the first should be written. - The number of vectors to be transformed. - - - - Apply transformation on all vectors within array of by the specified and places the results in an another array. - - Source array. - The transformation . - Destination array. - - - - Apply transformation on all vectors within array of by the specified and places the results in an another array. - - Source array. - The which contains rotation transformation. - Destination array. - - - - Returns a representation of this in the format: - {X:[] Y:[] Z:[] W:[]} - - A representation of this . - - - - Deconstruction method for . - - - - - - - - - Inverts values in the specified . - - Source on the right of the sub sign. - Result of the inversion. - - - - Compares whether two instances are equal. - - instance on the left of the equal sign. - instance on the right of the equal sign. - true if the instances are equal; false otherwise. - - - - Compares whether two instances are not equal. - - instance on the left of the not equal sign. - instance on the right of the not equal sign. - true if the instances are not equal; false otherwise. - - - - Adds two vectors. - - Source on the left of the add sign. - Source on the right of the add sign. - Sum of the vectors. - - - - Subtracts a from a . - - Source on the left of the sub sign. - Source on the right of the sub sign. - Result of the vector subtraction. - - - - Multiplies the components of two vectors by each other. - - Source on the left of the mul sign. - Source on the right of the mul sign. - Result of the vector multiplication. - - - - Multiplies the components of vector by a scalar. - - Source on the left of the mul sign. - Scalar value on the right of the mul sign. - Result of the vector multiplication with a scalar. - - - - Multiplies the components of vector by a scalar. - - Scalar value on the left of the mul sign. - Source on the right of the mul sign. - Result of the vector multiplication with a scalar. - - - - Divides the components of a by the components of another . - - Source on the left of the div sign. - Divisor on the right of the div sign. - The result of dividing the vectors. - - - - Divides the components of a by a scalar. - - Source on the left of the div sign. - Divisor scalar on the right of the div sign. - The result of dividing a vector by a scalar. - - - - Defines the buffers for clearing when calling operation. - - - - - Color buffer. - - - - - Depth buffer. - - - - - Stencil buffer. - - - - - Defines the color channels for render target blending operations. - - - - - No channels selected. - - - - - Red channel selected. - - - - - Green channel selected. - - - - - Blue channel selected. - - - - - Alpha channel selected. - - - - - All channels selected. - - - - - Defines the faces in a cube map for the class. - - - - - Positive X face in the cube map. - - - - - Negative X face in the cube map. - - - - - Positive Y face in the cube map. - - - - - Negative Y face in the cube map. - - - - - Positive Z face in the cube map. - - - - - Negative Z face in the cube map. - - - - - A snapshot of rendering statistics from to be used for runtime debugging and profiling. - - - - - Number of times Clear was called. - - - - - Number of times Draw was called. - - - - - Number of times the pixel shader was changed on the GPU. - - - - - Number of rendered primitives. - - - - - Number of sprites and text characters rendered via . - - - - - Number of times a target was changed on the GPU. - - - - - Number of times a texture was changed on the GPU. - - - - - Number of times the vertex shader was changed on the GPU. - - - - - Returns the difference between two sets of metrics. - - Source on the left of the sub sign. - Source on the right of the sub sign. - Difference between two sets of metrics. - - - - Returns the combination of two sets of metrics. - - Source on the left of the add sign. - Source on the right of the add sign. - Combination of two sets of metrics. - - - - Built-in effect that supports alpha testing. - - - - - Gets or sets the world matrix. - - - - - Gets or sets the view matrix. - - - - - Gets or sets the projection matrix. - - - - - Gets or sets the material diffuse color (range 0 to 1). - - - - - Gets or sets the material alpha. - - - - - Gets or sets the fog enable flag. - - - - - Gets or sets the fog start distance. - - - - - Gets or sets the fog end distance. - - - - - Gets or sets the fog color. - - - - - Gets or sets the current texture. - - - - - Gets or sets whether vertex color is enabled. - - - - - Gets or sets the alpha compare function (default Greater). - - - - - Gets or sets the reference alpha value (default 0). - - - - - Creates a new AlphaTestEffect with default parameter settings. - - - - - Creates a new AlphaTestEffect by cloning parameter settings from an existing instance. - - - - - Creates a clone of the current AlphaTestEffect instance. - - - - - Looks up shortcut references to our effect parameters. - - - - - Lazily computes derived parameter values immediately before applying the effect. - - - - - Built-in effect that supports optional texturing, vertex coloring, fog, and lighting. - - - - - Gets or sets the world matrix. - - - - - Gets or sets the view matrix. - - - - - Gets or sets the projection matrix. - - - - - Gets or sets the material diffuse color (range 0 to 1). - - - - - Gets or sets the material emissive color (range 0 to 1). - - - - - Gets or sets the material specular color (range 0 to 1). - - - - - Gets or sets the material specular power. - - - - - Gets or sets the material alpha. - - - - - - - - Gets or sets the per-pixel lighting prefer flag. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gets or sets whether texturing is enabled. - - - - - Gets or sets the current texture. - - - - - Gets or sets whether vertex color is enabled. - - - - - Creates a new BasicEffect with default parameter settings. - - - - - Creates a new BasicEffect by cloning parameter settings from an existing instance. - - - - - Creates a clone of the current BasicEffect instance. - - - - - - - - Looks up shortcut references to our effect parameters. - - - - - Lazily computes derived parameter values immediately before applying the effect. - - - - - Built-in effect that supports two-layer multitexturing. - - - - - Gets or sets the world matrix. - - - - - Gets or sets the view matrix. - - - - - Gets or sets the projection matrix. - - - - - Gets or sets the material diffuse color (range 0 to 1). - - - - - Gets or sets the material alpha. - - - - - Gets or sets the fog enable flag. - - - - - Gets or sets the fog start distance. - - - - - Gets or sets the fog end distance. - - - - - Gets or sets the fog color. - - - - - Gets or sets the current base texture. - - - - - Gets or sets the current overlay texture. - - - - - Gets or sets whether vertex color is enabled. - - - - - Creates a new DualTextureEffect with default parameter settings. - - - - - Creates a new DualTextureEffect by cloning parameter settings from an existing instance. - - - - - Creates a clone of the current DualTextureEffect instance. - - - - - Looks up shortcut references to our effect parameters. - - - - - Lazily computes derived parameter values immediately before applying the effect. - - - - - The MonoGame Effect file format header identifier ("MGFX"). - - - - - The current MonoGame Effect file format versions - used to detect old packaged content. - - - We should avoid supporting old versions for very long if at all - as users should be rebuilding content when packaging their game. - - - - - Clone the source into this existing object. - - - Note this is not overloaded in derived classes on purpose. This is - only a reason this exists is for caching effects. - - The source effect to clone from. - - - - Returns a deep copy of the effect where immutable types - are shared and mutable data is duplicated. - - - See "Cloning an Effect" in MSDN: - http://msdn.microsoft.com/en-us/library/windows/desktop/ff476138(v=vs.85).aspx - - The cloned effect. - - - - Track which effect parameters need to be recomputed during the next OnApply. - - - - - Helper code shared between the various built-in effects. - - - - - Sets up the standard key/fill/back lighting rig. - - - - - Lazily recomputes the world+view+projection matrix and - fog vector based on the current effect parameter settings. - - - - - Sets a vector which can be dotted with the object space vertex position to compute fog amount. - - - - - Lazily recomputes the world inverse transpose matrix and - eye position based on the current effect parameter settings. - - - - - Sets the diffuse/emissive/alpha material color parameters. - - - - - Defines classes for effect parameters and shader constants. - - - - - Scalar class type. - - - - - Vector class type. - - - - - Matrix class type. - - - - - Class type for textures, shaders or strings. - - - - - Structure class type. - - - - - The next state key used when an effect parameter - is updated by any of the 'set' methods. - - - - - The current state key which is used to detect - if the parameter value has been changed. - - - - - Property referenced by the DebuggerDisplayAttribute. - - - - - Defines types for effect parameters and shader constants. - - - - - Pointer to void type. - - - - - Boolean type. Any non-zero will be true; false otherwise. - - - - - 32-bit integer type. - - - - - Float type. - - - - - String type. - - - - - Any texture type. - - - - - 1D-texture type. - - - - - 2D-texture type. - - - - - 3D-texture type. - - - - - Cubic texture type. - - - - - Internal helper for accessing the bytecode for stock effects. - - - - - Built-in effect that supports environment mapping. - - - - - Gets or sets the world matrix. - - - - - Gets or sets the view matrix. - - - - - Gets or sets the projection matrix. - - - - - Gets or sets the material diffuse color (range 0 to 1). - - - - - Gets or sets the material emissive color (range 0 to 1). - - - - - Gets or sets the material alpha. - - - - - Gets or sets the ambient light color (range 0 to 1). - - - - - Gets the first directional light. - - - - - Gets the second directional light. - - - - - Gets the third directional light. - - - - - Gets or sets the fog enable flag. - - - - - Gets or sets the fog start distance. - - - - - Gets or sets the fog end distance. - - - - - Gets or sets the fog color. - - - - - Gets or sets the current texture. - - - - - Gets or sets the current environment map texture. - - - - - Gets or sets the amount of the environment map RGB that will be blended over - the base texture. Range 0 to 1, default 1. If set to zero, the RGB channels - of the environment map will completely ignored (but the environment map alpha - may still be visible if EnvironmentMapSpecular is greater than zero). - - - - - Gets or sets the amount of the environment map alpha channel that will - be added to the base texture. Range 0 to 1, default 0. This can be used - to implement cheap specular lighting, by encoding one or more specular - highlight patterns into the environment map alpha channel, then setting - EnvironmentMapSpecular to the desired specular light color. - - - - - Gets or sets the Fresnel factor used for the environment map blending. - Higher values make the environment map only visible around the silhouette - edges of the object, while lower values make it visible everywhere. - Setting this property to 0 disables Fresnel entirely, making the - environment map equally visible regardless of view angle. The default is - 1. Fresnel only affects the environment map RGB (the intensity of which is - controlled by EnvironmentMapAmount). The alpha contribution (controlled by - EnvironmentMapSpecular) is not affected by the Fresnel setting. - - - - - This effect requires lighting, so we explicitly implement - IEffectLights.LightingEnabled, and do not allow turning it off. - - - - - Creates a new EnvironmentMapEffect with default parameter settings. - - - - - Creates a new EnvironmentMapEffect by cloning parameter settings from an existing instance. - - - - - Creates a clone of the current EnvironmentMapEffect instance. - - - - - Sets up the standard key/fill/back lighting rig. - - - - - Looks up shortcut references to our effect parameters. - - - - - Lazily computes derived parameter values immediately before applying the effect. - - - - - The common effect fog rendering parameters. - - - - - The floating point fog color. - - - - - Used to toggle the rendering of fog. - - - - - The world space distance from the camera at which fogging is fully applied. - - - FogEnd should be greater than FogStart. If FogEnd and FogStart - are the same value everything is fully fogged. - - - - - The world space distance from the camera at which fogging begins. - - - FogStart should be less than FogEnd. If FogEnd and FogStart are the - same value everything is fully fogged. - - - - - The common effect light rendering parameters. - - - - - The floating point ambient light color. - - - - - Returns the first directional light. - - - - - Returns the second directional light. - - - - - Returns the third directional light. - - - - - Toggles the rendering of lighting. - - - - - Initializes the lights to the standard key/fill/back lighting rig. - - - - - Built-in effect for rendering skinned character models. - - - - - Gets or sets the world matrix. - - - - - Gets or sets the view matrix. - - - - - Gets or sets the projection matrix. - - - - - Gets or sets the material diffuse color (range 0 to 1). - - - - - Gets or sets the material emissive color (range 0 to 1). - - - - - Gets or sets the material specular color (range 0 to 1). - - - - - Gets or sets the material specular power. - - - - - Gets or sets the material alpha. - - - - - Gets or sets the per-pixel lighting prefer flag. - - - - - Gets or sets the ambient light color (range 0 to 1). - - - - - Gets the first directional light. - - - - - Gets the second directional light. - - - - - Gets the third directional light. - - - - - Gets or sets the fog enable flag. - - - - - Gets or sets the fog start distance. - - - - - Gets or sets the fog end distance. - - - - - Gets or sets the fog color. - - - - - Gets or sets the current texture. - - - - - Gets or sets the number of skinning weights to evaluate for each vertex (1, 2, or 4). - - - - - Sets an array of skinning bone transform matrices. - - - - - Gets a copy of the current skinning bone transform matrices. - - - - - This effect requires lighting, so we explicitly implement - IEffectLights.LightingEnabled, and do not allow turning it off. - - - - - Creates a new SkinnedEffect with default parameter settings. - - - - - Creates a new SkinnedEffect by cloning parameter settings from an existing instance. - - - - - Creates a clone of the current SkinnedEffect instance. - - - - - Sets up the standard key/fill/back lighting rig. - - - - - Looks up shortcut references to our effect parameters. - - - - - Lazily computes derived parameter values immediately before applying the effect. - - - - - The default effect used by SpriteBatch. - - - - - Creates a new SpriteEffect. - - - - - Creates a new SpriteEffect by cloning parameter settings from an existing instance. - - - - - Creates a clone of the current SpriteEffect instance. - - - - - Looks up shortcut references to our effect parameters. - - - - - Lazily computes derived parameter values immediately before applying the effect. - - - - - Defines the driver type for graphics adapter. Usable only on DirectX platforms for now. - - - - - Hardware device been used for rendering. Maximum speed and performance. - - - - - Emulates the hardware device on CPU. Slowly, only for testing. - - - - - Useful when acceleration does not work. - - - - - Used to request creation of the reference graphics device, - or the default hardware accelerated device (when set to false). - - - This only works on DirectX platforms where a reference graphics - device is available and must be defined before the graphics device - is created. It defaults to false. - - - - - Used to request creation of a specific kind of driver. - - - These values only work on DirectX platforms and must be defined before the graphics device - is created. by default. - - - - - Queries for support of the requested render target format on the adaptor. - - The graphics profile. - The requested surface format. - The requested depth stencil format. - The requested multisample count. - Set to the best format supported by the adaptor for the requested surface format. - Set to the best format supported by the adaptor for the requested depth stencil format. - Set to the best count supported by the adaptor for the requested multisample count. - True if the requested format is supported by the adaptor. False if one or more of the values was changed. - - - - Gets a indicating whether - has a - Width:Height ratio corresponding to a widescreen . - Common widescreen modes include 16:9, 16:10 and 2:1. - - - - - Provides information about the capabilities of the - current graphics device. A very useful thread for investigating GL extenion names - http://stackoverflow.com/questions/3881197/opengl-es-2-0-extensions-on-android-devices - - - - - Whether the device fully supports non power-of-two textures, including - mip maps and wrap modes other than CLAMP_TO_EDGE - - - - - Whether the device supports anisotropic texture filtering - - - - - Gets the support for DXT1 - - - - - Gets the support for S3TC (DXT1, DXT3, DXT5) - - - - - Gets the support for PVRTC - - - - - Gets the support for ETC1 - - - - - Gets the support for ATITC - - - - - True, if sRGB is supported. On Direct3D platforms, this is always true. - On OpenGL platforms, it is true if both framebuffer sRGB - and texture sRGB are supported. - - - - - True, if the underlying platform supports floating point textures. - For Direct3D platforms this is always true. - For OpenGL Desktop platforms it is always true. - For OpenGL Mobile platforms it requires `GL_EXT_color_buffer_float`. - If the requested format is not supported an NotSupportedException - will be thrown. - - - - - True, if the underlying platform supports half floating point textures. - For Direct3D platforms this is always true. - For OpenGL Desktop platforms it is always true. - For OpenGL Mobile platforms it requires `GL_EXT_color_buffer_half_float`. - If the requested format is not supported an NotSupportedException - will be thrown. - - - - - Gets the max texture anisotropy. This value typically lies - between 0 and 16, where 0 means anisotropic filtering is not - supported. - - - - - True, if GL_ARB_framebuffer_object is supported; false otherwise. - - - - - True, if GL_EXT_framebuffer_object is supported; false otherwise. - - - - - True, if GL_IMG_multisampled_render_to_texture is supported; false otherwise. - - - - - Attempt to dequeue a debugging message from the graphics subsystem. - - - When running on a graphics device with debugging enabled, this allows you to retrieve - subsystem-specific (e.g. DirectX, OpenGL, etc.) debugging messages including information - about improper usage of shaders and APIs. - - The graphics debugging message if retrieved, null otherwise. - True if a graphics debugging message was retrieved, false otherwise. - - - - The active vertex shader. - - - - - The active pixel shader. - - - - - The cache of effects from unique byte streams. - - - - - The rendering information for debugging and profiling. - The metrics are reset every frame after draw within . - - - - - Access debugging APIs for the graphics subsystem. - - - - - Initializes a new instance of the class. - - The graphics adapter. - The graphics profile. - The presentation options. - - is . - - - - - The color used as blend factor when alpha blending. - - - When only changing BlendFactor, use this rather than to - only update BlendFactor so the whole BlendState does not have to be updated. - - - - - Trigger the DeviceResetting event - Currently internal to allow the various platforms to send the event at the appropriate time. - - - - - Trigger the DeviceReset event to allow games to be notified of a device reset. - Currently internal to allow the various platforms to send the event at the appropriate time. - - - - - Draw geometry by indexing into the vertex buffer. - - The type of primitives in the index buffer. - Used to offset the vertex range indexed from the vertex buffer. - This is unused and remains here only for XNA API compatibility. - This is unused and remains here only for XNA API compatibility. - The index within the index buffer to start drawing from. - The number of primitives to render from the index buffer. - Note that minVertexIndex and numVertices are unused in MonoGame and will be ignored. - - - - Draw geometry by indexing into the vertex buffer. - - The type of primitives in the index buffer. - Used to offset the vertex range indexed from the vertex buffer. - The index within the index buffer to start drawing from. - The number of primitives to render from the index buffer. - - - - Draw primitives of the specified type from the data in an array of vertices without indexing. - - The type of the vertices. - The type of primitives to draw with the vertices. - An array of vertices to draw. - The index in the array of the first vertex that should be rendered. - The number of primitives to draw. - The will be found by getting - from an instance of and cached for subsequent calls. - - - - Draw primitives of the specified type from the data in the given array of vertices without indexing. - - The type of the vertices. - The type of primitives to draw with the vertices. - An array of vertices to draw. - The index in the array of the first vertex that should be rendered. - The number of primitives to draw. - The layout of the vertices. - - - - Draw primitives of the specified type from the currently bound vertexbuffers without indexing. - - The type of primitives to draw. - Index of the vertex to start at. - The number of primitives to draw. - - - - Draw primitives of the specified type by indexing into the given array of vertices with 16-bit indices. - - The type of the vertices. - The type of primitives to draw with the vertices. - An array of vertices to draw. - The index in the array of the first vertex to draw. - The index in the array of indices of the first index to use - The number of primitives to draw. - The number of vertices to draw. - The index data. - The will be found by getting - from an instance of and cached for subsequent calls. - All indices in the vertex buffer are interpreted relative to the specified . - For example a value of zero in the array of indices points to the vertex at index - in the array of vertices. - - - - Draw primitives of the specified type by indexing into the given array of vertices with 16-bit indices. - - The type of the vertices. - The type of primitives to draw with the vertices. - An array of vertices to draw. - The index in the array of the first vertex to draw. - The index in the array of indices of the first index to use - The number of primitives to draw. - The number of vertices to draw. - The index data. - The layout of the vertices. - All indices in the vertex buffer are interpreted relative to the specified . - For example a value of zero in the array of indices points to the vertex at index - in the array of vertices. - - - - Draw primitives of the specified type by indexing into the given array of vertices with 32-bit indices. - - The type of the vertices. - The type of primitives to draw with the vertices. - An array of vertices to draw. - The index in the array of the first vertex to draw. - The index in the array of indices of the first index to use - The number of primitives to draw. - The number of vertices to draw. - The index data. - The will be found by getting - from an instance of and cached for subsequent calls. - All indices in the vertex buffer are interpreted relative to the specified . - For example a value of zero in the array of indices points to the vertex at index - in the array of vertices. - - - - Draw primitives of the specified type by indexing into the given array of vertices with 32-bit indices. - - The type of the vertices. - The type of primitives to draw with the vertices. - An array of vertices to draw. - The index in the array of the first vertex to draw. - The index in the array of indices of the first index to use - The number of primitives to draw. - The number of vertices to draw. - The index data. - The layout of the vertices. - All indices in the vertex buffer are interpreted relative to the specified . - For example value of zero in the array of indices points to the vertex at index - in the array of vertices. - - - - Draw instanced geometry from the bound vertex buffers and index buffer. - - The type of primitives in the index buffer. - Used to offset the vertex range indexed from the vertex buffer. - This is unused and remains here only for XNA API compatibility. - This is unused and remains here only for XNA API compatibility. - The index within the index buffer to start drawing from. - The number of primitives in a single instance. - The number of instances to render. - Note that minVertexIndex and numVertices are unused in MonoGame and will be ignored. - - - - Draw instanced geometry from the bound vertex buffers and index buffer. - - The type of primitives in the index buffer. - Used to offset the vertex range indexed from the vertex buffer. - The index within the index buffer to start drawing from. - The number of primitives in a single instance. - The number of instances to render. - Draw geometry with data from multiple bound vertex streams at different frequencies. - - - - Gets the Pixel data of what is currently drawn on screen. - The format is whatever the current format of the backbuffer is. - - A byte[] of size (ViewPort.Width * ViewPort.Height * 4) - - - - Activates the Current Vertex/Pixel shader pair into a program. - - - - - Describes the status of the . - - - - - The device is normal. - - - - - The device has been lost. - - - - - The device has not been reset. - - - - - Convert a to an OpenTK.Graphics.ColorFormat. - This is used for setting up the backbuffer format of the OpenGL context. - - An OpenTK.Graphics.ColorFormat instance. - The to convert. - - - - Converts to OpenGL swap interval. - - A value according to EXT_swap_control - The to convert. - - - - Defines a set of graphic capabilities. - - - - - Use a limited set of graphic features and capabilities, allowing the game to support the widest variety of devices. - - - - - Use the largest available set of graphic features and capabilities to target devices, that have more enhanced graphic capabilities. - - - - - Called before the device is reset. Allows graphics resources to - invalidate their state so they can be recreated after the device reset. - Warning: This may be called after a call to Dispose() up until - the resource is garbage collected. - - - - - The method that derived classes should override to implement disposing of managed and native resources. - - True if managed objects should be disposed. - Native resources should always be released regardless of the value of the disposing parameter. - - - - Represents a render target. - - - - - Gets the width of the render target in pixels - - The width of the render target in pixels. - - - - Gets the height of the render target in pixels - - The height of the render target in pixels. - - - - Gets the usage mode of the render target. - - The usage mode of the render target. - - - - Represents a set of bones associated with a model. - - - - - Retrieves a ModelBone from the collection, given the name of the bone. - - The name of the bone to retrieve. - - - - Finds a bone with a given name if it exists in the collection. - - The name of the bone to find. - The bone named boneName, if found. - true if the bone was found - - - - Returns a ModelMeshCollection.Enumerator that can iterate through a ModelMeshCollection. - - - - - - Provides the ability to iterate through the bones in an ModelMeshCollection. - - - - - Gets the current element in the ModelMeshCollection. - - - - - Advances the enumerator to the next element of the ModelMeshCollection. - - - - - Immediately releases the unmanaged resources used by this object. - - - - - Transform of this node from the root of the model not from the parent - - - - - A basic 3D model with per mesh parent bones. - - - - - A collection of objects which describe how each mesh in the - mesh collection for this model relates to its parent mesh. - - - - - A collection of objects which compose the model. Each - in a model may be moved independently and may be composed of multiple materials - identified as objects. - - - - - Root bone for this model. - - - - - Custom attached object. - - Skinning data is example of attached object for model. - - - - - - Constructs a model. - - A valid reference to . - The collection of bones. - The collection of meshes. - - is null. - - - is null. - - - is null. - - - - - Draws the model meshes. - - The world transform. - The view transform. - The projection transform. - - - - Copies bone transforms relative to all parent bones of the each bone from this model to a given array. - - The array receiving the transformed bones. - - - - Copies bone transforms relative to bone from a given array to this model. - - The array of prepared bone transform data. - - is null. - - - is invalid. - - - - - Copies bone transforms relative to bone from this model to a given array. - - The array receiving the transformed bones. - - is null. - - - is invalid. - - - - - Represents a collection of ModelMesh objects. - - - - - Retrieves a ModelMesh from the collection, given the name of the mesh. - - The name of the mesh to retrieve. - - - - Finds a mesh with a given name if it exists in the collection. - - The name of the mesh to find. - The mesh named meshName, if found. - true if a mesh was found - - - - Returns a ModelMeshCollection.Enumerator that can iterate through a ModelMeshCollection. - - - - - - Provides the ability to iterate through the bones in an ModelMeshCollection. - - - - - Gets the current element in the ModelMeshCollection. - - - - - Advances the enumerator to the next element of the ModelMeshCollection. - - - - - Immediately releases the unmanaged resources used by this object. - - - - - Gets a value indicating whether the occlusion query has completed. - - - if the occlusion query has completed; otherwise, - . - - - - - Gets the number of visible pixels. - - The number of visible pixels. - - The occlusion query has not yet completed. Check before reading - the result! - - - - - Initializes a new instance of the class. - - The graphics device. - - is . - - - The current graphics profile does not support occlusion queries. - - - - - Begins the occlusion query. - - - is called again before calling . - - - - - Ends the occlusion query. - - - is called before calling . - - - - - Packed vector type containing a single 8 bit normalized W values that is ranging from 0 to 1. - - - - - Gets and sets the packed value. - - - - - Creates a new instance of Alpha8. - - The alpha component - - - - Gets the packed vector in float format. - - The packed vector in Vector3 format - - - - Sets the packed vector from a Vector4. - - Vector containing the components. - - - - Gets the packed vector in Vector4 format. - - The packed vector in Vector4 format - - - - Compares an object with the packed vector. - - The object to compare. - True if the object is equal to the packed vector. - - - - Compares another Alpha8 packed vector with the packed vector. - - The Alpha8 packed vector to compare. - True if the packed vectors are equal. - - - - Gets a string representation of the packed vector. - - A string representation of the packed vector. - - - - Gets a hash code of the packed vector. - - The hash code for the packed vector. - - - - Packed vector type containing unsigned normalized values ranging from 0 to 1. The x and z components use 5 bits, and the y component uses 6 bits. - - - - - Creates a new instance of Bgr565. - - The x component - The y component - The z component - - - - Creates a new instance of Bgr565. - - Vector containing the components for the packed vector. - - - - Gets and sets the packed value. - - - - - Gets the packed vector in Vector3 format. - - The packed vector in Vector3 format - - - - Sets the packed vector from a Vector4. - - Vector containing the components. - - - - Gets the packed vector in Vector4 format. - - The packed vector in Vector4 format - - - - Compares an object with the packed vector. - - The object to compare. - true if the object is equal to the packed vector. - - - - Compares another Bgr565 packed vector with the packed vector. - - The Bgr565 packed vector to compare. - true if the packed vectors are equal. - - - - Gets a string representation of the packed vector. - - A string representation of the packed vector. - - - - Gets a hash code of the packed vector. - - The hash code for the packed vector. - - - - Packed vector type containing unsigned normalized values, ranging from 0 to 1, using 4 bits each for x, y, z, and w. - - - - - Creates a new instance of Bgra4444. - - The x component - The y component - The z component - The w component - - - - Creates a new instance of Bgra4444. - - Vector containing the components for the packed vector. - - - - Gets and sets the packed value. - - - - - Gets the packed vector in Vector4 format. - - The packed vector in Vector4 format - - - - Sets the packed vector from a Vector4. - - Vector containing the components. - - - - Compares an object with the packed vector. - - The object to compare. - true if the object is equal to the packed vector. - - - - Compares another Bgra4444 packed vector with the packed vector. - - The Bgra4444 packed vector to compare. - true if the packed vectors are equal. - - - - Gets a string representation of the packed vector. - - A string representation of the packed vector. - - - - Gets a hash code of the packed vector. - - The hash code for the packed vector. - - - - Packed vector type containing unsigned normalized values ranging from 0 to 1. - The x , y and z components use 5 bits, and the w component uses 1 bit. - - - - - Gets and sets the packed value. - - - - - Creates a new instance of Bgra5551. - - The x component - The y component - The z component - The w component - - - - Creates a new instance of Bgra5551. - - - Vector containing the components for the packed vector. - - - - - Gets the packed vector in Vector4 format. - - The packed vector in Vector4 format - - - - Sets the packed vector from a Vector4. - - Vector containing the components. - - - - Compares an object with the packed vector. - - The object to compare. - True if the object is equal to the packed vector. - - - - Compares another Bgra5551 packed vector with the packed vector. - - The Bgra5551 packed vector to compare. - True if the packed vectors are equal. - - - - Gets a string representation of the packed vector. - - A string representation of the packed vector. - - - - Gets a hash code of the packed vector. - - The hash code for the packed vector. - - - - Packed vector type containing four 8-bit unsigned integer values, ranging from 0 to 255. - - - - - Initializes a new instance of the Byte4 class. - - A vector containing the initial values for the components of the Byte4 structure. - - - - Initializes a new instance of the Byte4 class. - - Initial value for the x component. - Initial value for the y component. - Initial value for the z component. - Initial value for the w component. - - - - Compares the current instance of a class to another instance to determine whether they are different. - - The object to the left of the equality operator. - The object to the right of the equality operator. - true if the objects are different; false otherwise. - - - - Compares the current instance of a class to another instance to determine whether they are the same. - - The object to the left of the equality operator. - The object to the right of the equality operator. - true if the objects are the same; false otherwise. - - - - Directly gets or sets the packed representation of the value. - - The packed representation of the value. - - - - Returns a value that indicates whether the current instance is equal to a specified object. - - The object with which to make the comparison. - true if the current instance is equal to the specified object; false otherwise. - - - - Returns a value that indicates whether the current instance is equal to a specified object. - - The object with which to make the comparison. - true if the current instance is equal to the specified object; false otherwise. - - - - Gets the hash code for the current instance. - - Hash code for the instance. - - - - Returns a string representation of the current instance. - - String that represents the object. - - - - Packs a vector into a uint. - - The vector containing the values to pack. - The ulong containing the packed values. - - - - Sets the packed representation from a Vector4. - - The vector to create the packed representation from. - - - - Expands the packed representation into a Vector4. - - The expanded vector. - - - - Packed vector type containing four 16-bit floating-point values. - - - - - Initializes a new instance of the HalfVector4 structure. - - Initial value for the x component. - Initial value for the y component. - Initial value for the z component. - Initial value for the q component. - - - - Initializes a new instance of the HalfVector4 structure. - - A vector containing the initial values for the components of the HalfVector4 structure. - - - - Sets the packed representation from a Vector4. - - The vector to create the packed representation from. - - - - Packs a vector into a ulong. - - The vector containing the values to pack. - The ulong containing the packed values. - - - - Expands the packed representation into a Vector4. - - The expanded vector. - - - - Directly gets or sets the packed representation of the value. - - The packed representation of the value. - - - - Returns a string representation of the current instance. - - String that represents the object. - - - - Gets the hash code for the current instance. - - Hash code for the instance. - - - - Returns a value that indicates whether the current instance is equal to a specified object. - - The object with which to make the comparison. - true if the current instance is equal to the specified object; false otherwise. - - - - Returns a value that indicates whether the current instance is equal to a specified object. - - The object with which to make the comparison. - true if the current instance is equal to the specified object; false otherwise. - - - - Compares the current instance of a class to another instance to determine whether they are the same. - - The object to the left of the equality operator. - The object to the right of the equality operator. - true if the objects are the same; false otherwise. - - - - Compares the current instance of a class to another instance to determine whether they are different. - - The object to the left of the equality operator. - The object to the right of the equality operator. - true if the objects are different; false otherwise. - - - - Packed vector type containing two 16-bit unsigned normalized values ranging from 0 to 1. - - - - - Gets and sets the packed value. - - - - - Creates a new instance of Rg32. - - The x component - The y component - - - - Creates a new instance of Rg32. - - - Vector containing the components for the packed vector. - - - - - Gets the packed vector in Vector2 format. - - The packed vector in Vector2 format - - - - Sets the packed vector from a Vector4. - - Vector containing the components. - - - - Gets the packed vector in Vector4 format. - - The packed vector in Vector4 format - - - - Compares an object with the packed vector. - - The object to compare. - True if the object is equal to the packed vector. - - - - Compares another Rg32 packed vector with the packed vector. - - The Rg32 packed vector to compare. - True if the packed vectors are equal. - - - - Gets a string representation of the packed vector. - - A string representation of the packed vector. - - - - Gets a hash code of the packed vector. - - The hash code for the packed vector. - - - - Packed vector type containing four 16-bit unsigned normalized values ranging from 0 to 1. - - - - - Gets and sets the packed value. - - - - - Creates a new instance of Rgba64. - - The x component - The y component - The z component - The w component - - - - Creates a new instance of Rgba64. - - - Vector containing the components for the packed vector. - - - - - Gets the packed vector in Vector4 format. - - The packed vector in Vector4 format - - - - Sets the packed vector from a Vector4. - - Vector containing the components. - - - - Compares an object with the packed vector. - - The object to compare. - True if the object is equal to the packed vector. - - - - Compares another Rgba64 packed vector with the packed vector. - - The Rgba64 packed vector to compare. - True if the packed vectors are equal. - - - - Gets a string representation of the packed vector. - - A string representation of the packed vector. - - - - Gets a hash code of the packed vector. - - The hash code for the packed vector. - - - - Packed vector type containing unsigned normalized values ranging from 0 to 1. - The x, y and z components use 10 bits, and the w component uses 2 bits. - - - - - Gets and sets the packed value. - - - - - Creates a new instance of Rgba1010102. - - The x component - The y component - The z component - The w component - - - - Creates a new instance of Rgba1010102. - - - Vector containing the components for the packed vector. - - - - - Gets the packed vector in Vector4 format. - - The packed vector in Vector4 format - - - - Sets the packed vector from a Vector4. - - Vector containing the components. - - - - Compares an object with the packed vector. - - The object to compare. - True if the object is equal to the packed vector. - - - - Compares another Rgba1010102 packed vector with the packed vector. - - The Rgba1010102 packed vector to compare. - True if the packed vectors are equal. - - - - Gets a string representation of the packed vector. - - A string representation of the packed vector. - - - - Gets a hash code of the packed vector. - - The hash code for the packed vector. - - - - Packed vector type containing four 16-bit signed integer values. - - - - - Initializes a new instance of the Short4 class. - - A vector containing the initial values for the components of the Short4 structure. - - - - Initializes a new instance of the Short4 class. - - Initial value for the x component. - Initial value for the y component. - Initial value for the z component. - Initial value for the w component. - - - - Compares the current instance of a class to another instance to determine whether they are different. - - The object to the left of the equality operator. - The object to the right of the equality operator. - true if the objects are different; false otherwise. - - - - Compares the current instance of a class to another instance to determine whether they are the same. - - The object to the left of the equality operator. - The object to the right of the equality operator. - true if the objects are the same; false otherwise. - - - - Directly gets or sets the packed representation of the value. - - The packed representation of the value. - - - - Returns a value that indicates whether the current instance is equal to a specified object. - - The object with which to make the comparison. - true if the current instance is equal to the specified object; false otherwise. - - - - Returns a value that indicates whether the current instance is equal to a specified object. - - The object with which to make the comparison. - true if the current instance is equal to the specified object; false otherwise. - - - - Gets the hash code for the current instance. - - Hash code for the instance. - - - - Returns a string representation of the current instance. - - String that represents the object. - - - - Packs a vector into a ulong. - - The vector containing the values to pack. - The ulong containing the packed values. - - - - Sets the packed representation from a Vector4. - - The vector to create the packed representation from. - - - - Expands the packed representation into a Vector4. - - The expanded vector. - - - - Create a instance with default values for all properties. - - - - - Get or set the format of the back buffer. - - - - - Get or set the height of the back buffer. - - - - - Get or set the width of the back buffer. - - - - - Get the bounds of the back buffer. - - - - - Get or set the handle of the window that will present the back buffer. - - - - - Get or set the depth stencil format for the back buffer. - - - - - Get or set a value indicating if we are in full screen mode. - - - - - If true the will do a mode switch - when going to full screen mode. If false it will instead do a - soft full screen by maximizing the window and making it borderless. - - - - - Get or set the multisample count for the back buffer. - - - - - Get or set the presentation interval. - - - - - Get or set the display orientation. - - - - - Get or set the RenderTargetUsage for the back buffer. - Determines if the back buffer is cleared when it is set as the - render target by the . - target. - - - - - Reset all properties to their default values. - - - - - Create a copy of this instance. - - - - - - Defines how updates the game window. - - - - - Equivalent to . - - - - - The driver waits for the vertical retrace period, before updating window client area. Present operations are not affected more frequently than the screen refresh rate. - - - - - The driver waits for the vertical retrace period, before updating window client area. Present operations are not affected more frequently than every second screen refresh. - - - - - The driver updates the window client area immediately. Present operations might be affected immediately. There is no limit for framerate. - - - - - Allows child class to specify the surface type, eg: a swap chain. - - - - - Represents a texture cube that can be used as a render target. - - - - - Gets the depth-stencil buffer format of this render target. - - The format of the depth-stencil buffer. - - - - Gets the number of multisample locations. - - The number of multisample locations. - - - - Gets the usage mode of this render target. - - The usage mode of the render target. - - - - - - - - - - Initializes a new instance of the class. - - The graphics device. - The width and height of a texture cube face in pixels. - to generate a full mipmap chain; otherwise . - The preferred format of the surface. - The preferred format of the depth-stencil buffer. - - - - Initializes a new instance of the class. - - The graphics device. - The width and height of a texture cube face in pixels. - to generate a full mipmap chain; otherwise . - The preferred format of the surface. - The preferred format of the depth-stencil buffer. - The preferred number of multisample locations. - The usage mode of the render target. - - - - Defines if the previous content in a render target is preserved when it set on the graphics device. - - - - - The render target content will not be preserved. - - - - - The render target content will be preserved even if it is slow or requires extra memory. - - - - - The render target content might be preserved if the platform can do so without a penalty in performance or memory usage. - - - - - The newly created resource object. - - - - - The name of the destroyed resource. - - - - - The resource manager tag of the destroyed resource. - - - - - Mark all the sampler slots as dirty. - - - - - Defines how vertex or index buffer data will be flushed during a SetData operation. - - - - - The SetData can overwrite the portions of existing data. - - - - - The SetData will discard the entire buffer. A pointer to a new memory area is returned and rendering from the previous area do not stall. - - - - - The SetData operation will not overwrite existing data. This allows the driver to return immediately from a SetData operation and continue rendering. - - - - - A hash value which can be used to compare constant buffers. - - - - - Returns the platform specific shader profile identifier. - - - - - A hash value which can be used to compare shaders. - - - - - This class is used to Cache the links between Vertex/Pixel Shaders and Constant Buffers. - It will be responsible for linking the programs under OpenGL if they have not been linked - before. If an existing link exists it will be resused. - - - - - Clear the program cache releasing all shader programs. - - - - - Helper class for drawing text strings and sprites in one or more optimized batches. - - - - - Constructs a . - - The , which will be used for sprite rendering. - Thrown when is null. - - - - Begins a new sprite and text batch with the specified render state. - - The drawing order for sprite and text drawing. by default. - State of the blending. Uses if null. - State of the sampler. Uses if null. - State of the depth-stencil buffer. Uses if null. - State of the rasterization. Uses if null. - A custom to override the default sprite effect. Uses default sprite effect if null. - An optional matrix used to transform the sprite geometry. Uses if null. - Thrown if is called next time without previous . - This method uses optional parameters. - The Begin should be called before drawing commands, and you cannot call it again before subsequent . - - - - Flushes all batched text and sprites to the screen. - - This command should be called after and drawing commands. - - - - Submit a sprite for drawing in the current batch. - - A texture. - The drawing location on screen or null if is used. - The drawing bounds on screen or null if is used. - An optional region on the texture which will be rendered. If null - draws full texture. - An optional center of rotation. Uses if null. - An optional rotation of this sprite. 0 by default. - An optional scale vector. Uses if null. - An optional color mask. Uses if null. - The optional drawing modificators. by default. - An optional depth of the layer of this sprite. 0 by default. - Throwns if both and been used. - This overload uses optional parameters. This overload requires only one of and been used. - - - - Submit a sprite for drawing in the current batch. - - A texture. - The drawing location on screen. - An optional region on the texture which will be rendered. If null - draws full texture. - A color mask. - A rotation of this sprite. - Center of the rotation. 0,0 by default. - A scaling of this sprite. - Modificators for drawing. Can be combined. - A depth of the layer of this sprite. - - - - Submit a sprite for drawing in the current batch. - - A texture. - The drawing location on screen. - An optional region on the texture which will be rendered. If null - draws full texture. - A color mask. - A rotation of this sprite. - Center of the rotation. 0,0 by default. - A scaling of this sprite. - Modificators for drawing. Can be combined. - A depth of the layer of this sprite. - - - - Submit a sprite for drawing in the current batch. - - A texture. - The drawing bounds on screen. - An optional region on the texture which will be rendered. If null - draws full texture. - A color mask. - A rotation of this sprite. - Center of the rotation. 0,0 by default. - Modificators for drawing. Can be combined. - A depth of the layer of this sprite. - - - - Submit a sprite for drawing in the current batch. - - A texture. - The drawing location on screen. - An optional region on the texture which will be rendered. If null - draws full texture. - A color mask. - - - - Submit a sprite for drawing in the current batch. - - A texture. - The drawing bounds on screen. - An optional region on the texture which will be rendered. If null - draws full texture. - A color mask. - - - - Submit a sprite for drawing in the current batch. - - A texture. - The drawing location on screen. - A color mask. - - - - Submit a sprite for drawing in the current batch. - - A texture. - The drawing bounds on screen. - A color mask. - - - - Submit a text string of sprites for drawing in the current batch. - - A font. - The text which will be drawn. - The drawing location on screen. - A color mask. - - - - Submit a text string of sprites for drawing in the current batch. - - A font. - The text which will be drawn. - The drawing location on screen. - A color mask. - A rotation of this string. - Center of the rotation. 0,0 by default. - A scaling of this string. - Modificators for drawing. Can be combined. - A depth of the layer of this string. - - - - Submit a text string of sprites for drawing in the current batch. - - A font. - The text which will be drawn. - The drawing location on screen. - A color mask. - A rotation of this string. - Center of the rotation. 0,0 by default. - A scaling of this string. - Modificators for drawing. Can be combined. - A depth of the layer of this string. - - - - Submit a text string of sprites for drawing in the current batch. - - A font. - The text which will be drawn. - The drawing location on screen. - A color mask. - - - - Submit a text string of sprites for drawing in the current batch. - - A font. - The text which will be drawn. - The drawing location on screen. - A color mask. - A rotation of this string. - Center of the rotation. 0,0 by default. - A scaling of this string. - Modificators for drawing. Can be combined. - A depth of the layer of this string. - - - - Submit a text string of sprites for drawing in the current batch. - - A font. - The text which will be drawn. - The drawing location on screen. - A color mask. - A rotation of this string. - Center of the rotation. 0,0 by default. - A scaling of this string. - Modificators for drawing. Can be combined. - A depth of the layer of this string. - - - - Immediately releases the unmanaged resources used by this object. - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - This class handles the queueing of batch items into the GPU by creating the triangle tesselations - that are used to draw the sprite textures. This class supports int.MaxValue number of sprites to be - batched and will process them into short.MaxValue groups (strided by 6 for the number of vertices - sent to the GPU). - - - - - Initialization size for the batch item list and queue. - - - - - The maximum number of batch items that can be processed per iteration - - - - - Initialization size for the vertex array, in batch units. - - - - - The list of batch items to process. - - - - - Index pointer to the next available SpriteBatchItem in _batchItemList. - - - - - The target graphics device. - - - - - Vertex index array. The values in this array never change. - - - - - Reuse a previously allocated SpriteBatchItem from the item pool. - if there is none available grow the pool and initialize new items. - - - - - - Resize and recreate the missing indices for the index and vertex position color buffers. - - - - - - Sorts the batch items and then groups batch drawing into maximal allowed batch sets that do not - overflow the 16 bit array indices for vertices. - - The type of depth sorting desired for the rendering. - The custom effect to apply to the drawn geometry - - - - Sends the triangle list to the graphics device. Here is where the actual drawing starts. - - Start index of vertices to draw. Not used except to compute the count of vertices to draw. - End index of vertices to draw. Not used except to compute the count of vertices to draw. - The custom effect to apply to the geometry - The texture to draw. - - - - Defines sprite visual options for mirroring. - - - - - No options specified. - - - - - Render the sprite reversed along the X axis. - - - - - Render the sprite reversed along the Y axis. - - - - - All the glyphs in this SpriteFont. - - - - - Initializes a new instance of the class. - - The font texture. - The rectangles in the font texture containing letters. - The cropping rectangles, which are applied to the corresponding glyphBounds to calculate the bounds of the actual character. - The characters. - The line spacing (the distance from baseline to baseline) of the font. - The spacing (tracking) between characters in the font. - The letters kernings(X - left side bearing, Y - width and Z - right side bearing). - The character that will be substituted when a given character is not included in the font. - - - - Gets the texture that this SpriteFont draws from. - - Can be used to implement custom rendering of a SpriteFont - - - - Returns a copy of the dictionary containing the glyphs in this SpriteFont. - - A new Dictionary containing all of the glyphs inthis SpriteFont - Can be used to calculate character bounds when implementing custom SpriteFont rendering. - - - - Gets a collection of the characters in the font. - - - - - Gets or sets the character that will be substituted when a - given character is not included in the font. - - - - - Gets or sets the line spacing (the distance from baseline - to baseline) of the font. - - - - - Gets or sets the spacing (tracking) between characters in - the font. - - - - - Returns the size of a string when rendered in this font. - - The text to measure. - The size, in pixels, of 'text' when rendered in - this font. - - - - Returns the size of the contents of a StringBuilder when - rendered in this font. - - The text to measure. - The size, in pixels, of 'text' when rendered in - this font. - - - - Struct that defines the spacing, Kerning, and bounds of a character. - - Provides the data necessary to implement custom SpriteFont rendering. - - - - The char associated with this glyph. - - - - - Rectangle in the font texture where this letter exists. - - - - - Cropping applied to the BoundsInTexture to calculate the bounds of the actual character. - - - - - The amount of space between the left side ofthe character and its first pixel in the X dimention. - - - - - The amount of space between the right side of the character and its last pixel in the X dimention. - - - - - Width of the character before kerning is applied. - - - - - Width of the character before kerning is applied. - - - - - Defines sprite sort rendering options. - - - - - All sprites are drawing when invokes, in order of draw call sequence. Depth is ignored. - - - - - Each sprite is drawing at individual draw call, instead of . Depth is ignored. - - - - - Same as , except sprites are sorted by texture prior to drawing. Depth is ignored. - - - - - Same as , except sprites are sorted by depth in back-to-front order prior to drawing. - - - - - Same as , except sprites are sorted by depth in front-to-back order prior to drawing. - - - - - Defines a blend mode. - - - - - Each component of the color is multiplied by {1, 1, 1, 1}. - - - - - Each component of the color is multiplied by {0, 0, 0, 0}. - - - - - Each component of the color is multiplied by the source color. - {Rs, Gs, Bs, As}, where Rs, Gs, Bs, As are color source values. - - - - - Each component of the color is multiplied by the inverse of the source color. - {1 − Rs, 1 − Gs, 1 − Bs, 1 − As}, where Rs, Gs, Bs, As are color source values. - - - - - Each component of the color is multiplied by the alpha value of the source. - {As, As, As, As}, where As is the source alpha value. - - - - - Each component of the color is multiplied by the inverse of the alpha value of the source. - {1 − As, 1 − As, 1 − As, 1 − As}, where As is the source alpha value. - - - - - Each component color is multiplied by the destination color. - {Rd, Gd, Bd, Ad}, where Rd, Gd, Bd, Ad are color destination values. - - - - - Each component of the color is multiplied by the inversed destination color. - {1 − Rd, 1 − Gd, 1 − Bd, 1 − Ad}, where Rd, Gd, Bd, Ad are color destination values. - - - - - Each component of the color is multiplied by the alpha value of the destination. - {Ad, Ad, Ad, Ad}, where Ad is the destination alpha value. - - - - - Each component of the color is multiplied by the inversed alpha value of the destination. - {1 − Ad, 1 − Ad, 1 − Ad, 1 − Ad}, where Ad is the destination alpha value. - - - - - Each component of the color is multiplied by a constant in the . - - - - - Each component of the color is multiplied by a inversed constant in the . - - - - - Each component of the color is multiplied by either the alpha of the source color, or the inverse of the alpha of the source color, whichever is greater. - {f, f, f, 1}, where f = min(As, 1 − As), where As is the source alpha value. - - - - - Defines a function for color blending. - - - - - The function will adds destination to the source. (srcColor * srcBlend) + (destColor * destBlend) - - - - - The function will subtracts destination from source. (srcColor * srcBlend) − (destColor * destBlend) - - - - - The function will subtracts source from destination. (destColor * destBlend) - (srcColor * srcBlend) - - - - - The function will extracts minimum of the source and destination. min((srcColor * srcBlend),(destColor * destBlend)) - - - - - The function will extracts maximum of the source and destination. max((srcColor * srcBlend),(destColor * destBlend)) - - - - - Returns the target specific blend state. - - The 0 to 3 target blend state index. - A target blend state. - - - - The color used as blend factor when alpha blending. - - - is set to this value when this - is bound to a GraphicsDevice. - - - - - Enables use of the per-target blend states. - - - - - The comparison function used for depth, stencil, and alpha tests. - - - - - Always passes the test. - - - - - Never passes the test. - - - - - Passes the test when the new pixel value is less than current pixel value. - - - - - Passes the test when the new pixel value is less than or equal to current pixel value. - - - - - Passes the test when the new pixel value is equal to current pixel value. - - - - - Passes the test when the new pixel value is greater than or equal to current pixel value. - - - - - Passes the test when the new pixel value is greater than current pixel value. - - - - - Passes the test when the new pixel value does not equal to current pixel value. - - - - - Defines a culling mode for faces in rasterization process. - - - - - Do not cull faces. - - - - - Cull faces with clockwise order. - - - - - Cull faces with counter clockwise order. - - - - - Defines formats for depth-stencil buffer. - - - - - Depth-stencil buffer will not be created. - - - - - 16-bit depth buffer. - - - - - 24-bit depth buffer. Equivalent of for DirectX platforms. - - - - - 32-bit depth-stencil buffer. Where 24-bit depth and 8-bit for stencil used. - - - - - Defines options for filling the primitive. - - - - - Draw solid faces for each primitive. - - - - - Draw lines for each primitive. - - - - - When using comparison sampling, also set to . - - - - - Defines stencil buffer operations. - - - - - Does not update the stencil buffer entry. - - - - - Sets the stencil buffer entry to 0. - - - - - Replaces the stencil buffer entry with a reference value. - - - - - Increments the stencil buffer entry, wrapping to 0 if the new value exceeds the maximum value. - - - - - Decrements the stencil buffer entry, wrapping to the maximum value if the new value is less than 0. - - - - - Increments the stencil buffer entry, clamping to the maximum value. - - - - - Decrements the stencil buffer entry, clamping to 0. - - - - - Inverts the bits in the stencil buffer entry. - - - - - Defines modes for addressing texels using texture coordinates that are outside of the range of 0.0 to 1.0. - - - - - Texels outside range will form the tile at every integer junction. - - - - - Texels outside range will be set to color of 0.0 or 1.0 texel. - - - - - Same as but tiles will also flipped at every integer junction. - - - - - Texels outside range will be set to the border color. - - - - - Defines filtering types for texture sampler. - - - - - Use linear filtering. - - - - - Use point filtering. - - - - - Use anisotropic filtering. - - - - - Use linear filtering to shrink or expand, and point filtering between mipmap levels (mip). - - - - - Use point filtering to shrink (minify) or expand (magnify), and linear filtering between mipmap levels. - - - - - Use linear filtering to shrink, point filtering to expand, and linear filtering between mipmap levels. - - - - - Use linear filtering to shrink, point filtering to expand, and point filtering between mipmap levels. - - - - - Use point filtering to shrink, linear filtering to expand, and linear filtering between mipmap levels. - - - - - Use point filtering to shrink, linear filtering to expand, and point filtering between mipmap levels. - - - - - Filtering modes for texture samplers. - - - - - Defines types of surface formats. - - - - - Unsigned 32-bit ARGB pixel format for store 8 bits per channel. - - - - - Unsigned 16-bit BGR pixel format for store 5 bits for blue, 6 bits for green, and 5 bits for red. - - - - - Unsigned 16-bit BGRA pixel format where 5 bits reserved for each color and last bit is reserved for alpha. - - - - - Unsigned 16-bit BGRA pixel format for store 4 bits per channel. - - - - - DXT1. Texture format with compression. Surface dimensions must be a multiple 4. - - - - - DXT3. Texture format with compression. Surface dimensions must be a multiple 4. - - - - - DXT5. Texture format with compression. Surface dimensions must be a multiple 4. - - - - - Signed 16-bit bump-map format for store 8 bits for u and v data. - - - - - Signed 32-bit bump-map format for store 8 bits per channel. - - - - - Unsigned 32-bit RGBA pixel format for store 10 bits for each color and 2 bits for alpha. - - - - - Unsigned 32-bit RG pixel format using 16 bits per channel. - - - - - Unsigned 64-bit RGBA pixel format using 16 bits per channel. - - - - - Unsigned A 8-bit format for store 8 bits to alpha channel. - - - - - IEEE 32-bit R float format for store 32 bits to red channel. - - - - - IEEE 64-bit RG float format for store 32 bits per channel. - - - - - IEEE 128-bit RGBA float format for store 32 bits per channel. - - - - - Float 16-bit R format for store 16 bits to red channel. - - - - - Float 32-bit RG format for store 16 bits per channel. - - - - - Float 64-bit ARGB format for store 16 bits per channel. - - - - - Float pixel format for high dynamic range data. - - - - - For compatibility with WPF D3DImage. - - - - - For compatibility with WPF D3DImage. - - - - - Unsigned 32-bit RGBA sRGB pixel format that supports 8 bits per channel. - - - - - Unsigned 32-bit sRGB pixel format that supports 8 bits per channel. 8 bits are unused. - - - - - Unsigned 32-bit sRGB pixel format that supports 8 bits per channel. - - - - - DXT1. sRGB texture format with compression. Surface dimensions must be a multiple of 4. - - - - - DXT3. sRGB texture format with compression. Surface dimensions must be a multiple of 4. - - - - - DXT5. sRGB texture format with compression. Surface dimensions must be a multiple of 4. - - - - - PowerVR texture compression format (iOS and Android). - - - - - PowerVR texture compression format (iOS and Android). - - - - - PowerVR texture compression format (iOS and Android). - - - - - PowerVR texture compression format (iOS and Android). - - - - - Ericcson Texture Compression (Android) - - - - - DXT1 version where 1-bit alpha is used. - - - - - ATC/ATITC compression (Android) - - - - - ATC/ATITC compression (Android) - - - - - Gets the dimensions of the texture - - - - - Creates a new texture of the given size - - - - - - - - Creates a new texture of a given size with a surface format and optional mipmaps - - - - - - - - - - Creates a new texture array of a given size with a surface format and optional mipmaps. - Throws ArgumentException if the current GraphicsDevice can't work with texture arrays - - - - - - - - - - - Creates a new texture of a given size with a surface format and optional mipmaps. - - - - - - - - - - - Gets the width of the texture in pixels. - - - - - Gets the height of the texture in pixels. - - - - - Changes the pixels of the texture - Throws ArgumentNullException if data is null - Throws ArgumentException if arraySlice is greater than 0, and the GraphicsDevice does not support texture arrays - - - Layer of the texture to modify - Index inside the texture array - Area to modify - New data for the texture - Start position of data - - - - - Changes the pixels of the texture - - - Layer of the texture to modify - Area to modify - New data for the texture - Start position of data - - - - - Changes the texture's pixels - - - New data for the texture - Start position of data - - - - - Changes the texture's pixels - - New data for the texture - - - - - Retrieves the contents of the texture - Throws ArgumentException if data is null, data.length is too short or - if arraySlice is greater than 0 and the GraphicsDevice doesn't support texture arrays - - - Layer of the texture - Index inside the texture array - Area of the texture to retrieve - Destination array for the data - Starting index of data where to write the pixel data - Number of pixels to read - - - - Retrieves the contents of the texture - Throws ArgumentException if data is null, data.length is too short or - if arraySlice is greater than 0 and the GraphicsDevice doesn't support texture arrays - - - Layer of the texture - Area of the texture - Destination array for the texture data - First position in data where to write the pixel data - Number of pixels to read - - - - Retrieves the contents of the texture - Throws ArgumentException if data is null, data.length is too short or - if arraySlice is greater than 0 and the GraphicsDevice doesn't support texture arrays - - - Destination array for the texture data - First position in data where to write the pixel data - Number of pixels to read - - - - Retrieves the contents of the texture - Throws ArgumentException if data is null, data.length is too short or - if arraySlice is greater than 0 and the GraphicsDevice doesn't support texture arrays - - - Destination array for the texture data - - - - Creates a Texture2D from a stream, supported formats bmp, gif, jpg, png, tif and dds (only for simple textures). - May work with other formats, but will not work with tga files. - - The graphics device where the texture will be created. - The stream from which to read the image data. - The texture created from the image stream. - Note that different image decoders may generate slight differences between platforms, but perceptually - the images should be identical. This call does not premultiply the image alpha, but areas of zero alpha will - result in black color data. - - - - - Converts the texture to a JPG image - - Destination for the image - - - - - - Converts the texture to a PNG image - - Destination for the image - - - - - - Gets a copy of 3D texture data, specifying a mipmap level, source box, start index, and number of elements. - - The type of the elements in the array. - Mipmap level. - Position of the left side of the box on the x-axis. - Position of the top of the box on the y-axis. - Position of the right side of the box on the x-axis. - Position of the bottom of the box on the y-axis. - Position of the front of the box on the z-axis. - Position of the back of the box on the z-axis. - Array of data. - Index of the first element to get. - Number of elements to get. - - - - Gets a copy of 3D texture data, specifying a start index and number of elements. - - The type of the elements in the array. - Array of data. - Index of the first element to get. - Number of elements to get. - - - - Gets a copy of 3D texture data. - - The type of the elements in the array. - Array of data. - - - - Marks all texture slots as dirty. - - - - - Gets a unique identifier of this texture for sorting purposes. - - - For example, this value is used by when drawing with . - The value is an implementation detail and may change between application launches or MonoGame versions. - It is only guaranteed to stay consistent during application lifetime. - - - - - Gets the width and height of the cube map face in pixels. - - The width and height of a cube map face in pixels. - - - - Gets a copy of cube texture data specifying a cubemap face. - - - The cube map face. - The data. - - - - A usage hint for optimizing memory placement of graphics buffers. - - - - - No special usage. - - - - - The buffer will not be readable and will be optimized for rendering and writing. - - - - - Special offset used internally by GraphicsDevice.DrawUserXXX() methods. - - - - - Special offset used internally by GraphicsDevice.DrawUserXXX() methods. - - - - - Gets the relevant IndexElementSize enum value for the given type. - - The graphics device. - The type to use for the index buffer - The IndexElementSize enum value that matches the type - - - - The GraphicsDevice is resetting, so GPU resources must be recreated. - - - - - If the IBO does not exist, create it. - - - - - Defines size for index in and . - - - - - 16-bit short/ushort value been used. - - - - - 32-bit int/uint value been used. - - - - - Defines how vertex data is ordered. - - - - - Renders the specified vertices as a sequence of isolated triangles. Each group of three vertices defines a separate triangle. Back-face culling is affected by the current winding-order render state. - - - - - Renders the vertices as a triangle strip. The back-face culling flag is flipped automatically on even-numbered triangles. - - - - - Renders the vertices as a list of isolated straight line segments; the count may be any positive integer. - - - - - Renders the vertices as a single polyline; the count may be any positive integer. - - - - - The GraphicsDevice is resetting, so GPU resources must be recreated. - - - - - Get the vertex data froom this VertexBuffer. - - The struct you want to fill. - The offset to the first element in the vertex buffer in bytes. - An array of T's to be filled. - The index to start filling the data array. - The number of T's to get. - The size of how a vertex buffer element should be interpreted. - - - Note that this pulls data from VRAM into main memory and because of that is a very expensive operation. - It is often a better idea to keep a copy of the data in main memory. - - - -

Using this operation it is easy to get certain vertex elements from a VertexBuffer.

-

- For example to get the texture coordinates from a VertexBuffer of you can call - GetData(4 * 3, data, elementCount, 20). 'data'should be an array of in this example. - The offsetInBytes is the number of bytes taken up by the of the vertex. - For vertexStride we pass the size of a . -

-
-
- - - Sets the vertex buffer data, specifying the index at which to start copying from the source data array, - the number of elements to copy from the source data array, - and how far apart elements from the source data array should be when they are copied into the vertex buffer. - - Type of elements in the data array. - Offset in bytes from the beginning of the vertex buffer to the start of the copied data. - Data array. - Index at which to start copying from . - Must be within the array bounds. - Number of elements to copy from . - The combination of and - must be within the array bounds. - Specifies how far apart, in bytes, elements from should be when - they are copied into the vertex buffer. - In almost all cases this should be sizeof(T), to create a tightly-packed vertex buffer. - If you specify sizeof(T), elements from will be copied into the - vertex buffer with no padding between each element. - If you specify a value greater than sizeof(T), elements from will be copied - into the vertex buffer with padding between each element. - If you specify 0 for this parameter, it will be treated as if you had specified sizeof(T). - With the exception of 0, you must specify a value greater than or equal to sizeof(T). - - If T is VertexPositionTexture, but you want to set only the position component of the vertex data, - you would call this method as follows: - - Vector3[] positions = new Vector3[numVertices]; - vertexBuffer.SetData(0, positions, 0, numVertices, vertexBuffer.VertexDeclaration.VertexStride); - - - Continuing from the previous example, if you want to set only the texture coordinate component of the vertex data, - you would call this method as follows (note the use of : - - Vector2[] texCoords = new Vector2[numVertices]; - vertexBuffer.SetData(12, texCoords, 0, numVertices, vertexBuffer.VertexDeclaration.VertexStride); - - - - If you provide a byte[] in the parameter, then you should almost certainly - set to 1, to avoid leaving any padding between the byte values - when they are copied into the vertex buffer. - - - - - Sets the vertex buffer data, specifying the index at which to start copying from the source data array, - and the number of elements to copy from the source data array. This is the same as calling - with offsetInBytes equal to 0, - and vertexStride equal to sizeof(T). - - Type of elements in the data array. - Data array. - Index at which to start copying from . - Must be within the array bounds. - Number of elements to copy from . - The combination of and - must be within the array bounds. - - - - Sets the vertex buffer data. This is the same as calling - with offsetInBytes and startIndex equal to 0, elementCount equal to data.Length, - and vertexStride equal to sizeof(T). - - Type of elements in the data array. - Data array. - - - - If the VBO does not exist, create it. - - - - - Defines how a vertex buffer is bound to the graphics device for rendering. - - - - - Gets the vertex buffer. - - The vertex buffer. - - - - Gets the index of the first vertex in the vertex buffer to use. - - The index of the first vertex in the vertex buffer to use. - - - - Gets the number of instances to draw using the same per-instance data before advancing - in the buffer by one element. - - - The number of instances to draw using the same per-instance data before advancing in the - buffer by one element. This value must be 0 for an element that contains per-vertex - data and greater than 0 for per-instance data. - - - - - Creates an instance of . - - The vertex buffer to bind. - - - - Creates an instance of . - - The vertex buffer to bind. - - The index of the first vertex in the vertex buffer to use. - - - - - Creates an instance of VertexBufferBinding. - - The vertex buffer to bind. - - The index of the first vertex in the vertex buffer to use. - - - The number of instances to draw using the same per-instance data before advancing in the - buffer by one element. This value must be 0 for an element that contains per-vertex data - and greater than 0 for per-instance data. - - - is . - - - or is invalid. - - - - - Stores the vertex buffers to be bound to the input assembler stage. - - - - - Initializes a new instance of the class. - - The maximum number of vertex buffer slots. - - - - Clears the vertex buffer slots. - - - if the input layout was changed; otherwise, - . - - - - - Binds the specified vertex buffer to the first input slot. - - The vertex buffer. - - The offset (in vertices) from the beginning of the vertex buffer to the first vertex to - use. - - - if the input layout was changed; otherwise, - . - - - - - Binds the the specified vertex buffers to the input slots. - - The vertex buffer bindings. - - if the input layout was changed; otherwise, - . - - - - - Gets vertex buffer bound to the specified input slots. - - The vertex buffer binding. - - - - Gets vertex buffers bound to the input slots. - - The vertex buffer bindings. - - - - Helper class which ensures we only lookup a vertex - declaration for a particular type once. - - A vertex structure which implements IVertexType. - - - - Defines per-vertex data of a vertex buffer. - - - implements and can be used as - a key in a dictionary. Two vertex declarations are considered equal if the vertices are - structurally equivalent, i.e. the vertex elements and the vertex stride are identical. (The - properties and are - ignored in and !) - - - - - Gets the internal vertex elements array. - - The internal vertex elements array. - - - - Initializes a new instance of the class. - - The vertex elements. - - is or empty. - - - - - Initializes a new instance of the class. - - The size of a vertex (including padding) in bytes. - The vertex elements. - - is or empty. - - - - - Returns the VertexDeclaration for Type. - - A value type which implements the IVertexType interface. - The VertexDeclaration. - - Prefer to use VertexDeclarationCache when the declaration lookup - can be performed with a templated type. - - - - - Gets a copy of the vertex elements. - - A copy of the vertex elements. - - - - Gets the size of a vertex (including padding) in bytes. - - The size of a vertex (including padding) in bytes. - - - - Determines whether the specified is equal to this instance. - - The object to compare with the current object. - - if the specified is equal to this instance; - otherwise, . - - - - - Determines whether the specified is equal to this - instance. - - The object to compare with the current object. - - if the specified is equal to this - instance; otherwise, . - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Compares two instances to determine whether they are the - same. - - The first instance. - The second instance. - - if the and are - the same; otherwise, . - - - - - Compares two instances to determine whether they are - different. - - The first instance. - The second instance. - - if the and are - the different; otherwise, . - - - - - Vertex attribute information for a particular shader/vertex declaration combination. - - - - - Defines a single element in a vertex. - - - - - Gets or sets the offset in bytes from the beginning of the stream to the vertex element. - - The offset in bytes. - - - - Gets or sets the data format. - - The data format. - - - - Gets or sets the HLSL semantic of the element in the vertex shader input. - - The HLSL semantic of the element in the vertex shader input. - - - - Gets or sets the semantic index. - - - The semantic index, which is required if the semantic is used for more than one vertex - element. - - - Usage indices in a vertex declaration usually start with 0. When multiple vertex buffers - are bound to the input assembler stage (see ), - MonoGame internally adjusts the usage indices based on the order in which the vertex - buffers are bound. - - - - - Initializes a new instance of the struct. - - The offset in bytes from the beginning of the stream to the vertex element. - The element format. - The HLSL semantic of the element in the vertex shader input-signature. - The semantic index, which is required if the semantic is used for more than one vertex element. - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Returns a that represents this instance. - - A that represents this instance. - - - - Determines whether the specified is equal to this instance. - - The object to compare with the current object. - - if the specified is equal to this instance; - otherwise, . - - - - - Determines whether the specified is equal to this - instance. - - The object to compare with the current object. - - if the specified is equal to this - instance; otherwise, . - - - - - Compares two instances to determine whether they are the - same. - - The first instance. - The second instance. - - if the and are - the same; otherwise, . - - - - - Compares two instances to determine whether they are - different. - - The first instance. - The second instance. - - if the and are - the different; otherwise, . - - - - - Defines vertex element formats. - - - - - Single 32-bit floating point number. - - - - - Two component 32-bit floating point number. - - - - - Three component 32-bit floating point number. - - - - - Four component 32-bit floating point number. - - - - - Four component, packed unsigned byte, mapped to 0 to 1 range. - - - - - Four component unsigned byte. - - - - - Two component signed 16-bit integer. - - - - - Four component signed 16-bit integer. - - - - - Normalized, two component signed 16-bit integer. - - - - - Normalized, four component signed 16-bit integer. - - - - - Two component 16-bit floating point number. - - - - - Four component 16-bit floating point number. - - - - - Defines usage for vertex elements. - - - - - Position data. - - - - - Color data. - - - - - Texture coordinate data or can be used for user-defined data. - - - - - Normal data. - - - - - Binormal data. - - - - - Tangent data. - - - - - Blending indices data. - - - - - Blending weight data. - - - - - Depth data. - - - - - Fog data. - - - - - Point size data. Usable for drawing point sprites. - - - - - Sampler data for specifies the displacement value to look up. - - - - - Single, positive float value, specifies a tessellation factor used in the tessellation unit to control the rate of tessellation. - - - - - Stores the vertex layout (input elements) for the input assembler stage. - - - In the DirectX version the input layouts are cached in a dictionary. The - is used as the key in the dictionary and therefore needs to - implement . Two instance are - considered equal if the vertex layouts are structurally identical. - - - - - Gets or sets the number of used input slots. - - The number of used input slots. - - - - Initializes a new instance of the class. - - The maximum number of vertex buffer slots. - - - - Initializes a new instance of the class. - - The array for storing vertex declarations. - The array for storing instance frequencies. - The number of used slots. - - - - Determines whether the specified is equal to this instance. - - The object to compare with the current object. - - if the specified is equal to this instance; - otherwise, . - - - - - Determines whether the specified is equal to this - instance. - - The object to compare with the current object. - - if the specified is equal to this - instance; otherwise, . - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Compares two instances to determine whether they are the - same. - - The first instance. - The second instance. - - if the and are - the same; otherwise, . - - - - - Compares two instances to determine whether they are - different. - - The first instance. - The second instance. - - if the and are - the different; otherwise, . - - - - - Describes the view bounds for render-target surface. - - - - - The height of the bounds in pixels. - - - - - The upper limit of depth of this viewport. - - - - - The lower limit of depth of this viewport. - - - - - The width of the bounds in pixels. - - - - - The y coordinate of the beginning of this viewport. - - - - - The x coordinate of the beginning of this viewport. - - - - - Gets the aspect ratio of this , which is width / height. - - - - - Gets or sets a boundary of this . - - - - - Returns the subset of the viewport that is guaranteed to be visible on a lower quality display. - - - - - Constructs a viewport from the given values. The will be 0.0 and will be 1.0. - - The x coordinate of the upper-left corner of the view bounds in pixels. - The y coordinate of the upper-left corner of the view bounds in pixels. - The width of the view bounds in pixels. - The height of the view bounds in pixels. - - - - Constructs a viewport from the given values. - - The x coordinate of the upper-left corner of the view bounds in pixels. - The y coordinate of the upper-left corner of the view bounds in pixels. - The width of the view bounds in pixels. - The height of the view bounds in pixels. - The lower limit of depth. - The upper limit of depth. - - - - Creates a new instance of struct. - - A that defines the location and size of the in a render target. - - - - Projects a from world space into screen space. - - The to project. - The projection . - The view . - The world . - - - - - Unprojects a from screen space into world space. - Note source.Z must be less than or equal to MaxDepth. - - The to unproject. - The projection . - The view . - The world . - - - - - Returns a representation of this in the format: - {X:[] Y:[] Width:[] Height:[] MinDepth:[] MaxDepth:[]} - - A representation of this . - - - - The settings used in creation of the graphics device. - See . - - - - - The graphics adapter on which the graphics device will be created. - - - This is only valid on desktop systems where multiple graphics - adapters are possible. Defaults to . - - - - - The requested graphics device feature set. - - - - - The settings that define how graphics will be presented to the display. - - - - - Used to initialize and control the presentation of the graphics device. - - - - - The default back buffer width. - - - - - The default back buffer height. - - - - - Associates this graphics device manager to a game instances. - - The game instance to attach. - - - - This populates a GraphicsDeviceInformation instance and invokes PreparingDeviceSettings to - allow users to change the settings. Then returns that GraphicsDeviceInformation. - Throws NullReferenceException if users set GraphicsDeviceInformation.PresentationParameters to null. - - - - - Applies any pending property changes to the graphics device. - - - - - Toggles between windowed and fullscreen modes. - - - Note that on platforms that do not support windowed modes this has no affect. - - - - - The profile which determines the graphics feature level. - - - - - Returns the graphics device for this manager. - - - - - Indicates the desire to switch into fullscreen mode. - - - When called at startup this will automatically set fullscreen mode during initialization. If - set after startup you must call ApplyChanges() for the fullscreen mode to be changed. - Note that for some platforms that do not support windowed modes this property has no affect. - - - - - Gets or sets the boolean which defines how window switches from windowed to fullscreen state. - "Hard" mode(true) is slow to switch, but more effecient for performance, while "soft" mode(false) is vice versa. - The default value is true. - - - - - Indicates the desire for a multisampled back buffer. - - - When called at startup this will automatically set the MSAA mode during initialization. If - set after startup you must call ApplyChanges() for the MSAA mode to be changed. - - - - - Indicates the desired back buffer color format. - - - When called at startup this will automatically set the format during initialization. If - set after startup you must call ApplyChanges() for the format to be changed. - - - - - Indicates the desired back buffer height in pixels. - - - When called at startup this will automatically set the height during initialization. If - set after startup you must call ApplyChanges() for the height to be changed. - - - - - Indicates the desired back buffer width in pixels. - - - When called at startup this will automatically set the width during initialization. If - set after startup you must call ApplyChanges() for the width to be changed. - - - - - Indicates the desired depth-stencil buffer format. - - - The depth-stencil buffer format defines the scene depth precision and stencil bits available for effects during rendering. - When called at startup this will automatically set the format during initialization. If - set after startup you must call ApplyChanges() for the format to be changed. - - - - - Indicates the desire for vsync when presenting the back buffer. - - - Vsync limits the frame rate of the game to the monitor referesh rate to prevent screen tearing. - When called at startup this will automatically set the vsync mode during initialization. If - set after startup you must call ApplyChanges() for the vsync mode to be changed. - - - - - Indicates the desired allowable display orientations when the device is rotated. - - - This property only applies to mobile platforms with automatic display rotation. - When called at startup this will automatically apply the supported orientations during initialization. If - set after startup you must call ApplyChanges() for the supported orientations to be changed. - - - - - Gets the duration of the Album. - - - - - Gets the Genre of the Album. - - - - - Gets a value indicating whether the Album has associated album art. - - - - - Gets a value indicating whether the object is disposed. - - - - - Gets the name of the Album. - - - - - Gets a SongCollection that contains the songs on the album. - - - - - Immediately releases the unmanaged resources used by this object. - - - - - Returns the stream that contains the album art image data. - - - - - Returns the stream that contains the album thumbnail image data. - - - - - Returns a String representation of this Album. - - - - - Gets the hash code for this instance. - - - - - Gets the number of Album objects in the AlbumCollection. - - - - - Gets a value indicating whether the object is disposed. - - - - - Gets the Album at the specified index in the AlbumCollection. - - Index of the Album to get. - - - - Immediately releases the unmanaged resources used by this object. - - - - - Gets the AlbumCollection for the Artist. - - - - - Gets a value indicating whether the object is disposed. - - - - - Gets the name of the Artist. - - - - - Gets the SongCollection for the Artist. - - - - - Immediately releases the unmanaged resources used by this object. - - - - - Returns a String representation of the Artist. - - - - - Gets the hash code for this instance. - - - - - Gets the AlbumCollection for the Genre. - - - - - Gets a value indicating whether the object is disposed. - - - - - Gets the name of the Genre. - - - - - Gets the SongCollection for the Genre. - - - - - Immediately releases the unmanaged resources used by this object. - - - - - Returns a String representation of the Genre. - - - - - Gets the hash code for this instance. - - - - - Load the contents of MediaLibrary. This blocking call might take up to a few minutes depending on the platform and the size of the user's music library. - - Callback that reports back the progress of the music library loading in percents (0-100). - - - - Play clears the current playback queue, and then queues up the specified song for playback. - Playback starts immediately at the beginning of the song. - - - - - Play clears the current playback queue, and then queues up the specified song for playback. - Playback starts immediately at the given position of the song. - - - - - Gets the Album on which the Song appears. - - - - - Gets the Artist of the Song. - - - - - Gets the Genre of the Song. - - - - - Returns a song that can be played via . - - The name for the song. See . - The path to the song file. - - - - - Type of sounds in a video - - - - - This video contains only music. - - - - - This video contains only dialog. - - - - - This video contains music and dialog. - - - - - Compute a hash from a byte array. - - - Modified FNV Hash in C# - http://stackoverflow.com/a/468084 - - - - - Compute a hash from the content of a stream and restore the position. - - - Modified FNV Hash in C# - http://stackoverflow.com/a/468084 - - - - - Combines the filePath and relativeFile based on relativeFile being a file in the same location as filePath. - Relative directory operators (..) are also resolved - - "A\B\C.txt","D.txt" becomes "A\B\D.txt" - "A\B\C.txt","..\D.txt" becomes "A\D.txt" - Path to the file we are starting from - Relative location of another file to resolve the path to - - - - Convert a pointer to a Utf8 null-terminated string to a .NET System.String - - - - - Returns the Assembly of a Type - - - - - Returns true if the given type represents a non-object type that is not abstract. - - - - - Returns true if the get method of the given property exist and are public. - Note that we allow a getter-only property to be serialized (and deserialized), - *if* CanDeserializeIntoExistingObject is true for the property type. - - - - - Returns true if the given type can be assigned the given value - - - - - Returns true if the given type can be assigned a value with the given object type - - - - - Generics handler for Marshal.SizeOf - - - - - Fallback handler for Marshal.SizeOf(type) - - - - - Represents a Zlib stream for compression or decompression. - - - - - The ZlibStream is a Decorator on a . It adds ZLIB compression or decompression to any - stream. - - - Using this stream, applications can compress or decompress data via - stream Read() and Write() operations. Either compression or - decompression can occur through either reading or writing. The compression - format used is ZLIB, which is documented in IETF RFC 1950, "ZLIB Compressed - Data Format Specification version 3.3". This implementation of ZLIB always uses - DEFLATE as the compression method. (see IETF RFC 1951, "DEFLATE - Compressed Data Format Specification version 1.3.") - - - The ZLIB format allows for varying compression methods, window sizes, and dictionaries. - This implementation always uses the DEFLATE compression method, a preset dictionary, - and 15 window bits by default. - - - - This class is similar to DeflateStream, except that it adds the - RFC1950 header and trailer bytes to a compressed stream when compressing, or expects - the RFC1950 header and trailer bytes when decompressing. It is also similar to the - . - - - - - - - Create a ZlibStream using the specified CompressionMode. - - - - - When mode is CompressionMode.Compress, the ZlibStream - will use the default compression level. The "captive" stream will be - closed when the ZlibStream is closed. - - - - - - This example uses a ZlibStream to compress a file, and writes the - compressed data to another file. - - using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress)) - { - using (var raw = System.IO.File.Create(fileToCompress + ".zlib")) - { - using (Stream compressor = new ZlibStream(raw, CompressionMode.Compress)) - { - byte[] buffer = new byte[WORKING_BUFFER_SIZE]; - int n; - while ((n= input.Read(buffer, 0, buffer.Length)) != 0) - { - compressor.Write(buffer, 0, n); - } - } - } - } - - - Using input As Stream = File.OpenRead(fileToCompress) - Using raw As FileStream = File.Create(fileToCompress & ".zlib") - Using compressor As Stream = New ZlibStream(raw, CompressionMode.Compress) - Dim buffer As Byte() = New Byte(4096) {} - Dim n As Integer = -1 - Do While (n <> 0) - If (n > 0) Then - compressor.Write(buffer, 0, n) - End If - n = input.Read(buffer, 0, buffer.Length) - Loop - End Using - End Using - End Using - - - - The stream which will be read or written. - Indicates whether the ZlibStream will compress or decompress. - - - - Create a ZlibStream using the specified CompressionMode and - the specified CompressionLevel. - - - - - - When mode is CompressionMode.Decompress, the level parameter is ignored. - The "captive" stream will be closed when the ZlibStream is closed. - - - - - - This example uses a ZlibStream to compress data from a file, and writes the - compressed data to another file. - - - using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress)) - { - using (var raw = System.IO.File.Create(fileToCompress + ".zlib")) - { - using (Stream compressor = new ZlibStream(raw, - CompressionMode.Compress, - CompressionLevel.BestCompression)) - { - byte[] buffer = new byte[WORKING_BUFFER_SIZE]; - int n; - while ((n= input.Read(buffer, 0, buffer.Length)) != 0) - { - compressor.Write(buffer, 0, n); - } - } - } - } - - - - Using input As Stream = File.OpenRead(fileToCompress) - Using raw As FileStream = File.Create(fileToCompress & ".zlib") - Using compressor As Stream = New ZlibStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression) - Dim buffer As Byte() = New Byte(4096) {} - Dim n As Integer = -1 - Do While (n <> 0) - If (n > 0) Then - compressor.Write(buffer, 0, n) - End If - n = input.Read(buffer, 0, buffer.Length) - Loop - End Using - End Using - End Using - - - - The stream to be read or written while deflating or inflating. - Indicates whether the ZlibStream will compress or decompress. - A tuning knob to trade speed for effectiveness. - - - - Create a ZlibStream using the specified CompressionMode, and - explicitly specify whether the captive stream should be left open after - Deflation or Inflation. - - - - - - When mode is CompressionMode.Compress, the ZlibStream will use - the default compression level. - - - - This constructor allows the application to request that the captive stream - remain open after the deflation or inflation occurs. By default, after - Close() is called on the stream, the captive stream is also - closed. In some cases this is not desired, for example if the stream is a - that will be re-read after - compression. Specify true for the parameter to leave the stream - open. - - - - See the other overloads of this constructor for example code. - - - - - The stream which will be read or written. This is called the - "captive" stream in other places in this documentation. - Indicates whether the ZlibStream will compress or decompress. - true if the application would like the stream to remain - open after inflation/deflation. - - - - Create a ZlibStream using the specified CompressionMode - and the specified CompressionLevel, and explicitly specify - whether the stream should be left open after Deflation or Inflation. - - - - - - This constructor allows the application to request that the captive - stream remain open after the deflation or inflation occurs. By - default, after Close() is called on the stream, the captive - stream is also closed. In some cases this is not desired, for example - if the stream is a that will be - re-read after compression. Specify true for the parameter to leave the stream open. - - - - When mode is CompressionMode.Decompress, the level parameter is - ignored. - - - - - - - This example shows how to use a ZlibStream to compress the data from a file, - and store the result into another file. The filestream remains open to allow - additional data to be written to it. - - - using (var output = System.IO.File.Create(fileToCompress + ".zlib")) - { - using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress)) - { - using (Stream compressor = new ZlibStream(output, CompressionMode.Compress, CompressionLevel.BestCompression, true)) - { - byte[] buffer = new byte[WORKING_BUFFER_SIZE]; - int n; - while ((n= input.Read(buffer, 0, buffer.Length)) != 0) - { - compressor.Write(buffer, 0, n); - } - } - } - // can write additional data to the output stream here - } - - - Using output As FileStream = File.Create(fileToCompress & ".zlib") - Using input As Stream = File.OpenRead(fileToCompress) - Using compressor As Stream = New ZlibStream(output, CompressionMode.Compress, CompressionLevel.BestCompression, True) - Dim buffer As Byte() = New Byte(4096) {} - Dim n As Integer = -1 - Do While (n <> 0) - If (n > 0) Then - compressor.Write(buffer, 0, n) - End If - n = input.Read(buffer, 0, buffer.Length) - Loop - End Using - End Using - ' can write additional data to the output stream here. - End Using - - - - The stream which will be read or written. - - Indicates whether the ZlibStream will compress or decompress. - - - true if the application would like the stream to remain open after - inflation/deflation. - - - - A tuning knob to trade speed for effectiveness. This parameter is - effective only when mode is CompressionMode.Compress. - - - - - This property sets the flush behavior on the stream. - Sorry, though, not sure exactly how to describe all the various settings. - - - - - The size of the working buffer for the compression codec. - - - - - The working buffer is used for all stream operations. The default size is - 1024 bytes. The minimum size is 128 bytes. You may get better performance - with a larger buffer. Then again, you might not. You would have to test - it. - - - - Set this before the first call to Read() or Write() on the - stream. If you try to set it afterwards, it will throw. - - - - - Returns the total number of bytes input so far. - - - Returns the total number of bytes output so far. - - - - Dispose the stream. - - - - This may or may not result in a Close() call on the captive - stream. See the constructors that have a leaveOpen parameter - for more information. - - - This method may be invoked in two distinct scenarios. If disposing - == true, the method has been called directly or indirectly by a - user's code, for example via the public Dispose() method. In this - case, both managed and unmanaged resources can be referenced and - disposed. If disposing == false, the method has been called by the - runtime from inside the object finalizer and this method should not - reference other objects; in that case only unmanaged resources must - be referenced or disposed. - - - - indicates whether the Dispose method was invoked by user code. - - - - - Indicates whether the stream can be read. - - - The return value depends on whether the captive stream supports reading. - - - - - Indicates whether the stream supports Seek operations. - - - Always returns false. - - - - - Indicates whether the stream can be written. - - - The return value depends on whether the captive stream supports writing. - - - - - Flush the stream. - - - - - Reading this property always throws a . - - - - - The position of the stream pointer. - - - - Setting this property always throws a . Reading will return the total bytes - written out, if used in writing, or the total bytes read in, if used in - reading. The count may refer to compressed bytes or uncompressed bytes, - depending on how you've used the stream. - - - - - Read data from the stream. - - - - - - If you wish to use the ZlibStream to compress data while reading, - you can create a ZlibStream with CompressionMode.Compress, - providing an uncompressed data stream. Then call Read() on that - ZlibStream, and the data read will be compressed. If you wish to - use the ZlibStream to decompress data while reading, you can create - a ZlibStream with CompressionMode.Decompress, providing a - readable compressed data stream. Then call Read() on that - ZlibStream, and the data will be decompressed as it is read. - - - - A ZlibStream can be used for Read() or Write(), but - not both. - - - - - - The buffer into which the read data should be placed. - - - the offset within that data array to put the first byte read. - - the number of bytes to read. - - the number of bytes read - - - - Calling this method always throws a . - - - The offset to seek to.... - IF THIS METHOD ACTUALLY DID ANYTHING. - - - The reference specifying how to apply the offset.... IF - THIS METHOD ACTUALLY DID ANYTHING. - - - nothing. This method always throws. - - - - Calling this method always throws a . - - - The new value for the stream length.... IF - THIS METHOD ACTUALLY DID ANYTHING. - - - - - Write data to the stream. - - - - - - If you wish to use the ZlibStream to compress data while writing, - you can create a ZlibStream with CompressionMode.Compress, - and a writable output stream. Then call Write() on that - ZlibStream, providing uncompressed data as input. The data sent to - the output stream will be the compressed form of the data written. If you - wish to use the ZlibStream to decompress data while writing, you - can create a ZlibStream with CompressionMode.Decompress, and a - writable output stream. Then call Write() on that stream, - providing previously compressed data. The data sent to the output stream - will be the decompressed form of the data written. - - - - A ZlibStream can be used for Read() or Write(), but not both. - - - The buffer holding data to write to the stream. - the offset within that data array to find the first byte to write. - the number of bytes to write. - - - - Compress a string into a byte array using ZLIB. - - - - Uncompress it with . - - - - - - - - A string to compress. The string will first be encoded - using UTF8, then compressed. - - - The string in compressed form - - - - Compress a byte array into a new byte array using ZLIB. - - - - Uncompress it with . - - - - - - - A buffer to compress. - - - The data in compressed form - - - - Uncompress a ZLIB-compressed byte array into a single string. - - - - - - - A buffer containing ZLIB-compressed data. - - - The uncompressed string - - - - Uncompress a ZLIB-compressed byte array into a byte array. - - - - - - - A buffer containing ZLIB-compressed data. - - - The data in uncompressed form - - - - A bunch of constants used in the Zlib interface. - - - - - The maximum number of window bits for the Deflate algorithm. - - - - - The default number of window bits for the Deflate algorithm. - - - - - indicates everything is A-OK - - - - - Indicates that the last operation reached the end of the stream. - - - - - The operation ended in need of a dictionary. - - - - - There was an error with the stream - not enough data, not open and readable, etc. - - - - - There was an error with the data - not enough data, bad data, etc. - - - - - There was an error with the working buffer. - - - - - The size of the working buffer used in the ZlibCodec class. Defaults to 8192 bytes. - - - - - The minimum size of the working buffer used in the ZlibCodec class. Currently it is 128 bytes. - - - - - Encoder and Decoder for ZLIB and DEFLATE (IETF RFC1950 and RFC1951). - - - - This class compresses and decompresses data according to the Deflate algorithm - and optionally, the ZLIB format, as documented in RFC 1950 - ZLIB and RFC 1951 - DEFLATE. - - - - - The buffer from which data is taken. - - - - - An index into the InputBuffer array, indicating where to start reading. - - - - - The number of bytes available in the InputBuffer, starting at NextIn. - - - Generally you should set this to InputBuffer.Length before the first Inflate() or Deflate() call. - The class will update this number as calls to Inflate/Deflate are made. - - - - - Total number of bytes read so far, through all calls to Inflate()/Deflate(). - - - - - Buffer to store output data. - - - - - An index into the OutputBuffer array, indicating where to start writing. - - - - - The number of bytes available in the OutputBuffer, starting at NextOut. - - - Generally you should set this to OutputBuffer.Length before the first Inflate() or Deflate() call. - The class will update this number as calls to Inflate/Deflate are made. - - - - - Total number of bytes written to the output so far, through all calls to Inflate()/Deflate(). - - - - - used for diagnostics, when something goes wrong! - - - - - The compression level to use in this codec. Useful only in compression mode. - - - - - The number of Window Bits to use. - - - This gauges the size of the sliding window, and hence the - compression effectiveness as well as memory consumption. It's best to just leave this - setting alone if you don't know what it is. The maximum value is 15 bits, which implies - a 32k window. - - - - - The compression strategy to use. - - - This is only effective in compression. The theory offered by ZLIB is that different - strategies could potentially produce significant differences in compression behavior - for different data sets. Unfortunately I don't have any good recommendations for how - to set it differently. When I tested changing the strategy I got minimally different - compression performance. It's best to leave this property alone if you don't have a - good feel for it. Or, you may want to produce a test harness that runs through the - different strategy options and evaluates them on different file types. If you do that, - let me know your results. - - - - - The Adler32 checksum on the data transferred through the codec so far. You probably don't need to look at this. - - - - - Create a ZlibCodec. - - - If you use this default constructor, you will later have to explicitly call - InitializeInflate() or InitializeDeflate() before using the ZlibCodec to compress - or decompress. - - - - - Create a ZlibCodec that either compresses or decompresses. - - - Indicates whether the codec should compress (deflate) or decompress (inflate). - - - - - Initialize the inflation state. - - - It is not necessary to call this before using the ZlibCodec to inflate data; - It is implicitly called when you call the constructor. - - Z_OK if everything goes well. - - - - Initialize the inflation state with an explicit flag to - govern the handling of RFC1950 header bytes. - - - - By default, the ZLIB header defined in RFC 1950 is expected. If - you want to read a zlib stream you should specify true for - expectRfc1950Header. If you have a deflate stream, you will want to specify - false. It is only necessary to invoke this initializer explicitly if you - want to specify false. - - - whether to expect an RFC1950 header byte - pair when reading the stream of data to be inflated. - - Z_OK if everything goes well. - - - - Initialize the ZlibCodec for inflation, with the specified number of window bits. - - The number of window bits to use. If you need to ask what that is, - then you shouldn't be calling this initializer. - Z_OK if all goes well. - - - - Initialize the inflation state with an explicit flag to govern the handling of - RFC1950 header bytes. - - - - If you want to read a zlib stream you should specify true for - expectRfc1950Header. In this case, the library will expect to find a ZLIB - header, as defined in RFC - 1950, in the compressed stream. If you will be reading a DEFLATE or - GZIP stream, which does not have such a header, you will want to specify - false. - - - whether to expect an RFC1950 header byte pair when reading - the stream of data to be inflated. - The number of window bits to use. If you need to ask what that is, - then you shouldn't be calling this initializer. - Z_OK if everything goes well. - - - - Inflate the data in the InputBuffer, placing the result in the OutputBuffer. - - - You must have set InputBuffer and OutputBuffer, NextIn and NextOut, and AvailableBytesIn and - AvailableBytesOut before calling this method. - - - - private void InflateBuffer() - { - int bufferSize = 1024; - byte[] buffer = new byte[bufferSize]; - ZlibCodec decompressor = new ZlibCodec(); - - Console.WriteLine("\n============================================"); - Console.WriteLine("Size of Buffer to Inflate: {0} bytes.", CompressedBytes.Length); - MemoryStream ms = new MemoryStream(DecompressedBytes); - - int rc = decompressor.InitializeInflate(); - - decompressor.InputBuffer = CompressedBytes; - decompressor.NextIn = 0; - decompressor.AvailableBytesIn = CompressedBytes.Length; - - decompressor.OutputBuffer = buffer; - - // pass 1: inflate - do - { - decompressor.NextOut = 0; - decompressor.AvailableBytesOut = buffer.Length; - rc = decompressor.Inflate(FlushType.None); - - if (rc != ZlibConstants.Z_OK && rc != ZlibConstants.Z_STREAM_END) - throw new Exception("inflating: " + decompressor.Message); - - ms.Write(decompressor.OutputBuffer, 0, buffer.Length - decompressor.AvailableBytesOut); - } - while (decompressor.AvailableBytesIn > 0 || decompressor.AvailableBytesOut == 0); - - // pass 2: finish and flush - do - { - decompressor.NextOut = 0; - decompressor.AvailableBytesOut = buffer.Length; - rc = decompressor.Inflate(FlushType.Finish); - - if (rc != ZlibConstants.Z_STREAM_END && rc != ZlibConstants.Z_OK) - throw new Exception("inflating: " + decompressor.Message); - - if (buffer.Length - decompressor.AvailableBytesOut > 0) - ms.Write(buffer, 0, buffer.Length - decompressor.AvailableBytesOut); - } - while (decompressor.AvailableBytesIn > 0 || decompressor.AvailableBytesOut == 0); - - decompressor.EndInflate(); - } - - - - The flush to use when inflating. - Z_OK if everything goes well. - - - - Ends an inflation session. - - - Call this after successively calling Inflate(). This will cause all buffers to be flushed. - After calling this you cannot call Inflate() without a intervening call to one of the - InitializeInflate() overloads. - - Z_OK if everything goes well. - - - - I don't know what this does! - - Z_OK if everything goes well. - - - - Initialize the ZlibCodec for deflation operation. - - - The codec will use the MAX window bits and the default level of compression. - - - - int bufferSize = 40000; - byte[] CompressedBytes = new byte[bufferSize]; - byte[] DecompressedBytes = new byte[bufferSize]; - - ZlibCodec compressor = new ZlibCodec(); - - compressor.InitializeDeflate(CompressionLevel.Default); - - compressor.InputBuffer = System.Text.ASCIIEncoding.ASCII.GetBytes(TextToCompress); - compressor.NextIn = 0; - compressor.AvailableBytesIn = compressor.InputBuffer.Length; - - compressor.OutputBuffer = CompressedBytes; - compressor.NextOut = 0; - compressor.AvailableBytesOut = CompressedBytes.Length; - - while (compressor.TotalBytesIn != TextToCompress.Length && compressor.TotalBytesOut < bufferSize) - { - compressor.Deflate(FlushType.None); - } - - while (true) - { - int rc= compressor.Deflate(FlushType.Finish); - if (rc == ZlibConstants.Z_STREAM_END) break; - } - - compressor.EndDeflate(); - - - - Z_OK if all goes well. You generally don't need to check the return code. - - - - Initialize the ZlibCodec for deflation operation, using the specified CompressionLevel. - - - The codec will use the maximum window bits (15) and the specified - CompressionLevel. It will emit a ZLIB stream as it compresses. - - The compression level for the codec. - Z_OK if all goes well. - - - - Initialize the ZlibCodec for deflation operation, using the specified CompressionLevel, - and the explicit flag governing whether to emit an RFC1950 header byte pair. - - - The codec will use the maximum window bits (15) and the specified CompressionLevel. - If you want to generate a zlib stream, you should specify true for - wantRfc1950Header. In this case, the library will emit a ZLIB - header, as defined in RFC - 1950, in the compressed stream. - - The compression level for the codec. - whether to emit an initial RFC1950 byte pair in the compressed stream. - Z_OK if all goes well. - - - - Initialize the ZlibCodec for deflation operation, using the specified CompressionLevel, - and the specified number of window bits. - - - The codec will use the specified number of window bits and the specified CompressionLevel. - - The compression level for the codec. - the number of window bits to use. If you don't know what this means, don't use this method. - Z_OK if all goes well. - - - - Initialize the ZlibCodec for deflation operation, using the specified - CompressionLevel, the specified number of window bits, and the explicit flag - governing whether to emit an RFC1950 header byte pair. - - - The compression level for the codec. - whether to emit an initial RFC1950 byte pair in the compressed stream. - the number of window bits to use. If you don't know what this means, don't use this method. - Z_OK if all goes well. - - - - Deflate one batch of data. - - - You must have set InputBuffer and OutputBuffer before calling this method. - - - - private void DeflateBuffer(CompressionLevel level) - { - int bufferSize = 1024; - byte[] buffer = new byte[bufferSize]; - ZlibCodec compressor = new ZlibCodec(); - - Console.WriteLine("\n============================================"); - Console.WriteLine("Size of Buffer to Deflate: {0} bytes.", UncompressedBytes.Length); - MemoryStream ms = new MemoryStream(); - - int rc = compressor.InitializeDeflate(level); - - compressor.InputBuffer = UncompressedBytes; - compressor.NextIn = 0; - compressor.AvailableBytesIn = UncompressedBytes.Length; - - compressor.OutputBuffer = buffer; - - // pass 1: deflate - do - { - compressor.NextOut = 0; - compressor.AvailableBytesOut = buffer.Length; - rc = compressor.Deflate(FlushType.None); - - if (rc != ZlibConstants.Z_OK && rc != ZlibConstants.Z_STREAM_END) - throw new Exception("deflating: " + compressor.Message); - - ms.Write(compressor.OutputBuffer, 0, buffer.Length - compressor.AvailableBytesOut); - } - while (compressor.AvailableBytesIn > 0 || compressor.AvailableBytesOut == 0); - - // pass 2: finish and flush - do - { - compressor.NextOut = 0; - compressor.AvailableBytesOut = buffer.Length; - rc = compressor.Deflate(FlushType.Finish); - - if (rc != ZlibConstants.Z_STREAM_END && rc != ZlibConstants.Z_OK) - throw new Exception("deflating: " + compressor.Message); - - if (buffer.Length - compressor.AvailableBytesOut > 0) - ms.Write(buffer, 0, buffer.Length - compressor.AvailableBytesOut); - } - while (compressor.AvailableBytesIn > 0 || compressor.AvailableBytesOut == 0); - - compressor.EndDeflate(); - - ms.Seek(0, SeekOrigin.Begin); - CompressedBytes = new byte[compressor.TotalBytesOut]; - ms.Read(CompressedBytes, 0, CompressedBytes.Length); - } - - - whether to flush all data as you deflate. Generally you will want to - use Z_NO_FLUSH here, in a series of calls to Deflate(), and then call EndDeflate() to - flush everything. - - Z_OK if all goes well. - - - - End a deflation session. - - - Call this after making a series of one or more calls to Deflate(). All buffers are flushed. - - Z_OK if all goes well. - - - - Reset a codec for another deflation session. - - - Call this to reset the deflation state. For example if a thread is deflating - non-consecutive blocks, you can call Reset() after the Deflate(Sync) of the first - block and before the next Deflate(None) of the second block. - - Z_OK if all goes well. - - - - Set the CompressionStrategy and CompressionLevel for a deflation session. - - the level of compression to use. - the strategy to use for compression. - Z_OK if all goes well. - - - - Set the dictionary to be used for either Inflation or Deflation. - - The dictionary bytes to use. - Z_OK if all goes well. - - - - Describes how to flush the current deflate operation. - - - The different FlushType values are useful when using a Deflate in a streaming application. - - - - No flush at all. - - - Closes the current block, but doesn't flush it to - the output. Used internally only in hypothetical - scenarios. This was supposed to be removed by Zlib, but it is - still in use in some edge cases. - - - - - Use this during compression to specify that all pending output should be - flushed to the output buffer and the output should be aligned on a byte - boundary. You might use this in a streaming communication scenario, so that - the decompressor can get all input data available so far. When using this - with a ZlibCodec, AvailableBytesIn will be zero after the call if - enough output space has been provided before the call. Flushing will - degrade compression and so it should be used only when necessary. - - - - - Use this during compression to specify that all output should be flushed, as - with FlushType.Sync, but also, the compression state should be reset - so that decompression can restart from this point if previous compressed - data has been damaged or if random access is desired. Using - FlushType.Full too often can significantly degrade the compression. - - - - Signals the end of the compression/decompression stream. - - - - The compression level to be used when using a DeflateStream or ZlibStream with CompressionMode.Compress. - - - - - None means that the data will be simply stored, with no change at all. - If you are producing ZIPs for use on Mac OSX, be aware that archives produced with CompressionLevel.None - cannot be opened with the default zip reader. Use a different CompressionLevel. - - - - - Same as None. - - - - - The fastest but least effective compression. - - - - - A synonym for BestSpeed. - - - - - A little slower, but better, than level 1. - - - - - A little slower, but better, than level 2. - - - - - A little slower, but better, than level 3. - - - - - A little slower than level 4, but with better compression. - - - - - The default compression level, with a good balance of speed and compression efficiency. - - - - - A synonym for Default. - - - - - Pretty good compression! - - - - - Better compression than Level7! - - - - - The "best" compression, where best means greatest reduction in size of the input data stream. - This is also the slowest compression. - - - - - A synonym for BestCompression. - - - - - Describes options for how the compression algorithm is executed. Different strategies - work better on different sorts of data. The strategy parameter can affect the compression - ratio and the speed of compression but not the correctness of the compresssion. - - - - - The default strategy is probably the best for normal data. - - - - - The Filtered strategy is intended to be used most effectively with data produced by a - filter or predictor. By this definition, filtered data consists mostly of small - values with a somewhat random distribution. In this case, the compression algorithm - is tuned to compress them better. The effect of Filtered is to force more Huffman - coding and less string matching; it is a half-step between Default and HuffmanOnly. - - - - - Using HuffmanOnly will force the compressor to do Huffman encoding only, with no - string matching. - - - - - An enum to specify the direction of transcoding - whether to compress or decompress. - - - - - Used to specify that the stream should compress the data. - - - - - Used to specify that the stream should decompress the data. - - - - - A general purpose exception class for exceptions in the Zlib library. - - - - - The ZlibException class captures exception information generated - by the Zlib library. - - - - - This ctor collects a message attached to the exception. - - the message for the exception. - - - - Performs an unsigned bitwise right shift with the specified number - - Number to operate on - Ammount of bits to shift - The resulting number from the shift operation - - - - Reads a number of characters from the current source TextReader and writes - the data to the target array at the specified index. - - - The source TextReader to read from - Contains the array of characteres read from the source TextReader. - The starting index of the target array. - The maximum number of characters to read from the source TextReader. - - - The number of characters read. The number will be less than or equal to - count depending on the data available in the source TextReader. Returns -1 - if the end of the stream is reached. - - - - - Computes an Adler-32 checksum. - - - The Adler checksum is similar to a CRC checksum, but faster to compute, though less - reliable. It is used in producing RFC1950 compressed streams. The Adler checksum - is a required part of the "ZLIB" standard. Applications will almost never need to - use this class directly. - - - - - - - Calculates the Adler32 checksum. - - - - This is used within ZLIB. You probably don't need to use this directly. - - - - To compute an Adler32 checksum on a byte array: - - var adler = Adler.Adler32(0, null, 0, 0); - adler = Adler.Adler32(adler, buffer, index, length); - - - - - - Map from a distance to a distance code. - - - No side effects. _dist_code[256] and _dist_code[257] are never used. - - - - - A class for compressing and decompressing GZIP streams. - - - - - The GZipStream is a Decorator on a - . It adds GZIP compression or decompression to any - stream. - - - - Like the System.IO.Compression.GZipStream in the .NET Base Class Library, the - Ionic.Zlib.GZipStream can compress while writing, or decompress while - reading, but not vice versa. The compression method used is GZIP, which is - documented in IETF RFC - 1952, "GZIP file format specification version 4.3". - - - A GZipStream can be used to decompress data (through Read()) or - to compress data (through Write()), but not both. - - - - If you wish to use the GZipStream to compress data, you must wrap it - around a write-able stream. As you call Write() on the GZipStream, the - data will be compressed into the GZIP format. If you want to decompress data, - you must wrap the GZipStream around a readable stream that contains an - IETF RFC 1952-compliant stream. The data will be decompressed as you call - Read() on the GZipStream. - - - - Though the GZIP format allows data from multiple files to be concatenated - together, this stream handles only a single segment of GZIP format, typically - representing a single file. - - - - - - - - The comment on the GZIP stream. - - - - - The GZIP format allows for each file to optionally have an associated - comment stored with the file. The comment is encoded with the ISO-8859-1 - code page. To include a comment in a GZIP stream you create, set this - property before calling Write() for the first time on the - GZipStream. - - - - When using GZipStream to decompress, you can retrieve this property - after the first call to Read(). If no comment has been set in the - GZIP bytestream, the Comment property will return null - (Nothing in VB). - - - - - - The FileName for the GZIP stream. - - - - - - The GZIP format optionally allows each file to have an associated - filename. When compressing data (through Write()), set this - FileName before calling Write() the first time on the GZipStream. - The actual filename is encoded into the GZIP bytestream with the - ISO-8859-1 code page, according to RFC 1952. It is the application's - responsibility to insure that the FileName can be encoded and decoded - correctly with this code page. - - - - When decompressing (through Read()), you can retrieve this value - any time after the first Read(). In the case where there was no filename - encoded into the GZIP bytestream, the property will return null (Nothing - in VB). - - - - - - The last modified time for the GZIP stream. - - - - GZIP allows the storage of a last modified time with each GZIP entry. - When compressing data, you can set this before the first call to - Write(). When decompressing, you can retrieve this value any time - after the first call to Read(). - - - - - The CRC on the GZIP stream. - - - This is used for internal error checking. You probably don't need to look at this property. - - - - - Create a GZipStream using the specified CompressionMode. - - - - - When mode is CompressionMode.Compress, the GZipStream will use the - default compression level. - - - - As noted in the class documentation, the CompressionMode (Compress - or Decompress) also establishes the "direction" of the stream. A - GZipStream with CompressionMode.Compress works only through - Write(). A GZipStream with - CompressionMode.Decompress works only through Read(). - - - - - - This example shows how to use a GZipStream to compress data. - - using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress)) - { - using (var raw = System.IO.File.Create(outputFile)) - { - using (Stream compressor = new GZipStream(raw, CompressionMode.Compress)) - { - byte[] buffer = new byte[WORKING_BUFFER_SIZE]; - int n; - while ((n= input.Read(buffer, 0, buffer.Length)) != 0) - { - compressor.Write(buffer, 0, n); - } - } - } - } - - - Dim outputFile As String = (fileToCompress & ".compressed") - Using input As Stream = File.OpenRead(fileToCompress) - Using raw As FileStream = File.Create(outputFile) - Using compressor As Stream = New GZipStream(raw, CompressionMode.Compress) - Dim buffer As Byte() = New Byte(4096) {} - Dim n As Integer = -1 - Do While (n <> 0) - If (n > 0) Then - compressor.Write(buffer, 0, n) - End If - n = input.Read(buffer, 0, buffer.Length) - Loop - End Using - End Using - End Using - - - - - This example shows how to use a GZipStream to uncompress a file. - - private void GunZipFile(string filename) - { - if (!filename.EndsWith(".gz)) - throw new ArgumentException("filename"); - var DecompressedFile = filename.Substring(0,filename.Length-3); - byte[] working = new byte[WORKING_BUFFER_SIZE]; - int n= 1; - using (System.IO.Stream input = System.IO.File.OpenRead(filename)) - { - using (Stream decompressor= new Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, true)) - { - using (var output = System.IO.File.Create(DecompressedFile)) - { - while (n !=0) - { - n= decompressor.Read(working, 0, working.Length); - if (n > 0) - { - output.Write(working, 0, n); - } - } - } - } - } - } - - - - Private Sub GunZipFile(ByVal filename as String) - If Not (filename.EndsWith(".gz)) Then - Throw New ArgumentException("filename") - End If - Dim DecompressedFile as String = filename.Substring(0,filename.Length-3) - Dim working(WORKING_BUFFER_SIZE) as Byte - Dim n As Integer = 1 - Using input As Stream = File.OpenRead(filename) - Using decompressor As Stream = new Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, True) - Using output As Stream = File.Create(UncompressedFile) - Do - n= decompressor.Read(working, 0, working.Length) - If n > 0 Then - output.Write(working, 0, n) - End IF - Loop While (n > 0) - End Using - End Using - End Using - End Sub - - - - The stream which will be read or written. - Indicates whether the GZipStream will compress or decompress. - - - - Create a GZipStream using the specified CompressionMode and - the specified CompressionLevel. - - - - - The CompressionMode (Compress or Decompress) also establishes the - "direction" of the stream. A GZipStream with - CompressionMode.Compress works only through Write(). A - GZipStream with CompressionMode.Decompress works only - through Read(). - - - - - - - This example shows how to use a GZipStream to compress a file into a .gz file. - - - using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress)) - { - using (var raw = System.IO.File.Create(fileToCompress + ".gz")) - { - using (Stream compressor = new GZipStream(raw, - CompressionMode.Compress, - CompressionLevel.BestCompression)) - { - byte[] buffer = new byte[WORKING_BUFFER_SIZE]; - int n; - while ((n= input.Read(buffer, 0, buffer.Length)) != 0) - { - compressor.Write(buffer, 0, n); - } - } - } - } - - - - Using input As Stream = File.OpenRead(fileToCompress) - Using raw As FileStream = File.Create(fileToCompress & ".gz") - Using compressor As Stream = New GZipStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression) - Dim buffer As Byte() = New Byte(4096) {} - Dim n As Integer = -1 - Do While (n <> 0) - If (n > 0) Then - compressor.Write(buffer, 0, n) - End If - n = input.Read(buffer, 0, buffer.Length) - Loop - End Using - End Using - End Using - - - The stream to be read or written while deflating or inflating. - Indicates whether the GZipStream will compress or decompress. - A tuning knob to trade speed for effectiveness. - - - - Create a GZipStream using the specified CompressionMode, and - explicitly specify whether the stream should be left open after Deflation - or Inflation. - - - - - This constructor allows the application to request that the captive stream - remain open after the deflation or inflation occurs. By default, after - Close() is called on the stream, the captive stream is also - closed. In some cases this is not desired, for example if the stream is a - memory stream that will be re-read after compressed data has been written - to it. Specify true for the parameter to leave - the stream open. - - - - The (Compress or Decompress) also - establishes the "direction" of the stream. A GZipStream with - CompressionMode.Compress works only through Write(). A GZipStream - with CompressionMode.Decompress works only through Read(). - - - - The GZipStream will use the default compression level. If you want - to specify the compression level, see . - - - - See the other overloads of this constructor for example code. - - - - - - The stream which will be read or written. This is called the "captive" - stream in other places in this documentation. - - - Indicates whether the GZipStream will compress or decompress. - - - - true if the application would like the base stream to remain open after - inflation/deflation. - - - - - Create a GZipStream using the specified CompressionMode and the - specified CompressionLevel, and explicitly specify whether the - stream should be left open after Deflation or Inflation. - - - - - - This constructor allows the application to request that the captive stream - remain open after the deflation or inflation occurs. By default, after - Close() is called on the stream, the captive stream is also - closed. In some cases this is not desired, for example if the stream is a - memory stream that will be re-read after compressed data has been written - to it. Specify true for the parameter to - leave the stream open. - - - - As noted in the class documentation, the CompressionMode (Compress - or Decompress) also establishes the "direction" of the stream. A - GZipStream with CompressionMode.Compress works only through - Write(). A GZipStream with CompressionMode.Decompress works only - through Read(). - - - - - - This example shows how to use a GZipStream to compress data. - - using (System.IO.Stream input = System.IO.File.OpenRead(fileToCompress)) - { - using (var raw = System.IO.File.Create(outputFile)) - { - using (Stream compressor = new GZipStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression, true)) - { - byte[] buffer = new byte[WORKING_BUFFER_SIZE]; - int n; - while ((n= input.Read(buffer, 0, buffer.Length)) != 0) - { - compressor.Write(buffer, 0, n); - } - } - } - } - - - Dim outputFile As String = (fileToCompress & ".compressed") - Using input As Stream = File.OpenRead(fileToCompress) - Using raw As FileStream = File.Create(outputFile) - Using compressor As Stream = New GZipStream(raw, CompressionMode.Compress, CompressionLevel.BestCompression, True) - Dim buffer As Byte() = New Byte(4096) {} - Dim n As Integer = -1 - Do While (n <> 0) - If (n > 0) Then - compressor.Write(buffer, 0, n) - End If - n = input.Read(buffer, 0, buffer.Length) - Loop - End Using - End Using - End Using - - - The stream which will be read or written. - Indicates whether the GZipStream will compress or decompress. - true if the application would like the stream to remain open after inflation/deflation. - A tuning knob to trade speed for effectiveness. - - - - This property sets the flush behavior on the stream. - - - - - The size of the working buffer for the compression codec. - - - - - The working buffer is used for all stream operations. The default size is - 1024 bytes. The minimum size is 128 bytes. You may get better performance - with a larger buffer. Then again, you might not. You would have to test - it. - - - - Set this before the first call to Read() or Write() on the - stream. If you try to set it afterwards, it will throw. - - - - - Returns the total number of bytes input so far. - - - Returns the total number of bytes output so far. - - - - Dispose the stream. - - - - This may or may not result in a Close() call on the captive - stream. See the constructors that have a leaveOpen parameter - for more information. - - - This method may be invoked in two distinct scenarios. If disposing - == true, the method has been called directly or indirectly by a - user's code, for example via the internal Dispose() method. In this - case, both managed and unmanaged resources can be referenced and - disposed. If disposing == false, the method has been called by the - runtime from inside the object finalizer and this method should not - reference other objects; in that case only unmanaged resources must - be referenced or disposed. - - - - indicates whether the Dispose method was invoked by user code. - - - - - Indicates whether the stream can be read. - - - The return value depends on whether the captive stream supports reading. - - - - - Indicates whether the stream supports Seek operations. - - - Always returns false. - - - - - Indicates whether the stream can be written. - - - The return value depends on whether the captive stream supports writing. - - - - - Flush the stream. - - - - - Reading this property always throws a . - - - - - The position of the stream pointer. - - - - Setting this property always throws a . Reading will return the total bytes - written out, if used in writing, or the total bytes read in, if used in - reading. The count may refer to compressed bytes or uncompressed bytes, - depending on how you've used the stream. - - - - - Read and decompress data from the source stream. - - - - With a GZipStream, decompression is done through reading. - - - - - byte[] working = new byte[WORKING_BUFFER_SIZE]; - using (System.IO.Stream input = System.IO.File.OpenRead(_CompressedFile)) - { - using (Stream decompressor= new Ionic.Zlib.GZipStream(input, CompressionMode.Decompress, true)) - { - using (var output = System.IO.File.Create(_DecompressedFile)) - { - int n; - while ((n= decompressor.Read(working, 0, working.Length)) !=0) - { - output.Write(working, 0, n); - } - } - } - } - - - The buffer into which the decompressed data should be placed. - the offset within that data array to put the first byte read. - the number of bytes to read. - the number of bytes actually read - - - - Calling this method always throws a . - - irrelevant; it will always throw! - irrelevant; it will always throw! - irrelevant! - - - - Calling this method always throws a . - - irrelevant; this method will always throw! - - - - Write data to the stream. - - - - - If you wish to use the GZipStream to compress data while writing, - you can create a GZipStream with CompressionMode.Compress, and a - writable output stream. Then call Write() on that GZipStream, - providing uncompressed data as input. The data sent to the output stream - will be the compressed form of the data written. - - - - A GZipStream can be used for Read() or Write(), but not - both. Writing implies compression. Reading implies decompression. - - - - The buffer holding data to write to the stream. - the offset within that data array to find the first byte to write. - the number of bytes to write. - - - - Compress a string into a byte array using GZip. - - - - Uncompress it with . - - - - - - - A string to compress. The string will first be encoded - using UTF8, then compressed. - - - The string in compressed form - - - - Compress a byte array into a new byte array using GZip. - - - - Uncompress it with . - - - - - - - A buffer to compress. - - - The data in compressed form - - - - Uncompress a GZip'ed byte array into a single string. - - - - - - - A buffer containing GZIP-compressed data. - - - The uncompressed string - - - - Uncompress a GZip'ed byte array into a byte array. - - - - - - - A buffer containing data that has been compressed with GZip. - - - The data in uncompressed form - - - - Computes a CRC-32. The CRC-32 algorithm is parameterized - you - can set the polynomial and enable or disable bit - reversal. This can be used for GZIP, BZip2, or ZIP. - - - This type is used internally by DotNetZip; it is generally not used - directly by applications wishing to create, read, or manipulate zip - archive files. - - - - - Indicates the total number of bytes applied to the CRC. - - - - - Indicates the current CRC for all blocks slurped in. - - - - - Returns the CRC32 for the specified stream. - - The stream over which to calculate the CRC32 - the CRC32 calculation - - - - Returns the CRC32 for the specified stream, and writes the input into the - output stream. - - The stream over which to calculate the CRC32 - The stream into which to deflate the input - the CRC32 calculation - - - - Get the CRC32 for the given (word,byte) combo. This is a - computation defined by PKzip for PKZIP 2.0 (weak) encryption. - - The word to start with. - The byte to combine it with. - The CRC-ized result. - - - - Update the value for the running CRC32 using the given block of bytes. - This is useful when using the CRC32() class in a Stream. - - block of bytes to slurp - starting point in the block - how many bytes within the block to slurp - - - - Process one byte in the CRC. - - the byte to include into the CRC . - - - - Process a run of N identical bytes into the CRC. - - - - This method serves as an optimization for updating the CRC when a - run of identical bytes is found. Rather than passing in a buffer of - length n, containing all identical bytes b, this method accepts the - byte value and the length of the (virtual) buffer - the length of - the run. - - - the byte to include into the CRC. - the number of times that byte should be repeated. - - - - Combines the given CRC32 value with the current running total. - - - This is useful when using a divide-and-conquer approach to - calculating a CRC. Multiple threads can each calculate a - CRC32 on a segment of the data, and then combine the - individual CRC32 values at the end. - - the crc value to be combined with this one - the length of data the CRC value was calculated on - - - - Create an instance of the CRC32 class using the default settings: no - bit reversal, and a polynomial of 0xEDB88320. - - - - - Create an instance of the CRC32 class, specifying whether to reverse - data bits or not. - - - specify true if the instance should reverse data bits. - - - - In the CRC-32 used by BZip2, the bits are reversed. Therefore if you - want a CRC32 with compatibility with BZip2, you should pass true - here. In the CRC-32 used by GZIP and PKZIP, the bits are not - reversed; Therefore if you want a CRC32 with compatibility with - those, you should pass false. - - - - - - Create an instance of the CRC32 class, specifying the polynomial and - whether to reverse data bits or not. - - - The polynomial to use for the CRC, expressed in the reversed (LSB) - format: the highest ordered bit in the polynomial value is the - coefficient of the 0th power; the second-highest order bit is the - coefficient of the 1 power, and so on. Expressed this way, the - polynomial for the CRC-32C used in IEEE 802.3, is 0xEDB88320. - - - specify true if the instance should reverse data bits. - - - - - In the CRC-32 used by BZip2, the bits are reversed. Therefore if you - want a CRC32 with compatibility with BZip2, you should pass true - here for the reverseBits parameter. In the CRC-32 used by - GZIP and PKZIP, the bits are not reversed; Therefore if you want a - CRC32 with compatibility with those, you should pass false for the - reverseBits parameter. - - - - - - Reset the CRC-32 class - clear the CRC "remainder register." - - - - Use this when employing a single instance of this class to compute - multiple, distinct CRCs on multiple, distinct data blocks. - - - - - - A Stream that calculates a CRC32 (a checksum) on all bytes read, - or on all bytes written. - - - - - This class can be used to verify the CRC of a ZipEntry when - reading from a stream, or to calculate a CRC when writing to a - stream. The stream should be used to either read, or write, but - not both. If you intermix reads and writes, the results are not - defined. - - - - This class is intended primarily for use internally by the - DotNetZip library. - - - - - - The default constructor. - - - - Instances returned from this constructor will leave the underlying - stream open upon Close(). The stream uses the default CRC32 - algorithm, which implies a polynomial of 0xEDB88320. - - - The underlying stream - - - - The constructor allows the caller to specify how to handle the - underlying stream at close. - - - - The stream uses the default CRC32 algorithm, which implies a - polynomial of 0xEDB88320. - - - The underlying stream - true to leave the underlying stream - open upon close of the CrcCalculatorStream; false otherwise. - - - - A constructor allowing the specification of the length of the stream - to read. - - - - The stream uses the default CRC32 algorithm, which implies a - polynomial of 0xEDB88320. - - - Instances returned from this constructor will leave the underlying - stream open upon Close(). - - - The underlying stream - The length of the stream to slurp - - - - A constructor allowing the specification of the length of the stream - to read, as well as whether to keep the underlying stream open upon - Close(). - - - - The stream uses the default CRC32 algorithm, which implies a - polynomial of 0xEDB88320. - - - The underlying stream - The length of the stream to slurp - true to leave the underlying stream - open upon close of the CrcCalculatorStream; false otherwise. - - - - A constructor allowing the specification of the length of the stream - to read, as well as whether to keep the underlying stream open upon - Close(), and the CRC32 instance to use. - - - - The stream uses the specified CRC32 instance, which allows the - application to specify how the CRC gets calculated. - - - The underlying stream - The length of the stream to slurp - true to leave the underlying stream - open upon close of the CrcCalculatorStream; false otherwise. - the CRC32 instance to use to calculate the CRC32 - - - - Gets the total number of bytes run through the CRC32 calculator. - - - - This is either the total number of bytes read, or the total number of - bytes written, depending on the direction of this stream. - - - - - Provides the current CRC for all blocks slurped in. - - - - The running total of the CRC is kept as data is written or read - through the stream. read this property after all reads or writes to - get an accurate CRC for the entire stream. - - - - - - Indicates whether the underlying stream will be left open when the - CrcCalculatorStream is Closed. - - - - Set this at any point before calling . - - - - - - Read from the stream - - the buffer to read - the offset at which to start - the number of bytes to read - the number of bytes actually read - - - - Write to the stream. - - the buffer from which to write - the offset at which to start writing - the number of bytes to write - - - - Indicates whether the stream supports reading. - - - - - Indicates whether the stream supports seeking. - - - - Always returns false. - - - - - - Indicates whether the stream supports writing. - - - - - Flush the stream. - - - - - Returns the length of the underlying stream. - - - - - The getter for this property returns the total bytes read. - If you use the setter, it will throw - . - - - - - Seeking is not supported on this stream. This method always throws - - - N/A - N/A - N/A - - - - This method always throws - - - N/A - - - - A custom encoding class that provides encoding capabilities for the - 'Western European (ISO)' encoding under Silverlight.
- This class was generated by a tool. For more information, visit - http://www.hardcodet.net/2010/03/silverlight-text-encoding-class-generator -
-
- - - Gets the name registered with the - Internet Assigned Numbers Authority (IANA) for the current encoding. - - - The IANA name for the current . - - - - - A character that can be set in order to make the encoding class - more fault tolerant. If this property is set, the encoding class will - use this property instead of throwing an exception if an unsupported - byte value is being passed for decoding. - - - - - A byte value that corresponds to the . - It is used in encoding scenarios in case an unsupported character is - being passed for encoding. - - - - - Encodes a set of characters from the specified character array into the specified byte array. - - - The actual number of bytes written into . - - The character array containing the set of characters to encode. - The index of the first character to encode. - The number of characters to encode. - The byte array to contain the resulting sequence of bytes. - The index at which to start writing the resulting sequence of bytes. - - - - - Decodes a sequence of bytes from the specified byte array into the specified character array. - - - The actual number of characters written into . - - The byte array containing the sequence of bytes to decode. - The index of the first byte to decode. - The number of bytes to decode. - The character array to contain the resulting set of characters. - The index at which to start writing the resulting set of characters. - - - - - Calculates the number of bytes produced by encoding a set of characters - from the specified character array. - - - The number of bytes produced by encoding the specified characters. This class - always returns the value of . - - - - - Calculates the number of characters produced by decoding a sequence - of bytes from the specified byte array. - - - The number of characters produced by decoding the specified sequence of bytes. This class - always returns the value of . - - - - - Calculates the maximum number of bytes produced by encoding the specified number of characters. - - - The maximum number of bytes produced by encoding the specified number of characters. This - class always returns the value of . - - The number of characters to encode. - - - - - Calculates the maximum number of characters produced by decoding the specified number of bytes. - - - The maximum number of characters produced by decoding the specified number of bytes. This class - always returns the value of . - - The number of bytes to decode. - - - - Gets the number of characters that are supported by this encoding. - This property returns a maximum value of 256, as the encoding class - only supports single byte encodings (1 byte == 256 possible values). - - - - - This table contains characters in an array. The index within the - array corresponds to the encoding's mapping of bytes to characters - (e.g. if a byte value of 5 is used to encode the character 'x', this - character will be stored at the array index 5. - - - - - This dictionary is used to resolve byte values for a given character. - - - - - Length of Data field - - - - - CRC of both Type and Data fields, but not Length field - - - - - Build CRC lookup table for performance (once-off) - - - - - Applies all PNG filters to the given scanline and returns the filtered scanline that is deemed - to be most compressible, using lowest total variation as proxy for compressibility. - - - - - - - - - Calculates the total variation of given byte array. Total variation is the sum of the absolute values of - neighbour differences. - - - - - - - Get a buffer that is at least as big as size. - - - - - Return the given buffer to the pool. - - - - - - This code had been borrowed from here: https://github.com/MachineCognitis/C.math.NET - - - - - - - - A thread-safe, read-only, buffering stream wrapper. - - - - - A single data packet from a logical Vorbis stream. - - - - - Defines flags to apply to the current packet - - - - - Packet is first since reader had to resync with stream. - - - - - Packet is the last in the logical stream. - - - - - Packet does not have all its data available. - - - - - Packet has a granule count defined. - - - - - Flag for use by inheritors. - - - - - Flag for use by inheritors. - - - - - Flag for use by inheritors. - - - - - Flag for use by inheritors. - - - - - Gets the value of the specified flag. - - - - - Sets the value of the specified flag. - - - - - Creates a new instance with the specified length. - - The length of the packet. - - - - Reads the next byte of the packet. - - The next byte if available, otherwise -1. - - - - Indicates that the packet has been read and its data is no longer needed. - - - - - Attempts to read the specified number of bits from the packet, but may return fewer. Does not advance the position counter. - - The number of bits to attempt to read. - The number of bits actually read. - The value of the bits read. - is not between 0 and 64. - - - - Advances the position counter by the specified number of bits. - - The number of bits to advance. - - - - Resets the bit reader. - - - - - Gets whether the packet was found after a stream resync. - - - - - Gets the position of the last granule in the packet. - - - - - Gets the position of the last granule in the page the packet is in. - - - - - Gets the length of the packet. - - - - - Gets whether the packet is the last one in the logical stream. - - - - - Gets the number of bits read from the packet. - - - - - Gets the number of granules in the packet. If null, the packet has not been decoded yet. - - - - - Reads the specified number of bits from the packet and advances the position counter. - - The number of bits to read. - The value of the bits read. - The number of bits specified is not between 0 and 64. - - - - Reads the next byte from the packet. Does not advance the position counter. - - The byte read from the packet. - - - - Reads the next byte from the packet and advances the position counter. - - The byte read from the packet. - - - - Reads the specified number of bytes from the packet and advances the position counter. - - The number of bytes to read. - A byte array holding the data read. - - - - Reads the specified number of bytes from the packet into the buffer specified and advances the position counter. - - The buffer to read into. - The index into the buffer to start placing the read data. - The number of bytes to read. - The number of bytes read. - is less than 0 or + is past the end of . - - - - Reads the next bit from the packet and advances the position counter. - - The value of the bit read. - - - - Retrieves the next 16 bits from the packet as a and advances the position counter. - - The value of the next 16 bits. - - - - Retrieves the next 32 bits from the packet as a and advances the position counter. - - The value of the next 32 bits. - - - - Retrieves the next 64 bits from the packet as a and advances the position counter. - - The value of the next 64 bits. - - - - Retrieves the next 16 bits from the packet as a and advances the position counter. - - The value of the next 16 bits. - - - - Retrieves the next 32 bits from the packet as a and advances the position counter. - - The value of the next 32 bits. - - - - Retrieves the next 64 bits from the packet as a and advances the position counter. - - The value of the next 64 bits. - - - - Advances the position counter by the specified number of bytes. - - The number of bytes to advance. - - - - Provides a interface for a Vorbis logical stream container. - - - - - Gets the list of stream serials found in the container so far. - - - - - Gets whether the container supports seeking. - - - - - Gets the number of bits in the container that are not associated with a logical stream. - - - - - Gets the number of pages that have been read in the container. - - - - - Event raised when a new logical stream is found in the container. - - - - - Initializes the container and finds the first stream. - - True if a valid logical stream is found, otherwise False. - - - - Finds the next new stream in the container. - - True if a new stream was found, otherwise False. - is False. - - - - Retrieves the total number of pages in the container. - - The total number of pages. - is False. - - - - Provides packets on-demand for the Vorbis stream decoder. - - - - - Gets the serial number associated with this stream. - - - - - Gets whether seeking is supported on this stream. - - - - - Gets the number of bits of overhead in this stream's container. - - - - - Retrieves the total number of pages (or frames) this stream uses. - - The page count. - is False. - - - - Retrieves the next packet in the stream. - - The next packet in the stream or null if no more packets. - - - - Retrieves the next packet in the stream but does not advance to the following packet. - - The next packet in the stream or null if no more packets. - - - - Retrieves the packet specified from the stream. - - The index of the packet to retrieve. - The specified packet. - is less than 0 or past the end of the stream. - is False. - - - - Retrieves the total number of granules in this Vorbis stream. - - The number of samples - is False. - - - - Finds the packet index to the granule position specified in the current stream. - - The granule position to seek to. - A callback method that takes the current and previous packets and returns the number of granules in the current packet. - The index of the packet that includes the specified granule position or -1 if none found. - is less than 0 or is after the last granule. - - - - Sets the next packet to be returned, applying a pre-roll as necessary. - - The packet to key from. - The number of packets to return before the indicated packet. - - - - Occurs when the stream is about to change parameters. - - - - - Gets the counters for latency and bitrate calculations, as well as overall bit counts - - - - - Gets the calculated bit rate of audio stream data for the everything decoded so far - - - - - Gets the calculated bit rate for the last ~1 second of audio - - - - - Gets the calculated latency per page - - - - - Gets the calculated latency per packet - - - - - Gets the calculated latency per second of output - - - - - Gets the number of bits read that do not contribute to the output audio - - - - - Gets the number of bits read that contribute to the output audio - - - - - Gets the number of pages read so far in the current stream - - - - - Gets the total number of pages in the current stream - - - - - Gets whether the stream has been clipped since the last reset - - - - - Event data for when a new logical stream is found in a container. - - - - - Creates a new instance of with the specified . - - An instance. - - - - Gets new the instance. - - - - - Gets or sets whether to ignore the logical stream associated with the packet provider. - - - - - Event data for when a logical stream has a parameter change. - - - - - Creates a new instance of . - - The first packet after the parameter change. - - - - Gets the first packet after the parameter change. This would typically be the parameters packet. - - - - - Gets or Sets whether to limit reads to the smallest size possible. - - - - - Gets or Sets the maximum size of the buffer. This is not a hard limit. - - - - - Gets the offset of the start of the buffered data. Reads to offsets before this are likely to require a seek. - - - - - Gets the number of bytes currently buffered. - - - - - Gets the number of bytes the buffer can hold. - - - - - Reads the number of bytes specified into the buffer given, starting with the offset indicated. - - The offset into the stream to start reading. - The buffer to read to. - The index into the buffer to start writing to. - The number of bytes to read. - The number of bytes read. - - - - Tells the buffer that it no longer needs to maintain any bytes before the indicated offset. - - The offset to discard through. - - - - Gets the number of channels in the current selected Vorbis stream - - - - - Gets the sample rate of the current selected Vorbis stream - - - - - Gets the encoder's upper bitrate of the current selected Vorbis stream - - - - - Gets the encoder's nominal bitrate of the current selected Vorbis stream - - - - - Gets the encoder's lower bitrate of the current selected Vorbis stream - - - - - Gets the encoder's vendor string for the current selected Vorbis stream - - - - - Gets the comments in the current selected Vorbis stream - - - - - Gets whether the previous short sample count was due to a parameter change in the stream. - - - - - Gets the number of bits read that are related to framing and transport alone - - - - - Gets or sets whether to automatically apply clipping to samples returned by . - - - - - Gets stats from each decoder stream available - - - - - Gets the currently-selected stream's index - - - - - Reads decoded samples from the current logical stream - - The buffer to write the samples to - The offset into the buffer to write the samples to - The number of samples to write - The number of samples written - - - - Clears the parameter change flag so further samples can be requested. - - - - - Returns the number of logical streams found so far in the physical container - - - - - Searches for the next stream in a concatenated file - - True if a new stream was found, otherwise false. - - - - Switches to an alternate logical stream. - - The logical stream index to switch to - True if the properties of the logical stream differ from those of the one previously being decoded. Otherwise, False. - - - - Gets or Sets the current timestamp of the decoder. Is the timestamp before the next sample to be decoded - - - - - Gets or Sets the current position of the next sample to be decoded. - - - - - Gets the total length of the current logical stream - - - - - Provides an implementation for basic Ogg files. - - - - - Gets the list of stream serials found in the container so far. - - - - - Event raised when a new logical stream is found in the container. - - - - - Creates a new instance with the specified file. - - The full path to the file. - - - - Creates a new instance with the specified stream. Optionally sets to close the stream when disposed. - - The stream to read. - True to close the stream when is called, otherwise False. - - - - Initializes the container and finds the first stream. - - True if a valid logical stream is found, otherwise False. - - - - Disposes this instance. - - - - - Gets the instance for the specified stream serial. - - The stream serial to look for. - An instance. - The specified stream serial was not found. - - - - Finds the next new stream in the container. - - True if a new stream was found, otherwise False. - is False. - - - - Gets the number of pages that have been read in the container. - - - - - Retrieves the total number of pages in the container. - - The total number of pages. - is False. - - - - Gets whether the container supports seeking. - - - - - Gets the number of bits in the container that are not associated with a logical stream. - - -
-
diff --git a/Editor/CLEngine.Editor/Project Templates/NAudio.dll b/Editor/CLEngine.Editor/Project Templates/NAudio.dll deleted file mode 100644 index 022d39af92981dab639c468fbdb00444235bedff..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/NAudio.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/NLua.dll b/Editor/CLEngine.Editor/Project Templates/NLua.dll deleted file mode 100644 index 121a7766135f392b66bd78a5d79e3e55bd3d1da0..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/NLua.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/NvgSharp.dll b/Editor/CLEngine.Editor/Project Templates/NvgSharp.dll deleted file mode 100644 index a3f6affdac426ddc7e958fac025ead8b14c6f7f4..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/NvgSharp.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/PerfStat.dll b/Editor/CLEngine.Editor/Project Templates/PerfStat.dll deleted file mode 100644 index 7a1236511fd57c5f6ce412a4715aad6063a08de3..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/PerfStat.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/Properties/AssemblyInfo.cs b/Editor/CLEngine.Editor/Project Templates/Properties/AssemblyInfo.cs deleted file mode 100644 index cf60dcdbd79a13efcd8dc8c4c04fcdb1a7d52853..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的一般信息由以下 -// 控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("game-win")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("game-win")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 会使此程序集中的类型 -//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 -//请将此类型的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("68617360-1928-4f9b-9023-8470d9d9b221")] - -// 程序集的版本信息由下列四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 -//通过使用 "*",如下所示: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Editor/CLEngine.Editor/Project Templates/Xceed.Wpf.Toolkit.dll b/Editor/CLEngine.Editor/Project Templates/Xceed.Wpf.Toolkit.dll deleted file mode 100644 index 19e725ba92fe4db9507c6ec9af7741b382d227fd..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/Xceed.Wpf.Toolkit.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libSDL2-2.0.0.dylib b/Editor/CLEngine.Editor/Project Templates/libSDL2-2.0.0.dylib deleted file mode 100644 index 221b678127e04b4f0f87e9fd78a09033652990e1..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libSDL2-2.0.0.dylib and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libopenal.1.dylib b/Editor/CLEngine.Editor/Project Templates/libopenal.1.dylib deleted file mode 100644 index 883af9540d541fa5eb441d7d8de62798ac8be201..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libopenal.1.dylib and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/KeraLua.dll b/Editor/CLEngine.Editor/Project Templates/libs/KeraLua.dll deleted file mode 100644 index ddffbe692d3db15516177512ee200d11b775aa37..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/KeraLua.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/Lidgren.Network.dll b/Editor/CLEngine.Editor/Project Templates/libs/Lidgren.Network.dll deleted file mode 100644 index e4bb2239f13d895409b860a019ded148deaac9f2..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/Lidgren.Network.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/MonoGame.Framework.Net.dll b/Editor/CLEngine.Editor/Project Templates/libs/MonoGame.Framework.Net.dll deleted file mode 100644 index 7abd4609ba35f009b6715685619c366870deaee3..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/MonoGame.Framework.Net.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/MonoGame.Framework.dll b/Editor/CLEngine.Editor/Project Templates/libs/MonoGame.Framework.dll deleted file mode 100644 index 202111553c967695ed2b689cd0c4c0767415a74e..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/MonoGame.Framework.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/MonoGame.Framework.dll.config b/Editor/CLEngine.Editor/Project Templates/libs/MonoGame.Framework.dll.config deleted file mode 100644 index 09710ae4612160fda053f7e7146e98962d947c4a..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/libs/MonoGame.Framework.dll.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/Editor/CLEngine.Editor/Project Templates/libs/NAudio.dll b/Editor/CLEngine.Editor/Project Templates/libs/NAudio.dll deleted file mode 100644 index 022d39af92981dab639c468fbdb00444235bedff..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/NAudio.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/NLua.dll b/Editor/CLEngine.Editor/Project Templates/libs/NLua.dll deleted file mode 100644 index 121a7766135f392b66bd78a5d79e3e55bd3d1da0..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/NLua.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/NvgSharp.dll b/Editor/CLEngine.Editor/Project Templates/libs/NvgSharp.dll deleted file mode 100644 index a3f6affdac426ddc7e958fac025ead8b14c6f7f4..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/NvgSharp.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/PerfStat.dll b/Editor/CLEngine.Editor/Project Templates/libs/PerfStat.dll deleted file mode 100644 index 7a1236511fd57c5f6ce412a4715aad6063a08de3..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/PerfStat.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/libSDL2-2.0.0.dylib b/Editor/CLEngine.Editor/Project Templates/libs/libSDL2-2.0.0.dylib deleted file mode 100644 index 221b678127e04b4f0f87e9fd78a09033652990e1..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/libSDL2-2.0.0.dylib and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/libopenal.1.dylib b/Editor/CLEngine.Editor/Project Templates/libs/libopenal.1.dylib deleted file mode 100644 index 883af9540d541fa5eb441d7d8de62798ac8be201..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/libopenal.1.dylib and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/libsteam_api.dylib b/Editor/CLEngine.Editor/Project Templates/libs/libsteam_api.dylib deleted file mode 100644 index ce8dc57ac0de503f9a92968e9e30aaa6a8e1fd96..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/libsteam_api.dylib and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/libsteam_api.so b/Editor/CLEngine.Editor/Project Templates/libs/libsteam_api.so deleted file mode 100644 index eb230a9efae3000ac65895bd802f375281ad11a9..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/libsteam_api.so and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/lua53.dll b/Editor/CLEngine.Editor/Project Templates/libs/lua53.dll deleted file mode 100644 index 74d05e47f3c0c741293ae06cbfe6b87ed545564e..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/lua53.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/libs/steam_api64.dll b/Editor/CLEngine.Editor/Project Templates/libs/steam_api64.dll deleted file mode 100644 index 328dade795fa631d5aaa3ebb8dfa33febe417c16..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/libs/steam_api64.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/lua53.dll b/Editor/CLEngine.Editor/Project Templates/lua53.dll deleted file mode 100644 index 74d05e47f3c0c741293ae06cbfe6b87ed545564e..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Project Templates/lua53.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/Project Templates/samples/DefaultComponent.cs b/Editor/CLEngine.Editor/Project Templates/samples/DefaultComponent.cs deleted file mode 100644 index 93e5de128fd4ffcedb80187c6b91d1d1c9bcabab..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/samples/DefaultComponent.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using CLEngine.Core; -using FairyGUI; -using Microsoft.Xna.Framework; - -namespace Scripts -{ - public class NAME : ObjectComponent - { - /// - /// 初始化此实例 - /// - public override void Initialize() - { - base.Initialize(); - - // TODO:初始化您的组件成员 - - } - - /// - /// 组件更新 - /// - /// Game time. - public override void Update(Microsoft.Xna.Framework.GameTime gameTime) - { - base.Update(gameTime); - - // TODO:更新组件逻辑 - - } - - /// - /// 组件绘制 - /// - /// Game time. - /// Sprite batch. - public override void Draw(Microsoft.Xna.Framework.GameTime gameTime, Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch) - { - base.Draw(gameTime, spriteBatch); - - // TODO: 绘制组件成员 - - } - } -} diff --git a/Editor/CLEngine.Editor/Project Templates/samples/DefaultComponent.lua b/Editor/CLEngine.Editor/Project Templates/samples/DefaultComponent.lua deleted file mode 100644 index 1f3f852bfb62766ba4f510c4afa4cba35e1990f5..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/samples/DefaultComponent.lua +++ /dev/null @@ -1,43 +0,0 @@ -local NAME = {} - --- 初始化此实例 -function NAME:Initialize() -- 0: gameObject[自身] - -- gameObject: NAME.InitializeArgs[0] -end - --- 组件更新 -function NAME:Update() -- 0:gameTime - -- gameTime: NAME.UpdateArgs[0] -end - --- 组件绘制 -function NAME:Draw() -- 0: gameTime 1: spriteBatch - -- gameTime: NAME.DrawArgs[0] - -- spriteBatch: NAME.DrawArgs[1] -end - --- 引发碰撞输入事件。 --- 当另一个对象与此游戏对象碰撞模型边界碰撞时抛出此事件。 -function NAME:OnCollisionEnter() -- 0: other - -- other: NAME.OnCollisionEnterArgs[0] -end - --- 引发鼠标单击事件。 --- 当在此游戏对象碰撞模型边界内点击鼠标时抛出此事件。 -function NAME:OnMouseClick() -- 0: buttonPressed - -- buttonPressed: NAME.OnMouseClickArgs[0] -end - --- 引发鼠标单击事件。 --- 当此游戏对象碰撞模型边界内有鼠标按下时,抛出此事件 -function NAME:OnMouseDown() -- 0: NAME.args[0] - -- buttonPressed: NAME.OnMouseDownArgs[0] -end - --- 引发鼠标单击事件。 --- 当鼠标移动到此游戏对象碰撞模型边界内时,抛出此事件 -function NAME:OnMouseMove() - -end - -return NAME \ No newline at end of file diff --git a/Editor/CLEngine.Editor/Project Templates/samples/SampleController.cs b/Editor/CLEngine.Editor/Project Templates/samples/SampleController.cs deleted file mode 100644 index ea3fb7f79fd86d13103d8fd8b797c21b333edab2..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/samples/SampleController.cs +++ /dev/null @@ -1,140 +0,0 @@ -using System; -using CLEngine.Core; - -namespace Samples -{ - /// - /// 控制器例子. - /// - /// 注意: - /// 如果要在编辑器中更新/绘制控制器 - /// 则继承ExtendedObjectComponent. - /// - class SampleController : ObjectComponent - { - #region fields - - private string anotherDummyValue = "Dummy Value"; - - #endregion - - #region properties - - /// - /// 获取或设置虚拟值。 - /// 可以在编辑器中编辑该值。 - /// - /// The dummy value. - public int DummyValue { get; set; } - - /// - /// 获取或设置另一个虚拟值。 - /// 可以在编辑器中编辑该值 - /// - /// Another dummy value. - public string AnotherDummyValue - { - get - { - return anotherDummyValue; - } - set - { - anotherDummyValue = value; - } - } - - #endregion - - #region methods - - /// - /// 初始化此实例 - /// - public override void Initialize() - { - base.Initialize(); - - // TODO:初始化您的组件成员 - - } - - /// - /// 组件更新 - /// - /// Game time. - public override void Update(Microsoft.Xna.Framework.GameTime gameTime) - { - base.Update(gameTime); - - // TODO:更新组件逻辑 - - } - - /// - /// 组件绘制 - /// - /// Game time. - /// Sprite batch. - public override void Draw(Microsoft.Xna.Framework.GameTime gameTime, Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch) - { - base.Draw(gameTime, spriteBatch); - - // TODO: 绘制组件成员 - - } - - /// - /// 引发碰撞输入事件。 - /// 当另一个对象与此游戏对象碰撞模型边界碰撞时抛出此事件。 - /// - /// The other object - public override void OnCollisionEnter(GameObject other) - { - base.OnCollisionEnter(other); - - // TODO: 处理你的物体碰撞 - - } - - /// - /// 引发鼠标单击事件。 - /// 当在此游戏对象碰撞模型边界内点击鼠标时抛出此事件。 - /// - /// Button pressed. - public override void OnMouseClick(MouseEventButton buttonPressed) - { - base.OnMouseClick(buttonPressed); - - // TODO: 处理鼠标点击 - - } - - /// - /// 引发鼠标单击事件。 - /// 当此游戏对象碰撞模型边界内有鼠标按下时,抛出此事件。 - /// - /// Button pressed. - public override void OnMouseDown(MouseEventButton buttonPressed) - { - base.OnMouseDown(buttonPressed); - - // TODO: 处理鼠标 - - } - - /// - /// 引发鼠标单击事件。 - /// 当鼠标移动到此游戏对象碰撞模型边界内时,抛出此事件 - /// - public override void OnMouseMove() - { - base.OnMouseMove(); - - // TODO: 处理鼠标移动 - - } - - #endregion - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/Project Templates/settings.ini b/Editor/CLEngine.Editor/Project Templates/settings.ini deleted file mode 100644 index 84e40a06c238a25b221490f96589ef5e8fab0669..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Project Templates/settings.ini +++ /dev/null @@ -1,39 +0,0 @@ -; CLEngine 2D - Ϸ -; Ϸļ -; 汾 [1.0.0], ʽ [1.0.0] - -[Window] - -; ڿ (Ĭ: 800) -Width = 800 - -; ڸ߶ (Ĭ: 600) -Height = 600 - -; ȷϷǷȫģʽ (Ĭ: false) -StartFullScreen = false - -; ȷǷޱ߿ (Ĭ: false) -IsBorderLess = false - -; ȷʼλ (Ĭ: disabled) -; PositionX = 0 -; PositionY = 0 - -[Console] - -; ȷ̨Ƿɼ (Ĭ: true) -Visible = true - -; ȷ̨Ƿ falseı (Ĭ: true) -WriteToConsole = true - -[Mouse] - -; ȷǷɼ (Ĭ: false) -Visible = false - -[Profile] - -; ȷǷʾ̨ (Ĭ: true) -Visible = true diff --git a/Editor/CLEngine.Editor/Properties/AssemblyInfo.cs b/Editor/CLEngine.Editor/Properties/AssemblyInfo.cs deleted file mode 100644 index 924092a4297d4206e9832c3463ed6fce291a160c..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// 有关程序集的一般信息由以下 -// 控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("CLEngine.Editor")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CLEngine.Editor")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 会使此程序集中的类型 -//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 -//请将此类型的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -//若要开始生成可本地化的应用程序,请设置 -//.csproj 文件中的 CultureYouAreCodingWith -//例如,如果您在源文件中使用的是美国英语, -//使用的是美国英语,请将 设置为 en-US。 然后取消 -//对以下 NeutralResourceLanguage 特性的注释。 更新 -//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 - -//[assembly: NeutralResourcesLanguage("zh-CN", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //主题特定资源词典所处位置 - //(未在页面中找到资源时使用, - //或应用程序资源字典中找到时使用) - ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 - //(未在页面中找到资源时使用, - //、应用程序或任何主题专用资源字典中找到时使用) -)] - - -// 程序集的版本信息由下列四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 -//通过使用 "*",如下所示: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.6")] -[assembly: AssemblyFileVersion("4.0.6")] diff --git a/Editor/CLEngine.Editor/Properties/Resources.Designer.cs b/Editor/CLEngine.Editor/Properties/Resources.Designer.cs deleted file mode 100644 index 77f593bfcbcc980bc41acaec91a440949fba94ae..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码由工具生成。 -// 运行时版本: 4.0.30319.42000 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace CLEngine.Editor.Properties -{ - - - /// - /// 强类型资源类,用于查找本地化字符串等。 - /// - // 此类是由 StronglyTypedResourceBuilder - // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 - // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen - // (以 /str 作为命令选项),或重新生成 VS 项目。 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// 返回此类使用的缓存 ResourceManager 实例。 - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CLEngine.Editor.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// 覆盖当前线程的 CurrentUICulture 属性 - /// 使用此强类型的资源类的资源查找。 - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} diff --git a/Editor/CLEngine.Editor/Properties/Resources.resx b/Editor/CLEngine.Editor/Properties/Resources.resx deleted file mode 100644 index af7dbebbacef595e3089c01c05671016c21a8304..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/Properties/Settings.Designer.cs b/Editor/CLEngine.Editor/Properties/Settings.Designer.cs deleted file mode 100644 index bfa16b677e43413232ebe61b7f8d2b87d75a579c..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Properties/Settings.Designer.cs +++ /dev/null @@ -1,206 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 此代码由工具生成。 -// 运行时版本:4.0.30319.42000 -// -// 对此文件的更改可能会导致不正确的行为,并且如果 -// 重新生成代码,这些更改将会丢失。 -// -//------------------------------------------------------------------------------ - -namespace CLEngine.Editor.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Default")] - public string Layout { - get { - return ((string)(this["Layout"])); - } - set { - this["Layout"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool StartOnFullScreen { - get { - return ((bool)(this["StartOnFullScreen"])); - } - set { - this["StartOnFullScreen"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ShowDebugView { - get { - return ((bool)(this["ShowDebugView"])); - } - set { - this["ShowDebugView"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("animatedsprite")] - public string secundaryExtension { - get { - return ((string)(this["secundaryExtension"])); - } - set { - this["secundaryExtension"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Lime")] - public string DefaultScriptEditor { - get { - return ((string)(this["DefaultScriptEditor"])); - } - set { - this["DefaultScriptEditor"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string LastLoadedProjects { - get { - return ((string)(this["LastLoadedProjects"])); - } - set { - this["LastLoadedProjects"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string LastDeploymentFolder { - get { - return ((string)(this["LastDeploymentFolder"])); - } - set { - this["LastDeploymentFolder"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool LoadLastProject { - get { - return ((bool)(this["LoadLastProject"])); - } - set { - this["LoadLastProject"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool ReduceConsumption { - get { - return ((bool)(this["ReduceConsumption"])); - } - set { - this["ReduceConsumption"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool HighlightActiveTileset { - get { - return ((bool)(this["HighlightActiveTileset"])); - } - set { - this["HighlightActiveTileset"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool AttachVisualStudio { - get { - return ((bool)(this["AttachVisualStudio"])); - } - set { - this["AttachVisualStudio"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute(".jpg|.png|.jpeg|.gif|.bmp|.txt|.scene|.sln|.ini|.cs|.state|.mp3|.wav|.fnt|.lua")] - public string AcceptedExtensions { - get { - return ((string)(this["AcceptedExtensions"])); - } - set { - this["AcceptedExtensions"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string UserEmail { - get { - return ((string)(this["UserEmail"])); - } - set { - this["UserEmail"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string UserAccount { - get { - return ((string)(this["UserAccount"])); - } - set { - this["UserAccount"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string UserPassword { - get { - return ((string)(this["UserPassword"])); - } - set { - this["UserPassword"] = value; - } - } - } -} diff --git a/Editor/CLEngine.Editor/Properties/Settings.settings b/Editor/CLEngine.Editor/Properties/Settings.settings deleted file mode 100644 index 2380747747ebf4869ca1dcda2ba4e250087fcec2..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/Properties/Settings.settings +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - Default - - - False - - - False - - - animatedsprite - - - Lime - - - - - - - - - True - - - True - - - True - - - True - - - .jpg|.png|.jpeg|.gif|.bmp|.txt|.scene|.sln|.ini|.cs|.state|.mp3|.wav|.fnt|.lua - - - - - - - - - - - - \ No newline at end of file diff --git "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/1_clengine.png" "b/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/1_clengine.png" deleted file mode 100644 index 70ed525dba9957912d8149ae1d2de0057bd35b2e..0000000000000000000000000000000000000000 Binary files "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/1_clengine.png" and /dev/null differ diff --git "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/main.png" "b/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/main.png" deleted file mode 100644 index 9823355deb51fad3e9d1e06695186e2dc703fbfd..0000000000000000000000000000000000000000 Binary files "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/main.png" and /dev/null differ diff --git "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/main_scene.png" "b/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/main_scene.png" deleted file mode 100644 index 124e224742dae8d2f18162ebbf5e85f1171671cb..0000000000000000000000000000000000000000 Binary files "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/main_scene.png" and /dev/null differ diff --git "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/output.png" "b/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/output.png" deleted file mode 100644 index 3b21fdc7afbc091e1283bf910ad3b057fd9a41f1..0000000000000000000000000000000000000000 Binary files "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/output.png" and /dev/null differ diff --git "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/project.png" "b/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/project.png" deleted file mode 100644 index 1f1db80b5605e76e3a8bac938704024a820cd399..0000000000000000000000000000000000000000 Binary files "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/project.png" and /dev/null differ diff --git "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/properties.png" "b/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/properties.png" deleted file mode 100644 index ee4ac6ca715a2cdb57778dd0b7bbafc76584384e..0000000000000000000000000000000000000000 Binary files "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/properties.png" and /dev/null differ diff --git "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/scene.png" "b/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/scene.png" deleted file mode 100644 index a8419d6d19d73edf5b3038c27a40870256756c4e..0000000000000000000000000000000000000000 Binary files "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/Pictures/scene.png" and /dev/null differ diff --git "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/UserInterface.xml" "b/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/UserInterface.xml" deleted file mode 100644 index 4487c194b8f727f5ba0455cb976b41aafdb7db6c..0000000000000000000000000000000000000000 --- "a/Editor/CLEngine.Editor/Tutorials/01 - \347\225\214\351\235\242\344\273\213\347\273\215/UserInterface.xml" +++ /dev/null @@ -1,36 +0,0 @@ - - - - 图形界面 - CLEngine - 这是一个非常基础的介绍. - 简单 - main.png - - - - main.png - 第一次创建的主界面. - - - main_scene.png - 显示我们的编辑器场景, 他一般与游戏内场景相同,并且能为你显示一些额外信息,您可以通过该视图去移动、旋转、缩放对象. - - - project.png - 负责所有游戏资源管理,他存放游戏内的资源及游戏的一些设置还有一些编辑器工程,是一个非常重要的管理地点. - - - properties.png - 属性窗口,你可以通过点击场景里的对象来让这里显示该对象的属性. - - - scene.png - 显示场景内所有的节点, 通过点击这里的节点能够快速选中对象,并且移动他们的层次可以调整渲染次序. - - - output.png - 负责日志记录. - - - \ No newline at end of file diff --git "a/Editor/CLEngine.Editor/Tutorials/\346\225\231\347\250\213\345\210\266\344\275\234\347\225\214\351\235\242.txt" "b/Editor/CLEngine.Editor/Tutorials/\346\225\231\347\250\213\345\210\266\344\275\234\347\225\214\351\235\242.txt" deleted file mode 100644 index 2a188474306586904ed3b2f33b32e67fa32e58ce..0000000000000000000000000000000000000000 --- "a/Editor/CLEngine.Editor/Tutorials/\346\225\231\347\250\213\345\210\266\344\275\234\347\225\214\351\235\242.txt" +++ /dev/null @@ -1,4 +0,0 @@ -1. Tutorials´һļ : 01 - -2. ½ļ·һ.xmlļ (test.xml) ƿԶ -3. ½ļ½һµļ -> Pictures ƲܸģڷʾԴ -4. ʾļеxmlбд̳ \ No newline at end of file diff --git a/Editor/CLEngine.Editor/Xceed.Wpf.AvalonDock.Themes.IgniteDark.dll b/Editor/CLEngine.Editor/Xceed.Wpf.AvalonDock.Themes.IgniteDark.dll deleted file mode 100644 index 1a3b91914b957f37112556746a444a0d7e2ef3df..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/Xceed.Wpf.AvalonDock.Themes.IgniteDark.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/bmfont/bmfont.exe b/Editor/CLEngine.Editor/bmfont/bmfont.exe deleted file mode 100644 index 725a6e4cdee1f87279e168b766de0630bbee1460..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/bmfont/bmfont.exe and /dev/null differ diff --git a/Editor/CLEngine.Editor/bmfont/bmsettings.bmfc b/Editor/CLEngine.Editor/bmfont/bmsettings.bmfc deleted file mode 100644 index 3591b3ee430cd797717c3660ee081a9254175bf8..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/bmfont/bmsettings.bmfc +++ /dev/null @@ -1,55 +0,0 @@ -# AngelCode Bitmap Font Generator configuration file -fileVersion=1 - -# font settings -fontName=Arial -fontFile= -charSet=0 -fontSize=32 -aa=2 -scaleH=100 -useSmoothing=1 -isBold=0 -isItalic=0 -useUnicode=1 -disableBoxChars=1 -outputInvalidCharGlyph=0 -dontIncludeKerningPairs=0 -useHinting=1 -renderFromOutline=0 -useClearType=1 - -# character alignment -paddingDown=0 -paddingUp=0 -paddingRight=0 -paddingLeft=0 -spacingHoriz=1 -spacingVert=1 -useFixedHeight=0 -forceZero=0 - -# output file -outWidth=512 -outHeight=512 -outBitDepth=32 -fontDescFormat=1 -fourChnlPacked=0 -textureFormat=png -textureCompression=0 -alphaChnl=1 -redChnl=0 -greenChnl=0 -blueChnl=0 -invA=0 -invR=0 -invG=0 -invB=0 - -# outline -outlineThickness=1 - -# selected chars -chars=32-126,160-255 - -# imported icon images diff --git a/Editor/CLEngine.Editor/clengine.ico b/Editor/CLEngine.Editor/clengine.ico deleted file mode 100644 index 33febb394eada207cab29beef629d69367007d01..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/clengine.ico and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/Categorize16.png b/Editor/CLEngine.Editor/content/Categorize16.png deleted file mode 100644 index 51510df8fb30e788d7cfbcb2d04317818adddc5f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/Categorize16.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/ClearFilter16.png b/Editor/CLEngine.Editor/content/ClearFilter16.png deleted file mode 100644 index aeaeab8d9d98473adfa3771be5bd84c6a6ca8411..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/ClearFilter16.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/SortAscending16.png b/Editor/CLEngine.Editor/content/SortAscending16.png deleted file mode 100644 index b3138ba3f78a9489e6cd0ccb18b7e58c056cee95..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/SortAscending16.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_arrow_down.png b/Editor/CLEngine.Editor/content/_arrow_down.png deleted file mode 100644 index fb05d83a22e92c7911042287be2a307c8eeb207f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_arrow_down.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_arrow_right.png b/Editor/CLEngine.Editor/content/_arrow_right.png deleted file mode 100644 index 9997e46dd4756b029261c1a933ef79aa9536598a..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_arrow_right.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_btn_toggle_off.png b/Editor/CLEngine.Editor/content/_btn_toggle_off.png deleted file mode 100644 index 3a6d6badacf993c781aa7af46950dde90abf9e1b..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_btn_toggle_off.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_btn_toggle_on.png b/Editor/CLEngine.Editor/content/_btn_toggle_on.png deleted file mode 100644 index 3bdba63663d2ced3d8a4b6cf2936f270bed87317..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_btn_toggle_on.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_camera.png b/Editor/CLEngine.Editor/content/_camera.png deleted file mode 100644 index 9602ad78de01b9828bb1e605d71cef1eef1e7bf8..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_camera.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_camera_object.png b/Editor/CLEngine.Editor/content/_camera_object.png deleted file mode 100644 index a081d7eb1efa95ee5505d8bbbc06e322dd871d11..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_camera_object.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_camera_object_16.png b/Editor/CLEngine.Editor/content/_camera_object_16.png deleted file mode 100644 index 3e291a15b5c25086684a24551a51ec9c9341b384..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_camera_object_16.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_clengine_icon_black.png b/Editor/CLEngine.Editor/content/_clengine_icon_black.png deleted file mode 100644 index b3ccfc62063f0c04580c4b1d300cfeecc1f16021..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_clengine_icon_black.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_collision.png b/Editor/CLEngine.Editor/content/_collision.png deleted file mode 100644 index 063795012d947e01051d2019c793cb3612af4a2f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_collision.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_component.png b/Editor/CLEngine.Editor/content/_component.png deleted file mode 100644 index 3e2e8d0beb0d419b296ab88501b499a1daeec31f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_component.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_component_item.png b/Editor/CLEngine.Editor/content/_component_item.png deleted file mode 100644 index 6a02e7b9cbc4bd0ae3e65fddb5519433cc18dd41..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_component_item.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_copy.png b/Editor/CLEngine.Editor/content/_copy.png deleted file mode 100644 index de957d3f147210f373615bedba48a7fe8cb0154b..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_copy.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_cs_file.png b/Editor/CLEngine.Editor/content/_cs_file.png deleted file mode 100644 index 924ad7beab2771555fa0dcdfb2e03106bf19b725..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_cs_file.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_cut.png b/Editor/CLEngine.Editor/content/_cut.png deleted file mode 100644 index 2b40e561cd9625865d2695a364ac75d848000d6a..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_cut.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_debug_view.png b/Editor/CLEngine.Editor/content/_debug_view.png deleted file mode 100644 index 6afee8b9c2ac4e2271d5dba57b6c0009bfd9cd95..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_debug_view.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_file.png b/Editor/CLEngine.Editor/content/_file.png deleted file mode 100644 index db9d3815330874dbb01f2539363b2eff1f43a6d5..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_file.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_folder.png b/Editor/CLEngine.Editor/content/_folder.png deleted file mode 100644 index 056b24bf77d7f5a532c07e4d10cf373d329c4f62..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_folder.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_folder_add.png b/Editor/CLEngine.Editor/content/_folder_add.png deleted file mode 100644 index 43c583710bea728a84848c492cc9c9e4ad81c12d..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_folder_add.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_game_event.png b/Editor/CLEngine.Editor/content/_game_event.png deleted file mode 100644 index c410304b0303f9a7fa7591296e3cd7374ebec81c..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_game_event.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_game_object_audio.png b/Editor/CLEngine.Editor/content/_game_object_audio.png deleted file mode 100644 index b78fb38047ac3ff7cdcc3c04a945070c0254a920..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_game_object_audio.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_game_object_empty.png b/Editor/CLEngine.Editor/content/_game_object_empty.png deleted file mode 100644 index 34800085290d5a311e2dce253cddf1090e253666..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_game_object_empty.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_game_object_particle.png b/Editor/CLEngine.Editor/content/_game_object_particle.png deleted file mode 100644 index 3bd5f51727343146da8379bbbdf1f83cf6de86e5..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_game_object_particle.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_game_object_sprite.png b/Editor/CLEngine.Editor/content/_game_object_sprite.png deleted file mode 100644 index 92868ae9457b7ca5777be75521d1f687cd015fde..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_game_object_sprite.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_game_object_text.png b/Editor/CLEngine.Editor/content/_game_object_text.png deleted file mode 100644 index d29d030d0ac19e15a18b9f8737fb2f8a36397b2f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_game_object_text.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_game_object_tileset.png b/Editor/CLEngine.Editor/content/_game_object_tileset.png deleted file mode 100644 index 877414eed32fea4b46aaae13b8e386a180b433ff..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_game_object_tileset.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_game_video.png b/Editor/CLEngine.Editor/content/_game_video.png deleted file mode 100644 index 401a09417351084951dc96f5c8943e70ae8244fc..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_game_video.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_grid.png b/Editor/CLEngine.Editor/content/_grid.png deleted file mode 100644 index 1ad8b5fcd0d4232103a462c808f2e9fa8826f11f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_grid.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_grid_collisions.png b/Editor/CLEngine.Editor/content/_grid_collisions.png deleted file mode 100644 index eb573734635a4f1448f082ea4a6ea98de68e22d6..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_grid_collisions.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_grid_snap.png b/Editor/CLEngine.Editor/content/_grid_snap.png deleted file mode 100644 index 085846843aca8f7ee8e7e0a48831b90b13bf45f0..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_grid_snap.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_image.png b/Editor/CLEngine.Editor/content/_image.png deleted file mode 100644 index aafba9d870dbf8e5c8dfe95129a11ef295e401c3..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_image.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_layer.png b/Editor/CLEngine.Editor/content/_layer.png deleted file mode 100644 index 32ee18b197ec91b414eaa61af4b9e0803c839adc..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_layer.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_logo_a.png b/Editor/CLEngine.Editor/content/_logo_a.png deleted file mode 100644 index ebfff744d956f303753577dffa35ec87a340902a..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_logo_a.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_lua_file.png b/Editor/CLEngine.Editor/content/_lua_file.png deleted file mode 100644 index 705f1fb5062724827e0ec47eb572de47154ce633..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_lua_file.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_map_object.png b/Editor/CLEngine.Editor/content/_map_object.png deleted file mode 100644 index 250fb18aa618f7e0f9bf9ff3ff83f87ba3ee9977..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_map_object.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_maximize_btn.png b/Editor/CLEngine.Editor/content/_maximize_btn.png deleted file mode 100644 index a0cd46255e89ff2e0bbbfc4e0e709b1e1776cd80..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_maximize_btn.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_minimize.png b/Editor/CLEngine.Editor/content/_minimize.png deleted file mode 100644 index 9832c3f38c64c16bbc1e048cd5c9a588812b8d76..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_minimize.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_move_down.png b/Editor/CLEngine.Editor/content/_move_down.png deleted file mode 100644 index 6b892950705ddf7242b141aba7e4ee5231fb74c0..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_move_down.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_move_up.png b/Editor/CLEngine.Editor/content/_move_up.png deleted file mode 100644 index 2aae802e66d4210e613c22cf96e2b845cf1fc3c3..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_move_up.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_opacity.png b/Editor/CLEngine.Editor/content/_opacity.png deleted file mode 100644 index 43bc06089e3b932faa9059b2cdb90801fbde7e90..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_opacity.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_paste.png b/Editor/CLEngine.Editor/content/_paste.png deleted file mode 100644 index 664000681c480f293ac55d750fa4d7d84f426c9f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_paste.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_pencil.png b/Editor/CLEngine.Editor/content/_pencil.png deleted file mode 100644 index 00857e5eebe2331f36da27610350c26438edb141..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_pencil.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_plus.png b/Editor/CLEngine.Editor/content/_plus.png deleted file mode 100644 index defcfb98390e6a9ed35892185f62ebd14ec1feed..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_plus.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_refresh.png b/Editor/CLEngine.Editor/content/_refresh.png deleted file mode 100644 index c53b982123ffd3932c8786cd0ab3bf23e6c43f1d..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_refresh.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_rename.png b/Editor/CLEngine.Editor/content/_rename.png deleted file mode 100644 index cc2f51a973be9a2b2a18cd25ff9955b30a85c17f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_rename.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_save.png b/Editor/CLEngine.Editor/content/_save.png deleted file mode 100644 index 0cfbecb1975692cc8b97ca8a3b57e81280a3629a..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_save.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_scene_file.png b/Editor/CLEngine.Editor/content/_scene_file.png deleted file mode 100644 index f676e2d28d963d2804441fa6ac29f3e07ecb3c59..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_scene_file.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_settings.png b/Editor/CLEngine.Editor/content/_settings.png deleted file mode 100644 index 9e3fea0bf4cb2e7357ba9e1c6f8d2411af803ed4..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_settings.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_sln.png b/Editor/CLEngine.Editor/content/_sln.png deleted file mode 100644 index 77c5e1ae4a2e54c80cf304fb0f43717712595dd0..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_sln.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_text_file.png b/Editor/CLEngine.Editor/content/_text_file.png deleted file mode 100644 index e2bb4adca764be42b9e084647a57217f3a816ad6..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_text_file.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_trash.png b/Editor/CLEngine.Editor/content/_trash.png deleted file mode 100644 index 1859213bb7f94a7b57d2dcc788e2a76c692c902d..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_trash.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_ui_object.png b/Editor/CLEngine.Editor/content/_ui_object.png deleted file mode 100644 index ab12168f443888ce6db3b6a404d221c73a15c27a..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_ui_object.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/_x.png b/Editor/CLEngine.Editor/content/_x.png deleted file mode 100644 index 264285dd564006d79c7fd3a3c0a61e4a34b879a4..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/_x.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/add_column.png b/Editor/CLEngine.Editor/content/add_column.png deleted file mode 100644 index b9a98c2321af9d65a78137b6611b6cb2ef13536f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/add_column.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/add_row.png b/Editor/CLEngine.Editor/content/add_row.png deleted file mode 100644 index a73ca45e740a516439097d659218e1a6e9166fb5..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/add_row.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/android.png b/Editor/CLEngine.Editor/content/android.png deleted file mode 100644 index 868e5d71c16f8fd4b565170c4bf93fc4f66388db..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/android.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/audio.png b/Editor/CLEngine.Editor/content/audio.png deleted file mode 100644 index 48102457c336c9f63e38bedf140a1dd7a92dfdbe..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/audio.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/bgvs.png b/Editor/CLEngine.Editor/content/bgvs.png deleted file mode 100644 index 410982e1c10408d98b82bbee09563b84aa09ff54..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/bgvs.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/clengine.ico b/Editor/CLEngine.Editor/content/clengine.ico deleted file mode 100644 index 33febb394eada207cab29beef629d69367007d01..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/clengine.ico and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/debugfont.xnb b/Editor/CLEngine.Editor/content/debugfont.xnb deleted file mode 100644 index 31fb4e02d2e0e90a9bb6118d3229410ed3474af1..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/debugfont.xnb and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/editorBMFont.fnt b/Editor/CLEngine.Editor/content/editorBMFont.fnt deleted file mode 100644 index 3f318fdf840b66751a2f359a746935ff1c165681..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/content/editorBMFont.fnt +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Editor/CLEngine.Editor/content/editorBMFont_0.png b/Editor/CLEngine.Editor/content/editorBMFont_0.png deleted file mode 100644 index f8060a627700d512d2d9bb465931ef3b2dcb3c6f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/editorBMFont_0.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/event.png b/Editor/CLEngine.Editor/content/event.png deleted file mode 100644 index b1f0cc0ba9a2415510fbffeb54ca26c9c8925901..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/event.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/eye_close.png b/Editor/CLEngine.Editor/content/eye_close.png deleted file mode 100644 index 16c413d9e93926cc303c2a8ab50848082f2fade6..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/eye_close.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/eye_open.png b/Editor/CLEngine.Editor/content/eye_open.png deleted file mode 100644 index f31288c39d03e0b1534b095310c414c0f75251ef..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/eye_open.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/font.xnb b/Editor/CLEngine.Editor/content/font.xnb deleted file mode 100644 index 898ef244d6f21f59f0e640b4c08433c435767567..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/font.xnb and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/grid_icon.png b/Editor/CLEngine.Editor/content/grid_icon.png deleted file mode 100644 index ce38ea6537d4783de22bd00c1018efd1070be392..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/grid_icon.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/grid_remove_icon.png b/Editor/CLEngine.Editor/content/grid_remove_icon.png deleted file mode 100644 index 6a37ffafc10026607f62625075c5fe9881903422..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/grid_remove_icon.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/grid_shift_down.png b/Editor/CLEngine.Editor/content/grid_shift_down.png deleted file mode 100644 index 0e2b9b6051d69e8645f38559cab122459f83b88e..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/grid_shift_down.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/grid_shift_left.png b/Editor/CLEngine.Editor/content/grid_shift_left.png deleted file mode 100644 index 1b64d6325ce222536d9e1e492ee70a01759a224f..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/grid_shift_left.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/grid_shift_right.png b/Editor/CLEngine.Editor/content/grid_shift_right.png deleted file mode 100644 index 1e6844d24e174de5257022fc9411b7efe9ab5256..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/grid_shift_right.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/grid_shift_up.png b/Editor/CLEngine.Editor/content/grid_shift_up.png deleted file mode 100644 index dde4bb8169df612c75bd7c07c3cfdebd5341ed2a..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/grid_shift_up.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/ios.png b/Editor/CLEngine.Editor/content/ios.png deleted file mode 100644 index 62e9dd565aaaefdab3401380a92a04419cfe29d1..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/ios.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/linux.png b/Editor/CLEngine.Editor/content/linux.png deleted file mode 100644 index 809e2dfdc9745a4a5b12ffe31ba644c48941bd04..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/linux.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/logo_moder3n.png b/Editor/CLEngine.Editor/content/logo_moder3n.png deleted file mode 100644 index b3ccfc62063f0c04580c4b1d300cfeecc1f16021..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/logo_moder3n.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/logo_modern.png b/Editor/CLEngine.Editor/content/logo_modern.png deleted file mode 100644 index b3ccfc62063f0c04580c4b1d300cfeecc1f16021..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/logo_modern.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/macos.png b/Editor/CLEngine.Editor/content/macos.png deleted file mode 100644 index 2398d6705df2a9973ff2b369f8410495d458580c..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/macos.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/remove_column.png b/Editor/CLEngine.Editor/content/remove_column.png deleted file mode 100644 index 24c4c49cbe2db467593685eebc7ee5f8564d6601..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/remove_column.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/remove_row.png b/Editor/CLEngine.Editor/content/remove_row.png deleted file mode 100644 index b9e591dc3f3ef4813a50595d4fd8966edec3e586..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/remove_row.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/screenshot.png b/Editor/CLEngine.Editor/content/screenshot.png deleted file mode 100644 index abcbe25183f08158dcb3e2870030e031f81ab25b..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/screenshot.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/windows.png b/Editor/CLEngine.Editor/content/windows.png deleted file mode 100644 index 40ee3c7131a8083979baa467975a046b188ae266..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/windows.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/windows_phone.png b/Editor/CLEngine.Editor/content/windows_phone.png deleted file mode 100644 index 3f2912417c83816af37430b3d84a9e19278ce167..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/windows_phone.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/content/windows_store.png b/Editor/CLEngine.Editor/content/windows_store.png deleted file mode 100644 index abebd54376e39800bca8e28636dfb377d89f8219..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/content/windows_store.png and /dev/null differ diff --git a/Editor/CLEngine.Editor/controls/CMenuItem.cs b/Editor/CLEngine.Editor/controls/CMenuItem.cs deleted file mode 100644 index 17241309e2ac746cca75ac4bfb50a9d9e07ea93c..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/CMenuItem.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Windows.Controls; - -namespace CLEngine.Editor.controls -{ - public class CMenuItem : MenuItem - { - internal string TagText = string.Empty; - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/controls/DragDropTreeView.cs b/Editor/CLEngine.Editor/controls/DragDropTreeView.cs deleted file mode 100644 index 0f92cc64bee7fd1000f5757bfb6e1dbbb73415ec..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/DragDropTreeView.cs +++ /dev/null @@ -1,200 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; -using CLEngine.Editor.core; - -namespace CLEngine.Editor.controls -{ - class DragDropTreeView : TreeView - { - public delegate void DragNotificationHandler(DragDropTreeViewItem source, DragDropTreeViewItem target, CancelEventArgs e); - public event DragNotificationHandler OnDragDropSuccess; - - public DragDropTreeView() - { - this.AllowDrop = true; - } - - protected override void OnDragOver(DragEventArgs e) - { - - } - - protected override void OnDrop(DragEventArgs e) - { - base.OnDrop(e); - - // 检索放置位置的客户端坐标 - Point targetPoint = e.GetPosition(this); - - try - { - // 在放置位置检索节点 - DragDropTreeViewItem targetNode = GetNearestContainer(e.Source as UIElement); - - DragDropHelper.RemoveInsertionAdorner(); - - // 检索拖动的节点 - DragDropTreeViewItem draggedNode = (DragDropTreeViewItem)e.Data.GetData(typeof(DragDropTreeViewItem)); - - if (draggedNode == null) - draggedNode = (DragDropTreeViewItem)e.Data.GetData(typeof(ExplorerTreeViewItem)); - - if (targetNode == null || draggedNode == null) return; - - // 确认放置位置处的节点不是拖动节点或拖动节点的后代 - if (!draggedNode.Equals(targetNode) && !ContainsNode(draggedNode, targetNode)) - { - CancelEventArgs evt = new CancelEventArgs(); - OnDragDropSuccess?.Invoke(draggedNode, targetNode, evt); - - if (!evt.Cancel) - { - // 如果是移动操作,从当前节点中删除该节点位置并将其添加到放置位置的节点 - if (e.Effects == DragDropEffects.Move) - { - List items = TreeViewExtension.GetSelectedTreeViewItems(TreeViewExtension.GetTree(targetNode)); - - if (items != null && items.Count > 0) - { - // multi selection drag: - foreach (var ti in items) - { - (ti.Parent as ItemsControl).Items.Remove(ti); - - if (DragDropHelper.insertionPlace == DragDropHelper.InsertionPlace.Center) - { - targetNode.Items.Add(ti); - } - else - { - int index = (targetNode.Parent as ItemsControl).ItemContainerGenerator.IndexFromContainer(targetNode); - if (index < 0) index = 0; - - if (DragDropHelper.insertionPlace == DragDropHelper.InsertionPlace.Bottom) - index++; - - (targetNode.Parent as ItemsControl).Items.Insert(index, ti); - } - - ti.IsSelected = true; - - ReApplyStyle(ti as DragDropTreeViewItem, "IgniteMultiTreeViewItem"); - } - } - else - { - (draggedNode.Parent as ItemsControl).Items.Remove(draggedNode); - - if (DragDropHelper.insertionPlace == DragDropHelper.InsertionPlace.Center) - { - targetNode.Items.Add(draggedNode); - } - else - { - int index = (targetNode.Parent as ItemsControl).ItemContainerGenerator.IndexFromContainer(targetNode); - if (index < 0) index = 0; - - if (DragDropHelper.insertionPlace == DragDropHelper.InsertionPlace.Bottom) - index++; - - (targetNode.Parent as ItemsControl).Items.Insert(index, draggedNode); - } - - draggedNode.IsSelected = true; - - ReApplyStyle(draggedNode, "IgniteTreeViewItem"); - } - } - // OPTIONAL: - // If it is a copy operation, clone the dragged node - // and add it to the node at the drop location. - //else if (e.Effects == DragDropEffects.Copy) - //{ - // targetNode.Items.Add((DragDropTreeViewItem)draggedNode); - //} - - // Expand the node at the location - // to show the dropped node. - targetNode.IsExpanded = true; - } - } - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); - } - } - - private void ReApplyStyle(DragDropTreeViewItem ti, string styleName) - { - ti.Style = null; - ti.Style = (Style)FindResource(styleName); - - foreach (var t in ti.Items) - { - ReApplyStyle(t as DragDropTreeViewItem, styleName); - } - } - - // Determine whether one node is a parent - // or ancestor of a second node. - private bool ContainsNode(DragDropTreeViewItem node1, DragDropTreeViewItem node2) - { - return DragDropTreeView.TreeContainsNode(this, node1, node2); - } - - public static bool TreeContainsNode(TreeView tv, DragDropTreeViewItem node1, DragDropTreeViewItem node2) - { - // Check the parent node of the second node. - if (node2.Parent == null || node2.Parent == tv) return false; - if (node2.Parent == node1) return true; - - // If the parent node is not null or equal to the first node, - // call the ContainsNode method recursively using the parent of - // the second node. - return TreeContainsNode(tv, node1, node2.Parent as DragDropTreeViewItem); - } - - protected override void OnDragEnter(DragEventArgs e) - { - base.OnDragEnter(e); - - //e.Effects = DragDropEffects.Link; - } - - protected override void OnMouseMove(MouseEventArgs e) - { - base.OnMouseMove(e); - - - // Move the dragged node when the left mouse button is used. - //if (e.LeftButton == MouseButtonState.Pressed && this.SelectedItem != null) - //{ - // DragDrop.DoDragDrop(this, this.SelectedItem, DragDropEffects.Move); - //} - - //// Copy the dragged node when the right mouse button is used. - //else if (e.Button == MouseButtons.Right) - //{ - // DragDrop.DoDragDrop(e.Item, DragDropEffects.Copy); - //} - } - - private DragDropTreeViewItem GetNearestContainer(UIElement element) - { - // Walk up the element tree to the nearest tree view item. - DragDropTreeViewItem container = element as DragDropTreeViewItem; - while ((container == null) && (element != null)) - { - element = VisualTreeHelper.GetParent(element) as UIElement; - container = element as DragDropTreeViewItem; - } - return container; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/controls/DragDropTreeViewItem.cs b/Editor/CLEngine.Editor/controls/DragDropTreeViewItem.cs deleted file mode 100644 index 3ebfdf4d571dfd2322719667fa895a2c62efb275..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/DragDropTreeViewItem.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; -using CLEngine.Editor.core; - -namespace CLEngine.Editor.controls -{ - public class DragDropTreeViewItem : TreeViewItem - { - internal bool CanDrag = true; - internal string TagText = string.Empty; - - protected override void OnMouseMove(MouseEventArgs e) - { - base.OnMouseMove(e); - HitTestResult result = VisualTreeHelper.HitTest(this, e.GetPosition(this)); - - // Move the dragged node when the left mouse button is used. EditorUtils.GetParent(result.VisualHit, 2) == - if (e.LeftButton == MouseButtonState.Pressed && CanDrag && (result.VisualHit as UIElement) != null && (result.VisualHit as UIElement).IsDescendantOf(this)) - { - try - { - DragDrop.DoDragDrop(this, this, DragDropEffects.Move); - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); - } - } - - DragDropTreeViewItem targetNode = GetNearestContainer(e.Source as UIElement); - if (targetNode == null) - DragDropHelper.RemoveInsertionAdorner(); - //Console.WriteLine(this.PointFromScreen(Mouse.GetPosition(targetNode))); - } - - protected override void OnDragOver(DragEventArgs e) - { - base.OnDragEnter(e); - - HitTestResult result = VisualTreeHelper.HitTest(this, e.GetPosition(this)); - - if ((result.VisualHit as UIElement).IsDescendantOf(this)) - { - UIElement element = (result.VisualHit as UIElement); - DragDropTreeViewItem targetNode = GetNearestContainer(e.Source as UIElement); - if (e.GetPosition(targetNode).Y < targetNode.ActualHeight * 0.2f) - { - // meter em cima - //Console.WriteLine("cima"); - DragDropHelper.insertionPlace = DragDropHelper.InsertionPlace.Top; - DragDropHelper.CreateInsertionAdorner(targetNode, true); - } - else if (e.GetPosition(targetNode).Y > targetNode.ActualHeight * 0.8f) - { - //Console.WriteLine("baixo"); - DragDropHelper.insertionPlace = DragDropHelper.InsertionPlace.Bottom; - DragDropHelper.CreateInsertionAdorner(targetNode, false); - } - else - { - //Console.WriteLine("centro"); - DragDropHelper.RemoveInsertionAdorner(); - DragDropHelper.insertionPlace = DragDropHelper.InsertionPlace.Center; - var converter = new System.Windows.Media.BrushConverter(); - Background = (Brush)converter.ConvertFromString("#555"); - } - } - } - - protected override void OnDragEnter(DragEventArgs e) - { - base.OnDragEnter(e); - - //HitTestResult result = VisualTreeHelper.HitTest(this, e.GetPosition(this)); - - //if ((result.VisualHit as UIElement).IsDescendantOf(this)) - //{ - // UIElement element = (result.VisualHit as UIElement); - // DragDropTreeViewItem targetNode = GetNearestContainer(e.Source as UIElement); - // if (e.GetPosition(targetNode).Y < targetNode.ActualHeight * 0.2f) - // { - // // meter em cima - // //Console.WriteLine("cima"); - // DragDropHelper.insertionPlace = DragDropHelper.InsertionPlace.Top; - // DragDropHelper.CreateInsertionAdorner(targetNode, true); - // } - // else if (e.GetPosition(targetNode).Y > targetNode.ActualHeight * 0.8f) - // { - // //Console.WriteLine("baixo"); - // DragDropHelper.insertionPlace = DragDropHelper.InsertionPlace.Bottom; - // DragDropHelper.CreateInsertionAdorner(targetNode, false); - // } - // else - // { - // //Console.WriteLine("centro"); - // DragDropHelper.insertionPlace = DragDropHelper.InsertionPlace.Center; - // var converter = new System.Windows.Media.BrushConverter(); - // Background = (Brush)converter.ConvertFromString("#555"); - // } - //} - - //DragDropTreeViewItem targetNode = GetNearestContainer(e.Source as UIElement); - //Console.WriteLine("op2: " + e.GetPosition(targetNode)); - //Mouse.GetPosition(this); ve se da algo de jeito deve dar, le a info eu sei fui eu que fiz -mas. a-cho qeu nao dava vou ver - //Console.WriteLine(this.PointToScreen(Mouse.GetPosition(targetNode))); - //Console.WriteLine("op: " + Mouse.GetPosition(targetNode)); - - } - - protected override void OnMouseLeave(MouseEventArgs e) - { - base.OnMouseLeave(e); - Background = Brushes.Transparent; - DragDropHelper.RemoveInsertionAdorner(); - } - - protected override void OnDragLeave(DragEventArgs e) - { - base.OnDragLeave(e); - Background = Brushes.Transparent; - DragDropHelper.RemoveInsertionAdorner(); - } - - private DragDropTreeViewItem GetNearestContainer(UIElement element) - { - // Walk up the element tree to the nearest tree view item. - DragDropTreeViewItem container = element as DragDropTreeViewItem; - while ((container == null) && (element != null)) - { - element = VisualTreeHelper.GetParent(element) as UIElement; - container = element as DragDropTreeViewItem; - } - return container; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/controls/ExplorerTreeViewItem.cs b/Editor/CLEngine.Editor/controls/ExplorerTreeViewItem.cs deleted file mode 100644 index 8fc153823a5bb467a4110602cc9f04f781cfc45e..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/ExplorerTreeViewItem.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Windows; -using CLEngine.Editor.core; - -namespace CLEngine.Editor.controls -{ - public class ExplorerTreeViewItem : DragDropTreeViewItem - { - #region Properties - - private Point lastpos = new Point(0, 0); - - public string Text { get; set; } - public string FullPath - { - get - { - if (!(Parent is ExplorerTreeViewItem)) - { - return Text; - } - else - { - return (Parent as ExplorerTreeViewItem).FullPath + "\\" + Text; - } - } - } - public int PriorityIndex { get; set; } - - #endregion - - #region Constructors - - public ExplorerTreeViewItem() - { - Text = string.Empty; - PriorityIndex = -1; - - //(Header as StackPanel).MouseEnter += ExplorerTreeViewItem_MouseEnter; - //(Header as StackPanel).MouseLeave += ExplorerTreeViewItem_MouseLeave; - } - - #endregion - - #region Methods - - - - #endregion - - #region events - - protected override void OnMouseEnter(System.Windows.Input.MouseEventArgs e) - { - if (!System.IO.File.Exists(this.FullPath) || EditorUtils.isDirectory(this.FullPath)) return; - - Point p = PointToScreen(e.GetPosition(this)); - lastpos = p; - - if (Text.ToLower().EndsWith(".png") || Text.ToLower().EndsWith(".jpg") || - Text.ToLower().EndsWith(".jpeg") || Text.ToLower().EndsWith(".gif") || - Text.ToLower().EndsWith(".bmp")) - { - EditorHandler.PicturePreview.ChangeImage(FullPath); - EditorHandler.PicturePreview.Visibility = System.Windows.Visibility.Visible; - - p.Y = Microsoft.Xna.Framework.MathHelper.Clamp( - (float)p.Y, - 0, - (float)System.Windows.SystemParameters.WorkArea.Height - (float)EditorHandler.PicturePreview.PreviewImage.Height); - - EditorHandler.PicturePreview.Top = p.Y - 20; - EditorHandler.PicturePreview.Left = p.X + 30; - } - } - - protected override void OnMouseLeave(System.Windows.Input.MouseEventArgs e) - { - try - { - base.OnMouseLeave(e); - Point p = PointToScreen(e.GetPosition(this)); - - if (p != lastpos) - EditorHandler.PicturePreview.Visibility = System.Windows.Visibility.Collapsed; - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); - } - } - - #endregion - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/controls/RoundedButton.cs b/Editor/CLEngine.Editor/controls/RoundedButton.cs deleted file mode 100644 index a552f63fa1bff40d31e5a582c22653c9abb1107a..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/RoundedButton.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Windows; -using System.Windows.Controls; - -namespace CLEngine.Editor.controls -{ - public class RoundedButton : Button - { - public CornerRadius CornerRadius - { - get { return (CornerRadius)GetValue(CornerRadiusProperty); } - set { SetValue(CornerRadiusProperty, value); } - } - - public static readonly DependencyProperty CornerRadiusProperty = - DependencyProperty.Register("CornerRadius", typeof(CornerRadius), - typeof(RoundedButton), new UIPropertyMetadata()); - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/controls/RoundedButtonToggle.cs b/Editor/CLEngine.Editor/controls/RoundedButtonToggle.cs deleted file mode 100644 index a5638ef225e510305cf38bff32b39980d386cd4c..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/RoundedButtonToggle.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Windows; -using System.Windows.Controls.Primitives; - -namespace CLEngine.Editor.controls -{ - public class RoundedButtonToggle : ToggleButton - { - public CornerRadius CornerRadius - { - get { return (CornerRadius)GetValue(CornerRadiusProperty); } - set { SetValue(CornerRadiusProperty, value); } - } - - public static readonly DependencyProperty CornerRadiusProperty = - DependencyProperty.Register("CornerRadius", typeof(CornerRadius), - typeof(RoundedButtonToggle), new UIPropertyMetadata()); - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/controls/TilesetCanvas.cs b/Editor/CLEngine.Editor/controls/TilesetCanvas.cs deleted file mode 100644 index c807c3b88e427793c289a958232141909a31877d..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/TilesetCanvas.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace CLEngine.Editor.controls -{ - public class TilesetCanvas : Canvas - { - private int brushSizeX = 32; - private int brushSizeY = 32; - private Rect selection = Rect.Empty; - - private Pen penGrid; - private Pen penWhite; - private Pen penBlack; - - #region properties - - public int BrushSizeX - { - get { return brushSizeX; } - set { brushSizeX = value; InvalidateVisual(); } - } - - public int BrushSizeY - { - get { return brushSizeY; } - set { brushSizeY = value; InvalidateVisual(); } - } - - public Rect Selection - { - get { return selection; } - set { selection = value; InvalidateVisual(); } - } - - #endregion - - public TilesetCanvas() - { - penGrid = new Pen(Brushes.Black, 1); - penWhite = new Pen(Brushes.White, 2); - penBlack = new Pen(Brushes.Black, 4); - } - - protected override void OnRender(System.Windows.Media.DrawingContext dc) - { - base.OnRender(dc); - - try - { - int cx = (int)Width / brushSizeX; - int cy = (int)Height / brushSizeY; - - // draw vertical lines: - for (int i = 0; i <= cx; i++) - { - dc.DrawLine(penGrid, new Point(i * brushSizeX, 0), new Point(i * brushSizeX, Height)); - } - - // draw horizontal lines: - for (int i = 0; i <= cy; i++) - { - dc.DrawLine(penGrid, new Point(0, i * brushSizeY), new Point(Width, i * brushSizeY)); - } - - // draw selection: - if (selection.Width > 0 && selection.Height > 0) - { - dc.DrawRectangle(Brushes.Transparent, penBlack, selection); - dc.DrawRectangle(Brushes.Transparent, penWhite, selection); - } - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); - } - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/controls/TutorialContainer.xaml b/Editor/CLEngine.Editor/controls/TutorialContainer.xaml deleted file mode 100644 index e03ecdbd8c7bf64b8d6641b85fd61c00f7827bf5..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/TutorialContainer.xaml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - 一个简短的描述测试 - - - - diff --git a/Editor/CLEngine.Editor/controls/TutorialContainer.xaml.cs b/Editor/CLEngine.Editor/controls/TutorialContainer.xaml.cs deleted file mode 100644 index 1f9b185dc668e9b1abf323b79de9c16174b70f49..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/TutorialContainer.xaml.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Windows.Controls; -using System.Windows.Input; -using System.Xml.Linq; -using CLEngine.Editor.core; -using CLEngine.Editor.windows; - -namespace CLEngine.Editor.controls -{ - /// - /// TutorialContainer.xaml 的交互逻辑 - /// - public partial class TutorialContainer : UserControl - { - #region Fields - - private string xmlPath = string.Empty; - private string rootPath = string.Empty; - private string imagePath = string.Empty; - private string title = string.Empty; - - #endregion - - #region Constructors - - public TutorialContainer() - { - InitializeComponent(); - } - - public TutorialContainer(string xmlPath, string rootPath) - { - InitializeComponent(); - this.xmlPath = xmlPath; - this.rootPath = rootPath; - } - - #endregion - - #region Methods - - public bool ReadInfo() - { - XDocument doc = XDocument.Load(xmlPath); - - imagePath = doc.Element("Tutorial").Element("Info").Element("Image").Value; - - EditorUtils.RenderPicture(ref containerPicture, this.rootPath + @"\Pictures\" + imagePath, 200, 180); - if (containerPicture.Source == null) - return false; - - containerPicture.Width = 200; - containerPicture.Height = 180; - - this.title = doc.Element("Tutorial").Element("Info").Element("Title").Value; - - TitleTextBlock.Text = this.title; - AuthorTextBlock.Text = doc.Element("Tutorial").Element("Info").Element("Author").Value; - DescriptionTextBlock.Text = doc.Element("Tutorial").Element("Info").Element("Description").Value; - - return true; - } - - #endregion - - #region Events - - private void Border_MouseUp(object sender, MouseButtonEventArgs e) - { - TutorialWindow tutorial = new TutorialWindow(xmlPath, rootPath, this.title); - tutorial.ShowDialog(); - } - - #endregion - } -} diff --git a/Editor/CLEngine.Editor/controls/TutorialsCategoryContainer.xaml b/Editor/CLEngine.Editor/controls/TutorialsCategoryContainer.xaml deleted file mode 100644 index 535773528e5c98bcd4a9c9501401fa070cc99906..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/TutorialsCategoryContainer.xaml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/Editor/CLEngine.Editor/controls/TutorialsCategoryContainer.xaml.cs b/Editor/CLEngine.Editor/controls/TutorialsCategoryContainer.xaml.cs deleted file mode 100644 index e2dfcf61964d7512e7e9fba1d9f60811a1e8f8d6..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/TutorialsCategoryContainer.xaml.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Windows.Controls; - -namespace CLEngine.Editor.controls -{ - /// - /// TutorialsCategoryContainer.xaml 的交互逻辑 - /// - public partial class TutorialsCategoryContainer : UserControl - { - public TutorialsCategoryContainer() - { - InitializeComponent(); - } - - public TutorialsCategoryContainer(string category) - { - InitializeComponent(); - - CategoryTextBlock.Text = "● " + category; - } - - public bool AddTutorialPreview(string xmlPath, string rootPath) - { - TutorialContainer tutoPreview = new TutorialContainer(xmlPath, rootPath); - if (tutoPreview.ReadInfo()) - { - this.TutorialsWrapPanel.Children.Add(tutoPreview); - return true; - } - - return false; - } - } -} diff --git a/Editor/CLEngine.Editor/controls/VisualScriptingNode.xaml b/Editor/CLEngine.Editor/controls/VisualScriptingNode.xaml deleted file mode 100644 index bb699dc33164c2151e10186831894d21abdd570f..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/VisualScriptingNode.xaml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Editor/CLEngine.Editor/controls/VisualScriptingNode.xaml.cs b/Editor/CLEngine.Editor/controls/VisualScriptingNode.xaml.cs deleted file mode 100644 index cb251575a7f912f3e51d37d5ce03b6fb660198d2..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/controls/VisualScriptingNode.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace CLEngine.Editor.controls -{ - /// - /// VisualScriptingNode.xaml 的交互逻辑 - /// - public partial class VisualScriptingNode : UserControl - { - public VisualScriptingNode() - { - InitializeComponent(); - } - } -} diff --git a/Editor/CLEngine.Editor/core/BraceFoldingStrategy.cs b/Editor/CLEngine.Editor/core/BraceFoldingStrategy.cs deleted file mode 100644 index 88332c34a8e449a2d8c86906b2de973f40f52f75..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/BraceFoldingStrategy.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Collections.Generic; -using ICSharpCode.AvalonEdit.Document; -using ICSharpCode.AvalonEdit.Folding; - -namespace CLEngine.Editor.core -{ - public class BraceFoldingStrategy : AbstractFoldingStrategy - { - public char OpeningBrace { get; set; } - - public char ClosingBrace { get; set; } - - public BraceFoldingStrategy() - { - this.OpeningBrace = '{'; - this.ClosingBrace = '}'; - } - - public override IEnumerable CreateNewFoldings(TextDocument document, out int firstErrorOffset) - { - firstErrorOffset = -1; - return CreateNewFoldings(document); - } - - public IEnumerable CreateNewFoldings(ITextSource document) - { - List newFoldings = new List(); - - Stack startOffsets = new Stack(); - int lastNewLineOffset = 0; - char openingBrace = this.OpeningBrace; - char closingBrace = this.ClosingBrace; - for (int i = 0; i < document.TextLength; i++) - { - char c = document.GetCharAt(i); - if (c == openingBrace) - { - startOffsets.Push(i); - } - else if (c == closingBrace && startOffsets.Count > 0) - { - int startOffset = startOffsets.Pop(); - if (startOffset < lastNewLineOffset) - { - newFoldings.Add(new NewFolding(startOffset, i + 1)); - } - } - else if (c == '\n' || c == '\r') - { - lastNewLineOffset = i + 1; - } - } - newFoldings.Sort((a, b) => a.StartOffset.CompareTo(b.StartOffset)); - return newFoldings; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/CommandBindings.cs b/Editor/CLEngine.Editor/core/CommandBindings.cs deleted file mode 100644 index 76f87008789c6428de64dc71f2d856885546d3c9..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/CommandBindings.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Windows.Input; - -namespace CLEngine.Editor.core -{ - public static class CommandBindings - { - public static readonly RoutedUICommand FullDebug = new RoutedUICommand("完整调试", "FullDebug", typeof(MainWindow)); - public static readonly RoutedUICommand ToCollisionBlock = new RoutedUICommand("碰撞阻挡", "ToCollisionBlock", typeof(MainWindow)); - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/DragDropHelper.cs b/Editor/CLEngine.Editor/core/DragDropHelper.cs deleted file mode 100644 index 7c09120b634d176fbea8afa3783590a0115797a6..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/DragDropHelper.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Windows.Documents; -using CLEngine.Editor.controls; - -namespace CLEngine.Editor.core -{ - internal static class DragDropHelper - { - internal enum InsertionPlace { Top, Center, Bottom }; - - internal static InsertionPlace insertionPlace; - internal static InsertionAdorner insertionAdorner; - - public static void CreateInsertionAdorner(DragDropTreeViewItem target, bool firstHalf) - { - if (target != null && insertionAdorner == null && !(target is ExplorerTreeViewItem)) - { - // Here, I need to get adorner layer from targetItemContainer and not targetItemsControl. - // This way I get the AdornerLayer within ScrollContentPresenter, and not the one under AdornerDecorator (Snoop is awesome). - // If I used targetItemsControl, the adorner would hang out of ItemsControl when there's a horizontal scroll bar. - var adornerLayer = AdornerLayer.GetAdornerLayer(target); - insertionAdorner = new InsertionAdorner(true, firstHalf, target, adornerLayer); - - } - } - - public static void RemoveInsertionAdorner() - { - if (insertionAdorner != null) - { - insertionAdorner.Detach(); - insertionAdorner = null; - } - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/EditorCommands.cs b/Editor/CLEngine.Editor/core/EditorCommands.cs deleted file mode 100644 index 003bb16165bf452cb1fed1185963ae9977c61a19..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/EditorCommands.cs +++ /dev/null @@ -1,664 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Forms; -using System.Windows.Threading; -using CLEngine.Editor.controls; -using CLEngine.Editor.model; -using CLEngine.Editor.windows; -using CLEngine.Core; -using Microsoft.Xna.Framework.Graphics; -using Clipboard = System.Windows.Clipboard; -using MessageBox = System.Windows.Forms.MessageBox; - -namespace CLEngine.Editor.core -{ - public class EditorCommands - { - internal static void DeleteDirectoryRecursively(string path) - { - try - { - Directory.Delete(path, true); - } - catch (Exception ex) - { - Thread.Sleep(1); - DeleteDirectoryRecursively(path); - } - } - - internal static void UpdatePropertyGrid() - { - if (EditorHandler.SelectedObjectPG != null) - { - EditorHandler.SelectedObjectPG.Dispatcher.BeginInvoke((Action)(() => - { - EditorHandler.SelectedObjectPG.Update(); - })); - } - } - - static object lockPaste = new object(); - internal static void CopySelectedObjects() - { - lock (lockPaste) - { - Clipboard.Clear(); - - foreach (var obj in EditorHandler.SelectedGameObjects) - obj.SaveComponentValues(); - - if (EditorHandler.SelectedGameObjects != null && EditorHandler.SelectedGameObjects.Count > 0) - Clipboard.SetData("GameObjects", new List(EditorHandler.SelectedGameObjects)); - } - } - - - internal static void PasteSelectedObjects() - { - lock (lockPaste) - { - List list = (List)Clipboard.GetData("GameObjects"); - //Clipboard.Clear(); - - if (list == null || list.Count == 0) return; - - EditorHandler.SelectedGameObjects.Clear(); - // verificar se tem um pai - foreach (var obj in list) - { - var parent = obj.Transform.Parent; - while (parent != null && !list.Contains(parent.GameObject)) - parent = parent.Parent; - - if (parent != null && list.Contains(parent.GameObject)) - { - parent.GameObject.Children.Add(obj); - } - else - { - var selected = EditorHandler.SceneTreeView.SelectedItem as DragDropTreeViewItem; - EditorHandler.SceneTreeView.AddGameObject(obj, string.Empty, false, true); - } - - EditorHandler.SelectedGameObjects.Add(obj); - } - - EditorHandler.ChangeSelectedObjects(); - } - } - - internal static void CreatePropertyGridView() - { - EditorHandler.PropertyGridContainer.Dispatcher.BeginInvoke(new Action(() => - { - EditorHandler.PropertyGridContainer.Children.Clear(); - - // TODO: handle multiple selection - if (EditorHandler.SelectedGameObjects.Count == 1) - { - PropertyBox properties; - - properties = new PropertyBox(); - - properties.SelectedObject = EditorHandler.SelectedGameObjects[0] as GameObject; - EditorHandler.SelectedObjectPG = properties.PropertyGrid; - properties.ToggleExpand(); - - EditorHandler.PropertyGridContainer.Children.Add(properties); - - if (EditorHandler.SelectedGameObjects[0] is GameObject) - { - foreach (var component in EditorHandler.SelectedGameObjects[0].GetComponents()) - { - properties = new PropertyBox(); - properties.SelectedObject = component; - properties.Title.Content += " (Component)"; - - if (component.EditorExpanded) - properties.ToggleExpand(); - - EditorHandler.PropertyGridContainer.Children.Add(properties); - } - } - } - })); - } - - internal static void CheckPropertyGridConsistency() - { - for (int i = EditorHandler.PropertyGridContainer.Children.Count - 1; i >= 0; i--) - { - if ((EditorHandler.PropertyGridContainer.Children[i] as PropertyBox).SelectedObject is ObjectComponent) - { - ObjectComponent component = (EditorHandler.PropertyGridContainer.Children[i] as PropertyBox).SelectedObject as ObjectComponent; - - if (component.Transform.GameObject.GetComponents().Find(o => o == component) == null) - EditorHandler.PropertyGridContainer.Children.RemoveAt(i); - } - } - } - - /// - /// Loads a saved project - /// - internal static bool LoadProject() - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "打开工程"; - ofd.Filter = @"(*.clengine)|*.clengine"; - - if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - LoadProject(ofd.FileName); - EditorCommands.AddToProjectHistory(ofd.FileName); - } - - EditorCommands.ShowOutputMessage("工程加载成功"); - - return false; - } - - internal static bool LoadProject(string filename) - { - try - { - if (File.Exists(filename)) - { - SceneManager.GameProject = CProject.Load(filename); - - //File.Copy("Farseer Engine MonoGame OpenGL.dll", SceneManager.GameProject.ProjectPath + "\\Farseer Engine MonoGame OpenGL.dll", true); - File.Copy("CLEngine.Core.dll", SceneManager.GameProject.ProjectPath + "\\CLEngine.Core.dll", true); - File.Copy("Project Templates\\CLEngine.Core.xml", SceneManager.GameProject.ProjectPath + "\\CLEngine.Core.xml", true); - File.Copy("Project Templates\\CLEngine.Windows.exe", SceneManager.GameProject.ProjectPath + "\\CLEngine.Windows.exe", true); - CHelper.CopyDirectory("Project Templates\\libs", SceneManager.GameProject.ProjectPath + "", true); - File.Copy("Xceed.Wpf.Toolkit.dll", SceneManager.GameProject.ProjectPath + "\\Xceed.Wpf.Toolkit.dll", true); - //File.Copy("OpenTK.dll", SceneManager.GameProject.ProjectPath + "\\OpenTK.dll", true); - // load user settings: - if (!File.Exists(SceneManager.GameProject.ProjectPath + "\\_userPrefs.pgb")) - { - UserPreferences.Instance = new UserPreferences(); - CHelper.SerializeObject(SceneManager.GameProject.ProjectPath + "\\_userPrefs.pgb", UserPreferences.Instance); - } - else - { - UserPreferences.Instance = CHelper.DeserializeObject(SceneManager.GameProject.ProjectPath + "\\_userPrefs.pgb") as UserPreferences; - } - - SceneManager.ActiveScene = null; - EditorHandler.SelectedGameObjects.Clear(); - EditorHandler.ChangeSelectedObjects(); - EditorHandler.SceneTreeView.CreateView(); - EditorHandler.ProjectTreeView.CreateView(); - - CompilerWindow cf = new CompilerWindow(); - cf.ShowDialog(); - bool success = cf.Result; - - Reload(); - - if (success) - { - LoadLastScene(); - - EditorCommands.ShowOutputMessage("工程加载成功"); - - //kryptonNavigator1.SelectedIndex = 1; - } - else - { - EditorCommands.ShowOutputMessage("项目加载脚本错误"); - } - - EditorHandler.Settings = new IniFile(SceneManager.GameProject.ProjectPath + "\\settings.ini"); - - return true; - } - } - catch (Exception ex) - { - MessageBox.Show("无效的文件\n\n" + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - return false; - } - - /// - /// - /// - internal static void Reload() - { - SceneManager.ActiveScene = null; - } - - /// - /// - /// - /// - internal static bool LoadLastScene() - { - if (SceneManager.GameProject == null) return false; - - string path = SceneManager.GameProject.ProjectPath + "\\" + SceneManager.GameProject.EditorSettings.LastOpenScenePath; - - if (!path.Trim().Equals(string.Empty) && File.Exists(path)) - { - SceneManager.LoadScene(path, true); - EditorHandler.SceneTreeView.CreateView(); - - return true; - } - - return false; - } - - /// - /// - /// - /// - internal static void ShowOutputMessage(string message) - { - EditorHandler.OutputMessages.Add(new OutputMessage() { Time = DateTime.Now.ToString("HH:mm:ss").ToString(), Message = message.ToString() }); - } - - /// - /// - /// - /// - internal static void AddToProjectHistory(string path) - { - if (Properties.Settings.Default.LastLoadedProjects.Contains(path)) - { - Properties.Settings.Default.LastLoadedProjects = Properties.Settings.Default.LastLoadedProjects.Replace(path + "|", string.Empty); - } - - Properties.Settings.Default.LastLoadedProjects = path + "|" + Properties.Settings.Default.LastLoadedProjects; - Properties.Settings.Default.Save(); - } - - /// - /// - /// - internal static void SaveScene(bool saveAs) - { - if (SceneManager.ActiveScene == null) return; - - if (!File.Exists(SceneManager.ActiveScenePath)) - { - SaveFileDialog sfd = new SaveFileDialog(); - sfd.InitialDirectory = SceneManager.GameProject.ProjectPath; - sfd.Filter = "(*.scene)|*.scene"; - DialogResult dr = sfd.ShowDialog(); - - if (dr == DialogResult.Yes || dr == DialogResult.OK) - { - SceneManager.ActiveScenePath = sfd.FileName; - } - else - { - return; - } - } - - if (saveAs) - { - // TODO: implement "Save As" funcionality - - } - else - { - //SceneManager.ActiveScene.SaveComponentValues(); - SceneManager.SaveActiveScene(); - } - } - - /// - /// 使用不同的线程保存当前项目 - /// - internal static void SaveProject() - { - if (SceneManager.GameProject != null) - { - // 将项目保存在其他线程中 - Thread saveThread = new Thread(() => - { - SceneManager.GameProject.Save(); - if (UserPreferences.Instance != null) - CHelper.SerializeObject(SceneManager.GameProject.ProjectPath + "\\_userPrefs.pgb", UserPreferences.Instance); - }); - - EditorCommands.ShowOutputMessage("Project Saved"); - saveThread.Start(); - } - } - - /// - /// - /// - internal static void DebugGame() - { - if (SceneManager.ActiveScene == null) - { - MessageBox.Show("Ups!\n\n没有加载场景", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } - - SceneManager.GameProject.SceneStartPath = CHelper.MakeExclusiveRelativePath(SceneManager.GameProject.ProjectPath, SceneManager.ActiveScenePath); - - SaveProject(); - SaveScene(false); - - if (File.Exists(SceneManager.GameProject.ProjectPath + "\\CLEngine.Windows.exe")) - { - if (File.Exists(SceneManager.GameProject.ProjectPath + "\\libs\\Scripts.dll")) - File.Delete(SceneManager.GameProject.ProjectPath + "\\libs\\Scripts.dll"); - - if (!Directory.Exists(SceneManager.GameProject.ProjectPath + "\\libs")) - Directory.CreateDirectory(SceneManager.GameProject.ProjectPath + "\\libs"); - - // Compile scripts: - // old (depracated): CompileScripts(false); - //if (SceneManager.ScriptsAssembly != null) - //{ - string dllpath = SceneManager.GameProject.ProjectPath + "\\bin\\" + (SceneManager.GameProject.Debug ? "Debug" : "Release") + "\\" + SceneManager.ScriptsAssembly.GetName().Name + ".dll"; - - // The scripts .dll exists? - if (!File.Exists(dllpath)) - { - // Compile scripts - CompilerWindow cf = new CompilerWindow(); - cf.ShowDialog(); - - if (cf.DialogResult.Value) return; - - // Update path - dllpath = SceneManager.GameProject.ProjectPath + "\\bin\\" + (SceneManager.GameProject.Debug ? "Debug" : "Release") + "\\" + SceneManager.ScriptsAssembly.GetName().Name + ".dll"; - } - - File.Copy(dllpath, SceneManager.GameProject.ProjectPath + "\\libs\\Scripts.dll", true); - - try - { - Process debug = new Process(); - debug.StartInfo.WorkingDirectory = SceneManager.GameProject.ProjectPath; - debug.StartInfo.FileName = SceneManager.GameProject.ProjectPath + "\\CLEngine.Windows.exe"; - debug.StartInfo.Arguments = ""; - debug.StartInfo.CreateNoWindow = true; - debug.Start(); - - if (Properties.Settings.Default.AttachVisualStudio) - { - EnvDTE.DTE vsInstance; - - // Try to restore the current project visual studio solution instance, returning it if successful - if (TryToRestoreSolution(out vsInstance)) - { - // Tries to attach the retrieved instance to the game debug process - debug.Attach(vsInstance); - } - - /* - if (VisualStudioInstancePID != 0 && Extensions.TryToRetrieveVSInstance(VisualStudioInstancePID, out vsInstance)) - { - // restore window, in case the process is only running on background - vsInstance.MainWindow.Visible = true; - - debug.Attach(vsInstance); - } - else // if PID attempt failed, try using the project solution name - { - // reset PID - VisualStudioInstancePID = 0; - - // try to retrieve instance based on solution name - vsInstance = Extensions.GetInstance(UserPreferences.Instance.ProjectSlnFilePath); - if (vsInstance != null) - { - // restore window, in case the process is only running on background - vsInstance.MainWindow.Visible = true; - - debug.Attach(vsInstance); // Attach visual studio dte - } - }*/ - - - } - - debug.WaitForExit(); - debug.Close(); - } - catch (Exception ex) - { - Console.WriteLine("ERROR: " + ex.Message); - } - } - else - { - MessageBox.Show("Ups!\n\nIt seems there is no engine set up for your game!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - - /// - /// Restores the a solution by making it visible - /// - /// the visual studio solution instance - /// Whether the restore happened or not - internal static bool RestoreSolution(EnvDTE.DTE instance) - { - // if the instance is valid - if (instance != null) - { - // restore window, in case the process is only running on background - instance.MainWindow.Visible = true; - return true; - } - return false; - } - - /// - /// Tries to restore a solution, using its PID and then its file path. - /// - /// The visual studio solution instance - /// Whether the restore was successful or not - internal static bool TryToRestoreSolution(out EnvDTE.DTE instance) - { - // the visual studio instance - EnvDTE.DTE vsInstance; - - // if visual studio instance process Id is valid - if (VisualStudioInstancePID != 0) - { - // if an instance has been found with the provided PID - if (Extensions.TryToRetrieveVSInstance(VisualStudioInstancePID, out vsInstance)) - { - // try to restore the solution - if (RestoreSolution(vsInstance)) - { - // assign out instance - instance = vsInstance; - // all done - return true; - } - } - } - - // if PID attempt failed, try to use solution file path. But first, reset the PID - VisualStudioInstancePID = 0; - // try to retrieve instance based on solution name - vsInstance = Extensions.GetInstance(UserPreferences.Instance.ProjectSlnFilePath); - - // try to restore the solution - if (RestoreSolution(vsInstance)) - { - // assign out instance - instance = vsInstance; - // all done - return true; - } - - // in case both PID and solution file path attempts failed, set out instance to null - instance = null; - return false; - } - - // Visual Studio Solution Instance Process Id - internal static int VisualStudioInstancePID { get; set; } - - /// - /// Apply Blur Effect on the window - /// - /// - internal static void ApplyBlurEffect(System.Windows.Window win) - { - System.Windows.Media.Effects.BlurEffect objBlur = new System.Windows.Media.Effects.BlurEffect(); - objBlur.Radius = 4; - win.Effect = objBlur; - } - - /// - /// Remove Blur Effects - /// - /// - internal static void ClearEffect(System.Windows.Window win) - { - win.Effect = null; - } - } - - public static class Extensions - { - internal static void Attach(this System.Diagnostics.Process process, EnvDTE.DTE dte) - { - int tryCount = 5; - while (tryCount-- > 0) - { - try - { - EnvDTE.Processes processes = dte.Debugger.LocalProcesses; - - foreach (EnvDTE.Process proc in processes.Cast().Where( - proc => proc.Name.IndexOf(process.ProcessName) != -1)) - { - proc.Attach(); - Debug.WriteLine(String.Format - ("Attached to process {0} successfully.", process.ProcessName)); - break; - } - break; - } - catch (System.Runtime.InteropServices.COMException) - { - System.Threading.Thread.Sleep(1000); - } - } - } - - internal static EnvDTE.DTE GetInstance(string displayName) - { - //List names = new List(); - //names.AddRange(from i in GetVisualStudioInstances() select i.Solution.FullName); - IEnumerable instances = GetVisualStudioInstances(); - - bool exists = instances.Any(x => x.Solution.FullName.Equals(displayName)); - if (exists) - return instances.First(x => x.Solution.FullName.Equals(displayName)); - - return null; - } - - /// - /// Retrieve every visual studio instance - /// - /// List of visual studio instances - internal static IEnumerable GetVisualStudioInstances() - { - System.Runtime.InteropServices.ComTypes.IRunningObjectTable rot; - System.Runtime.InteropServices.ComTypes.IEnumMoniker enumMoniker; - int retVal = GetRunningObjectTable(0, out rot); - - if (retVal == 0) - { - rot.EnumRunning(out enumMoniker); - - IntPtr fetched = IntPtr.Zero; - System.Runtime.InteropServices.ComTypes.IMoniker[] moniker = new System.Runtime.InteropServices.ComTypes.IMoniker[1]; - while (enumMoniker.Next(1, moniker, fetched) == 0) - { - System.Runtime.InteropServices.ComTypes.IBindCtx bindCtx; - CreateBindCtx(0, out bindCtx); - string displayName; - moniker[0].GetDisplayName(bindCtx, null, out displayName); - //Console.WriteLine("Display Name: {0}", displayName); - bool isVisualStudio = displayName.StartsWith("!VisualStudio"); - if (isVisualStudio) - { - int currentProcessId = int.Parse(displayName.Split(':')[1]); - - object obj; - rot.GetObject(moniker[0], out obj); - var dte = obj as EnvDTE.DTE; - yield return dte; - } - } - } - } - - /// - /// 尝试根据其PID检索特定的Visual Studio实例 - /// - /// Visual Studio instance PID - /// Visual Studio instance if able to found. Null otherwise. - /// Whether the visual studio instance was found or not. - internal static bool TryToRetrieveVSInstance(int processId, out EnvDTE.DTE instance) - { - IntPtr numFetched = IntPtr.Zero; - System.Runtime.InteropServices.ComTypes.IRunningObjectTable runningObjectTable; - System.Runtime.InteropServices.ComTypes.IEnumMoniker monikerEnumerator; - System.Runtime.InteropServices.ComTypes.IMoniker[] monikers = new System.Runtime.InteropServices.ComTypes.IMoniker[1]; - - GetRunningObjectTable(0, out runningObjectTable); - runningObjectTable.EnumRunning(out monikerEnumerator); - monikerEnumerator.Reset(); - - while (monikerEnumerator.Next(1, monikers, numFetched) == 0) - { - System.Runtime.InteropServices.ComTypes.IBindCtx ctx; - CreateBindCtx(0, out ctx); - - string runningObjectName; - monikers[0].GetDisplayName(ctx, null, out runningObjectName); - - object runningObjectVal; - runningObjectTable.GetObject(monikers[0], out runningObjectVal); - - if (runningObjectVal is EnvDTE.DTE && runningObjectName.StartsWith("!VisualStudio")) - { - // retrieve process id - "process_name:pid" - int currentProcessId = int.Parse(runningObjectName.Split(':')[1]); - - // 如果它是匹配的 - if (currentProcessId == processId) - { - instance = (EnvDTE.DTE)runningObjectVal; - return true; - } - } - } - - instance = null; - return false; - } - - [System.Runtime.InteropServices.DllImport("ole32.dll")] - private static extern void CreateBindCtx(int reserved, out System.Runtime.InteropServices.ComTypes.IBindCtx ppbc); - - [System.Runtime.InteropServices.DllImport("ole32.dll")] - private static extern int GetRunningObjectTable(int reserved, out System.Runtime.InteropServices.ComTypes.IRunningObjectTable prot); - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/EditorHandler.cs b/Editor/CLEngine.Editor/core/EditorHandler.cs deleted file mode 100644 index 63b4d9f750ebcf8ea543127347680ef431d24de3..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/EditorHandler.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Threading; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Forms; -using System.Windows.Media; -using CLEngine.Editor.controls; -using CLEngine.Editor.graphics_device; -using CLEngine.Editor.model; -using CLEngine.Editor.windows; -using CLEngine.Core; -using PropertyGrid = Xceed.Wpf.Toolkit.PropertyGrid.PropertyGrid; - -namespace CLEngine.Editor.core -{ - public static class EditorHandler - { - internal static Xceed.Wpf.Toolkit.PropertyGrid.PropertyGrid SelectedObjectPG = null; - - private static ObservableCollection outputMessages = new ObservableCollection(); - public static ObservableCollection OutputMessages - { - get - { - return outputMessages; - } - } - - private static PicturePreview picturePreview; - internal static PicturePreview PicturePreview - { - get - { - if (picturePreview == null) - { - picturePreview = new PicturePreview(); - picturePreview.ShowInTaskbar = false; - //picturePreview.Topmost = true; - } - - return picturePreview; - } - } - - //internal static OutputWindow OutputWindow = new OutputWindow(); - - /// - /// 将属性网格和属性标签更改为输入值 - /// - /// The object - public static bool ChangeSelectedObject(object value) - { - foreach (UIElement uiElement in PropertyGridContainer.Children) - { - if (uiElement is PropertyBox box) - { - if (box.SelectedObject == value) - return false; - } - } - - if (value != null) - { - PropertyGridContainer.Children.Clear(); - - PropertyBox properties = new PropertyBox(); - properties.SelectedObject = value; - properties.ToggleExpand(); - - - PropertyGridContainer.Children.Add(properties); - } - - return true; - } - - /// - /// 将属性网格和属性标签更改为所选对象 - /// - public static void ChangeSelectedObjects() - { - TilesetMenuItems.IsEnabled = false; - - - if (SelectedGameObjects != null) - { - if (SelectedGameObjects.Count == 1) - { - if (!ChangeSelectedObject(SelectedGameObjects[0])) - return; - - if (SelectedGameObjects[0] is Tileset tileset) - { - TilesetBrushControl.ChangeSelectionSize(tileset.TileWidth, tileset.TileHeight); - TilesetBrushControl.ChangeImageSource(tileset.ImageName); - - SceneManager.ActiveTileset = tileset; - TilesetMenuItems.IsEnabled = true; - } - else - { - SceneManager.ActiveTileset = null; - } - - EditorCommands.CreatePropertyGridView(); - } - else if (SelectedGameObjects.Count == 0) - { - SceneManager.ActiveTileset = null; - - if (SceneTreeView.SelectedItem != null) - SceneTreeView.SelectedItem.IsSelected = false; - - EditorCommands.CreatePropertyGridView(); - } - else - { - EditorCommands.CreatePropertyGridView(); - } - - TilesetBrushControl?.InvalidateVisual(); - } - } - - internal static UserPreferences UserPreferences { get; set; } - - internal static ProjectExplorerTreeView ProjectTreeView { get; set; } - - internal static StackPanel PropertyGridContainer { get; set; } - - internal static StackPanel TilesetMenuItems { get; set; } - - /// - /// - /// - internal static SceneViewGameControl SceneViewControl { get; set; } - - /// - /// - /// - internal static SplitContainer EditorSplitterContainer { get; set; } - - /// - /// - /// - public static TilesetBrushControl TilesetBrushControl { get; set; } - - /// - /// - /// - internal static IniFile Settings { get; set; } - - /// - /// - /// - internal static ToolStripStatusLabel StatusLabel { get; set; } - - /// - /// 获取或设置活动的PropertyGrid - /// - internal static PropertyGrid PropertyGrid { get; set; } - - /// - /// 获取或设置活动的PropertyLabel. - /// - internal static TabPage PropertyPage { get; set; } - - /// - /// 获取或设置活动的SceneTreeView. - /// - public static SceneHierarchyTreeView SceneTreeView { get; set; } - - /// - /// 获取或设置选定的GameObjects - /// - internal static List SelectedGameObjects { get; set; } - - /// - /// 获取或设置活动的UnDoRedo - /// - internal static UndoRedo UnDoRedo { get; set; } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/EditorUtils.cs b/Editor/CLEngine.Editor/core/EditorUtils.cs deleted file mode 100644 index 8f68ac2019d3da5ca81a96a058220b2378bc31f7..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/EditorUtils.cs +++ /dev/null @@ -1,295 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using CLEngine.Editor.controls; -using Microsoft.Win32; - -namespace CLEngine.Editor.core -{ - public static class EditorUtils - { - public static BitmapSource ConvertBitmapToSource96DPI(BitmapImage bitmapImage) - { - double dpi = 96; - int width = bitmapImage.PixelWidth; - int height = bitmapImage.PixelHeight; - - int stride = width * 4; // 4 bytes per pixel - byte[] pixelData = new byte[stride * height]; - bitmapImage.CopyPixels(pixelData, stride, 0); - - return BitmapSource.Create(width, height, dpi, dpi, PixelFormats.Bgra32, null, pixelData, stride); - } - - public static BitmapImage ConvertBitmapToImage96DPI(BitmapImage bitmapImage) - { - double dpi = 96; - int width = bitmapImage.PixelWidth; - int height = bitmapImage.PixelHeight; - - int stride = width * 4; // 4 bytes per pixel - byte[] pixelData = new byte[stride * height]; - bitmapImage.CopyPixels(pixelData, stride, 0); - - BitmapSource bs = BitmapSource.Create(width, height, dpi, dpi, PixelFormats.Bgra32, null, pixelData, stride); - - PngBitmapEncoder encoder = new PngBitmapEncoder(); - MemoryStream memoryStream = new MemoryStream(); - BitmapImage bImg = new BitmapImage(); - - encoder.Frames.Add(BitmapFrame.Create(bs)); - encoder.Save(memoryStream); - - bImg.BeginInit(); - bImg.StreamSource = new MemoryStream(memoryStream.ToArray()); - bImg.EndInit(); - - memoryStream.Close(); - - return bImg; - } - - internal static CMenuItem CreateMenuItem(string text, ImageSource imageSource = null) - { - CMenuItem menuItem = new CMenuItem(); - - menuItem.Header = text; - - if (imageSource != null) - menuItem.Icon = new Image() { Source = imageSource, HorizontalAlignment = HorizontalAlignment.Center }; - - return menuItem; - } - - internal static StackPanel CreateHeader(string text, ImageSource imageSource) - { - StackPanel stackPanel = new StackPanel(); - stackPanel.Orientation = Orientation.Horizontal; - if (imageSource != null) - stackPanel.Children.Add(new Image() { Source = imageSource, Margin = new Thickness(0, 0, 4, 0) }); - stackPanel.Children.Add(new TextBlock() { Text = text }); - - return stackPanel; - } - - internal static DependencyObject GetParent(DependencyObject obj, int levels = 1) - { - DependencyObject result = obj, t; - - for (int i = 0; i < levels; i++) - { - if ((t = VisualTreeHelper.GetParent(result)) == null) - break; - - result = t; - } - - return result; - } - - internal static TObject FindVisualParent(UIElement child) where TObject : UIElement - { - if (child == null) - { - return null; - } - - UIElement parent = VisualTreeHelper.GetParent(child) as UIElement; - - while (parent != null) - { - TObject found = parent as TObject; - if (found != null) - { - return found; - } - else - { - parent = VisualTreeHelper.GetParent(parent) as UIElement; - } - } - - return null; - } - - internal static IEnumerable FindVisualChildren(DependencyObject depObj) where T : DependencyObject - { - if (depObj != null) - { - for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++) - { - DependencyObject child = VisualTreeHelper.GetChild(depObj, i); - if (child != null && child is T) - { - yield return (T)child; - } - - foreach (T childOfChild in FindVisualChildren(child)) - { - yield return childOfChild; - } - } - } - } - - - private static Dictionary installedApps = new Dictionary(); - internal static Dictionary InstalledApps - { - get { return installedApps; } - - private set { installedApps = value; } - } - - internal static void StoreInstalledApplications() - { - string keyName; - - // store: CurrentUser - keyName = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; - StoreSubKey(Registry.CurrentUser, keyName); - - // store: LocalMachine_32 - keyName = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; - StoreSubKey(Registry.LocalMachine, keyName); - - // store: LocalMachine_64 - keyName = @"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"; - StoreSubKey(Registry.LocalMachine, keyName); - } - - private static void StoreSubKey(RegistryKey root, string subKeyName) - { - RegistryKey subkey; - string displayName; - string pathName; - - using (RegistryKey key = root.OpenSubKey(subKeyName)) - { - if (key != null) - { - foreach (string kn in key.GetSubKeyNames()) - { - using (subkey = key.OpenSubKey(kn)) - { - displayName = (subkey.GetValue("DisplayName") as string); - pathName = (subkey.GetValue("InstallLocation") as string); - - if (displayName != null && displayName != string.Empty && !installedApps.ContainsKey(displayName)) - installedApps.Add(displayName, pathName); - - //if (displayName != null && displayName.Replace(" ", "").ToLower().Contains(p_name.ToLower())) - //return true; - } - } - } - } - } - - - /// - /// - /// - /// VisualStudio2015, VisualStudio2013, VisualStudio2012, VisualStudio2010 - /// - internal static bool CheckVisualStudioExistance(string version) - { - string src = string.Empty; - switch (version) - { - case "VisualStudio2015": - src = @"VisualStudio\14.0"; - break; - case "VisualStudio2013": - src = @"VisualStudio\12.0"; - break; - case "VisualStudio2012": - src = @"VisualStudio\11.0"; - break; - case "VisualStudio2010": - src = @"VisualStudio\10.0"; - break; - default: - return true; - //case "CSExpress2010": - // src = @"VCSExpress\10.0"; - // break; - } - - using (Microsoft.Win32.RegistryKey Key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\" + src)) - if (Key != null) - { - return true; - } - - return false; - } - - internal static void RenderPicture(ref Image picture, string path, int maxWidth, int maxHeight) - { - if (!File.Exists(path)) - { - EditorCommands.ShowOutputMessage("Error loading Images"); - return; - } - - BitmapImage image = new BitmapImage(); - image.BeginInit(); // AppDomain.CurrentDomain.BaseDirectory + @"\Tutorials\FirstSteps\Pictures\" - image.UriSource = new Uri(path, UriKind.Absolute); - image.CacheOption = BitmapCacheOption.OnLoad; - image.EndInit(); - - if (image.Width < maxWidth && image.Height < maxHeight) - { - picture.Width = image.Width; - picture.Height = image.Height; - } - else - { - double ratioX = (double)maxWidth / (double)image.Width; - double ratioY = (double)maxHeight / (double)image.Height; - // use whichever multiplier is smaller - double ratio = ratioX < ratioY ? ratioX : ratioY; - - // now we can get the new height and width - int newWidth = Convert.ToInt32(image.Width * ratio); - int newHeight = Convert.ToInt32(image.Height * ratio); - - picture.Width = newWidth; - picture.Height = newHeight; - } - - picture.Source = image; - - } - - - internal static void SelectAnotherElement(DependencyObject obj) where T : FrameworkElement - { - FrameworkElement parent = (FrameworkElement)(obj as T).Parent; - while (parent != null && parent is IInputElement && !((IInputElement)parent).Focusable) - { - parent = (FrameworkElement)parent.Parent; - } - - DependencyObject scope = FocusManager.GetFocusScope((obj as T)); - FocusManager.SetFocusedElement(scope, parent as IInputElement); - } - - internal static bool isDirectory(string fullPath) - { - FileAttributes attr = File.GetAttributes(fullPath); - - //detect whether its a directory or file - if ((attr & FileAttributes.Directory) == FileAttributes.Directory) - return true; - - return false; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/InsertionAdorner.cs b/Editor/CLEngine.Editor/core/InsertionAdorner.cs deleted file mode 100644 index 4e2ed3daebc33c0dbbb33303e4d1ee2349902a18..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/InsertionAdorner.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System.Windows; -using System.Windows.Documents; -using System.Windows.Media; - -namespace CLEngine.Editor.core -{ - public class InsertionAdorner : Adorner - { - private bool isSeparatorHorizontal; - public bool IsInFirstHalf { get; set; } - private AdornerLayer adornerLayer; - private static Pen pen; - private static PathGeometry triangle; - - // Create the pen and triangle in a static constructor and freeze them to improve performance. - static InsertionAdorner() - { - pen = new Pen { Brush = Brushes.Gray, Thickness = 2 }; - pen.Freeze(); - - LineSegment firstLine = new LineSegment(new Point(0, -5), false); - firstLine.Freeze(); - LineSegment secondLine = new LineSegment(new Point(0, 5), false); - secondLine.Freeze(); - - PathFigure figure = new PathFigure { StartPoint = new Point(5, 0) }; - figure.Segments.Add(firstLine); - figure.Segments.Add(secondLine); - figure.Freeze(); - - triangle = new PathGeometry(); - triangle.Figures.Add(figure); - triangle.Freeze(); - } - - public InsertionAdorner(bool isSeparatorHorizontal, bool isInFirstHalf, UIElement adornedElement, AdornerLayer adornerLayer) - : base(adornedElement) - { - this.isSeparatorHorizontal = isSeparatorHorizontal; - this.IsInFirstHalf = isInFirstHalf; - this.adornerLayer = adornerLayer; - this.IsHitTestVisible = false; - - this.adornerLayer.Add(this); - } - - // This draws one line and two triangles at each end of the line. - protected override void OnRender(DrawingContext drawingContext) - { - Point startPoint; - Point endPoint; - - CalculateStartAndEndPoint(out startPoint, out endPoint); - drawingContext.DrawLine(pen, startPoint, endPoint); - - if (this.isSeparatorHorizontal) - { - DrawTriangle(drawingContext, startPoint, 0); - DrawTriangle(drawingContext, endPoint, 180); - } - else - { - DrawTriangle(drawingContext, startPoint, 90); - DrawTriangle(drawingContext, endPoint, -90); - } - } - - private void DrawTriangle(DrawingContext drawingContext, Point origin, double angle) - { - drawingContext.PushTransform(new TranslateTransform(origin.X, origin.Y)); - drawingContext.PushTransform(new RotateTransform(angle)); - - drawingContext.DrawGeometry(pen.Brush, null, triangle); - - drawingContext.Pop(); - drawingContext.Pop(); - } - - private void CalculateStartAndEndPoint(out Point startPoint, out Point endPoint) - { - startPoint = new Point(); - endPoint = new Point(); - - double width = this.AdornedElement.RenderSize.Width; - double height = this.AdornedElement.RenderSize.Height; - - if (this.isSeparatorHorizontal) - { - endPoint.X = width; - if (!this.IsInFirstHalf) - { - startPoint.Y = height; - endPoint.Y = height; - } - } - else - { - endPoint.Y = height; - if (!this.IsInFirstHalf) - { - startPoint.X = width; - endPoint.X = width; - } - } - } - - public void Detach() - { - this.adornerLayer.Remove(this); - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/LayoutHelper.cs b/Editor/CLEngine.Editor/core/LayoutHelper.cs deleted file mode 100644 index 2faf303bcbf40fe76a91409755b59e28cf45ff11..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/LayoutHelper.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Xceed.Wpf.AvalonDock; -using Xceed.Wpf.AvalonDock.Layout.Serialization; - -namespace CLEngine.Editor.core -{ - public static class LayoutHelper - { - private const string layoutPath = @".\Layout\"; - private const string layoutExtension = ".layout"; - - public static string LayoutExtension { get { return layoutExtension; } } - - public static DockingManager DockManager { get; set; } - - public static void LoadCDefaultLayout() - { - EditorCommands.ShowOutputMessage("试图加载默认布局"); - if (LoadLayout("Default")) - EditorCommands.ShowOutputMessage("默认布局已成功加载"); - else - EditorCommands.ShowOutputMessage("默认布局已成功加载"); - } - - public static bool LoadLayout(string layoutName) - { - if (!LayoutExists(layoutName)) - { - layoutName = "Default"; - } - - try - { - var serializer = new XmlLayoutSerializer(DockManager); - using (var stream = new StreamReader(string.Format(layoutPath + "{0}" + layoutExtension, layoutName))) - serializer.Deserialize(stream); - - Properties.Settings.Default.Layout = layoutName; - } - catch (Exception) - { - return false; - } - // loaded successfully - return true; - } - - public static bool LayoutExists(string layoutName) - { - layoutName = layoutName.Trim(); - string path = layoutPath + layoutName + layoutExtension; - if (System.IO.File.Exists(path)) - return true; - return false; - } - - public static bool RenameLayout(string newLayoutName) - { - if (!newLayoutName.Equals("Default") && !Properties.Settings.Default.Layout.Equals("Default")) - { - // 尝试删除当前布局 - if (RemoveLayout(Properties.Settings.Default.Layout)) - // 尝试使用新名称创建新布局 - if (CreateNewLayout(newLayoutName)) - return true; // renamed successfully - } - - return false; - } - public static bool CreateNewLayout(string layoutName) - { - if (layoutName.Trim().Equals(string.Empty)) return false; - - EditorCommands.ShowOutputMessage("试图创建一个新的布局"); - - if (layoutName.Equals("Default")) - { - EditorCommands.ShowOutputMessage("无法覆盖默认布局"); - return false; - } - - if (RemoveLayout(layoutName)) - EditorCommands.ShowOutputMessage("试图替换布局"); - - try - { - EditorCommands.ShowOutputMessage("试图保存布局"); - var serializer = new Xceed.Wpf.AvalonDock.Layout.Serialization.XmlLayoutSerializer(DockManager); - using (var stream = new StreamWriter(layoutPath + layoutName + LayoutExtension)) - serializer.Serialize(stream); - - EditorCommands.ShowOutputMessage("布局已成功保存"); - } - catch (Exception) - { - EditorCommands.ShowOutputMessage("布局保存尝试失败"); - return false; - } - - Properties.Settings.Default.Layout = layoutName; - return true; - } - - public static List GetLayouts() - { - List Layouts = new List(); - - foreach (var layout in System.IO.Directory.GetFiles(layoutPath, "*.layout")) - { - string name = System.IO.Path.GetFileNameWithoutExtension(layout); - if (!name.Equals("Default")) - Layouts.Add(name); - } - - return Layouts; - } - - - public static bool RemoveLayout(string layoutName) - { - EditorCommands.ShowOutputMessage("试图删除布局"); - if (layoutName.Equals("Default")) - { - EditorCommands.ShowOutputMessage("无法删除默认布局"); - return false; - } - - if (LayoutExists(layoutName)) - try - { - System.IO.File.Delete(layoutPath + layoutName + layoutExtension); - if (Properties.Settings.Default.Layout == layoutName) - { - Properties.Settings.Default.Layout = string.Empty; - } - } - catch { EditorCommands.ShowOutputMessage("尝试删除布局失败"); return false; } - - return true; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/LeftMarginMultiplierConverter.cs b/Editor/CLEngine.Editor/core/LeftMarginMultiplierConverter.cs deleted file mode 100644 index 413acc77b695c6958a24fc394fa59a4d19edaf7b..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/LeftMarginMultiplierConverter.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Media; - -namespace CLEngine.Editor.core -{ - public class LeftMarginMultiplierConverter : IValueConverter - { - public double Length { get; set; } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - var item = value as TreeViewItem; - if (item == null) - return new Thickness(0); - - return new Thickness(Length * item.GetDepth(), 0, 0, 0); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } - - public static class TreeViewItemExtensions - { - public static int GetDepth(this TreeViewItem item) - { - TreeViewItem parent; - while ((parent = GetParent(item)) != null) - { - return GetDepth(parent) + 1; - } - - return 0; - } - - private static TreeViewItem GetParent(TreeViewItem item) - { - var parent = VisualTreeHelper.GetParent(item); - while (!(parent is TreeViewItem || parent is TreeView)) - if (parent != null) parent = VisualTreeHelper.GetParent(parent); - - return parent as TreeViewItem; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/LimeScriptEditor.cs b/Editor/CLEngine.Editor/core/LimeScriptEditor.cs deleted file mode 100644 index e0fddec953a2c3fe545c554b8e2bacda00746439..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/LimeScriptEditor.cs +++ /dev/null @@ -1,28 +0,0 @@ -using CLEngine.Editor.windows; - -namespace CLEngine.Editor.core -{ - public class LimeScriptEditor - { - private static ScriptingEditorWindow _instance; - - public static ScriptingEditorWindow Instance - { - get - { - if (_instance == null || !_instance.IsVisible) - { - _instance = new ScriptingEditorWindow(); - _instance.Show(); - } - - return _instance; - } - } - - public static void OpenScript(string path) - { - Instance.OpenScript(path); - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/OutputMessage.cs b/Editor/CLEngine.Editor/core/OutputMessage.cs deleted file mode 100644 index 9ef65d67b4be33528bf28e0b2349ab55b31b9e3d..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/OutputMessage.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace CLEngine.Editor.core -{ - public class OutputMessage - { - public string Time { get; set; } - public string Message { get; set; } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/Page.cs b/Editor/CLEngine.Editor/core/Page.cs deleted file mode 100644 index 75d8bf63822356d365d022ad9eacdbf825247348..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/Page.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace CLEngine.Editor.core -{ - public class Page - { - #region Properties - - public string Subtitle { get; private set; } - public string Description { get; private set; } - public string PicturePath { get; private set; } - - #endregion - - #region Constructors - - public Page() - { - this.Subtitle = string.Empty; - this.Description = string.Empty; - } - public Page(string subtitle, string description, string picturePath) - { - this.Subtitle = subtitle; - this.Description = description; - this.PicturePath = picturePath; - } - - #endregion - - #region Methods - - #endregion - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/core/TreeViewExtension.cs b/Editor/CLEngine.Editor/core/TreeViewExtension.cs deleted file mode 100644 index 300cbb300c8950881ed7040cf9fca6f30db99a5d..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/core/TreeViewExtension.cs +++ /dev/null @@ -1,309 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; - -namespace CLEngine.Editor.core -{ - public class TreeViewExtension : DependencyObject - { - public static bool GetEnableMultiSelect(DependencyObject obj) - { - return (bool)obj.GetValue(EnableMultiSelectProperty); - } - - public static void SetEnableMultiSelect(DependencyObject obj, bool value) - { - obj.SetValue(EnableMultiSelectProperty, value); - } - - // Using a DependencyProperty as the backing store for EnableMultiSelect. This enables animation, styling, binding, etc... - public static readonly DependencyProperty EnableMultiSelectProperty = - DependencyProperty.RegisterAttached("EnableMultiSelect", typeof(bool), typeof(TreeViewExtension), new FrameworkPropertyMetadata(false) - { - PropertyChangedCallback = EnableMultiSelectChanged, - BindsTwoWayByDefault = true - }); - - public static IList GetSelectedItems(DependencyObject obj) - { - return (IList)obj.GetValue(SelectedItemsProperty); - } - - public static void SetSelectedItems(DependencyObject obj, IList value) - { - obj.SetValue(SelectedItemsProperty, value); - } - - // Using a DependencyProperty as the backing store for SelectedItems. This enables animation, styling, binding, etc... - public static readonly DependencyProperty SelectedItemsProperty = - DependencyProperty.RegisterAttached("SelectedItems", typeof(IList), typeof(TreeViewExtension), new PropertyMetadata(null)); - - static TreeViewItem GetAnchorItem(DependencyObject obj) - { - return (TreeViewItem)obj.GetValue(AnchorItemProperty); - } - - static void SetAnchorItem(DependencyObject obj, TreeViewItem value) - { - obj.SetValue(AnchorItemProperty, value); - } - - // Using a DependencyProperty as the backing store for AnchorItem. This enables animation, styling, binding, etc... - static readonly DependencyProperty AnchorItemProperty = - DependencyProperty.RegisterAttached("AnchorItem", typeof(TreeViewItem), typeof(TreeViewExtension), new PropertyMetadata(null)); - - static void EnableMultiSelectChanged(DependencyObject s, DependencyPropertyChangedEventArgs args) - { - TreeView tree = (TreeView)s; - var wasEnable = (bool)args.OldValue; - var isEnabled = (bool)args.NewValue; - if (wasEnable) - { - tree.RemoveHandler(TreeViewItem.PreviewMouseUpEvent, new MouseButtonEventHandler(ItemClicked)); - tree.RemoveHandler(TreeViewItem.PreviewMouseDownEvent, new MouseButtonEventHandler(ItemDown)); - tree.RemoveHandler(TreeView.KeyDownEvent, new KeyEventHandler(KeyDown)); - } - if (isEnabled) - { - tree.AddHandler(TreeViewItem.PreviewMouseUpEvent, new MouseButtonEventHandler(ItemClicked)); - tree.AddHandler(TreeViewItem.PreviewMouseDownEvent, new MouseButtonEventHandler(ItemDown), true); - tree.AddHandler(TreeView.KeyDownEvent, new KeyEventHandler(KeyDown)); - } - } - - static void ItemClicked(object sender, MouseButtonEventArgs e) - { - TreeViewItem _item = FindTreeViewItem(e.OriginalSource); - if (_item == null) - return; - - var mouseButton = e.ChangedButton; - if ((mouseButton == MouseButton.Left) && ((Keyboard.Modifiers & (ModifierKeys.Shift | ModifierKeys.Control)) == ModifierKeys.None)) - { - TreeViewItem item = FindTreeViewItem(e.OriginalSource); - MakeSingleSelection(GetTree(item), item); - - return; - } - } - - static void ItemDown(object sender, MouseButtonEventArgs e) - { - TreeViewItem item = FindTreeViewItem(e.OriginalSource); - if (item == null) - return; - - TreeView tree = (TreeView)sender; - - var mouseButton = e.ChangedButton; - if (mouseButton != MouseButton.Left) - { - if ((mouseButton == MouseButton.Right) && ((Keyboard.Modifiers & (ModifierKeys.Shift | ModifierKeys.Control)) == ModifierKeys.None)) - { - if (GetIsSelected(item)) - { - UpdateAnchorAndActionItem(tree, item); - return; - } - - if (!GetIsSelected(item)) // item is already selected? - MakeSingleSelection(tree, item); - } - - return; - } - if ((Keyboard.Modifiers & (ModifierKeys.Shift | ModifierKeys.Control)) != (ModifierKeys.Shift | ModifierKeys.Control)) - { - if ((Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) - { - MakeToggleSelection(tree, item); - return; - } - if ((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift) - { - MakeAnchorSelection(tree, item, true); - return; - } - - if (!GetIsSelected(item)) // item is already selected? - MakeSingleSelection(tree, item); - - return; - } - } - - public static TreeView GetTree(TreeViewItem item) - { - Func getParent = (o) => VisualTreeHelper.GetParent(o); - FrameworkElement currentItem = item; - while (!(getParent(currentItem) is TreeView)) - currentItem = (FrameworkElement)getParent(currentItem); - return (TreeView)getParent(currentItem); - } - - static void RealSelectedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) - { - TreeViewItem item = (TreeViewItem)sender; - - var selectedItems = GetSelectedItems(GetTree(item)); - if (selectedItems != null) - { - var isSelected = GetIsSelected(item); - if (isSelected) - try - { - selectedItems.Add(item.Header); - } - catch (ArgumentException) - { - - } - else - { - selectedItems.Remove(item.Header); - } - } - } - - static void KeyDown(object sender, KeyEventArgs e) - { - TreeView tree = (TreeView)sender; - if (e.Key == Key.A && e.KeyboardDevice.Modifiers == ModifierKeys.Control) - { - foreach (var item in GetExpandedTreeViewItems(tree)) - { - SetIsSelected(item, true); - } - e.Handled = true; - } - } - - private static TreeViewItem FindTreeViewItem(object obj) - { - DependencyObject dpObj = obj as DependencyObject; - if (dpObj == null) - return null; - if (dpObj is TreeViewItem) - return (TreeViewItem)dpObj; - return FindTreeViewItem(VisualTreeHelper.GetParent(dpObj)); - } - - public static IEnumerable GetExpandedTreeViewItems(ItemsControl tree) - { - for (int i = 0; i < tree.Items.Count; i++) - { - var item = (TreeViewItem)tree.ItemContainerGenerator.ContainerFromIndex(i); - if (item == null) - continue; - yield return item; - if (item.IsExpanded) - foreach (var subItem in GetExpandedTreeViewItems(item)) - yield return subItem; - } - } - - private static void MakeAnchorSelection(TreeView tree, TreeViewItem actionItem, bool clearCurrent) - { - if (GetAnchorItem(tree) == null) - { - var selectedItems = GetSelectedTreeViewItems(tree); - if (selectedItems.Count > 0) - { - SetAnchorItem(tree, selectedItems[selectedItems.Count - 1]); - } - else - { - SetAnchorItem(tree, GetExpandedTreeViewItems(tree).Skip(3).FirstOrDefault()); - } - if (GetAnchorItem(tree) == null) - { - return; - } - } - - var anchor = GetAnchorItem(tree); - - var items = GetExpandedTreeViewItems(tree); - bool betweenBoundary = false; - bool end = false; - foreach (var item in items) - { - bool isBoundary = item == anchor || item == actionItem; - if (isBoundary) - { - betweenBoundary = !betweenBoundary; - } - if (betweenBoundary || isBoundary) - SetIsSelected(item, true); - else - if (clearCurrent) - SetIsSelected(item, false); - else - break; - - } - } - - public static List GetSelectedTreeViewItems(TreeView tree) - { - return GetExpandedTreeViewItems(tree).Where(i => GetIsSelected(i)).ToList(); - } - - private static void MakeSingleSelection(TreeView tree, TreeViewItem item) - { - foreach (TreeViewItem selectedItem in GetExpandedTreeViewItems(tree)) - { - if (selectedItem == null) - continue; - if (selectedItem != item) - SetIsSelected(selectedItem, false); - else - { - SetIsSelected(selectedItem, true); - } - } - UpdateAnchorAndActionItem(tree, item); - } - - public static void UnselectAll(TreeView tree) - { - foreach (TreeViewItem selectedItem in GetExpandedTreeViewItems(tree)) - { - SetIsSelected(selectedItem, false); - } - } - - private static void MakeToggleSelection(TreeView tree, TreeViewItem item) - { - SetIsSelected(item, !GetIsSelected(item)); - UpdateAnchorAndActionItem(tree, item); - } - - private static void UpdateAnchorAndActionItem(TreeView tree, TreeViewItem item) - { - SetAnchorItem(tree, item); - } - - public static bool GetIsSelected(DependencyObject obj) - { - return (bool)obj.GetValue(IsSelectedProperty); - } - - public static void SetIsSelected(DependencyObject obj, bool value) - { - obj.SetValue(IsSelectedProperty, value); - } - - // Using a DependencyProperty as the backing store for IsSelected. This enables animation, styling, binding, etc... - public static readonly DependencyProperty IsSelectedProperty = - DependencyProperty.RegisterAttached("IsSelected", typeof(bool), typeof(TreeViewExtension), new PropertyMetadata(false) - { - PropertyChangedCallback = RealSelectedChanged - }); - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/graphics_device/GameControl.cs b/Editor/CLEngine.Editor/graphics_device/GameControl.cs deleted file mode 100644 index 0ae170a662bbd9e5d78066dfe1e1f8ab6b67e041..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/graphics_device/GameControl.cs +++ /dev/null @@ -1,15 +0,0 @@ -using CLEngine.Core; - -namespace CLEngine.Editor.graphics_device -{ - public class GameControl : GraphicsDeviceControl - { - private Camera camera = new Camera(); - - internal Camera Camera - { - get { return camera; } - set { camera = value; } - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/graphics_device/GraphicsDeviceControl.cs b/Editor/CLEngine.Editor/graphics_device/GraphicsDeviceControl.cs deleted file mode 100644 index 5ef8aad75ec4f3ed11c174e4a48a17202ecf8004..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/graphics_device/GraphicsDeviceControl.cs +++ /dev/null @@ -1,29 +0,0 @@ -using CLEngine.Core; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using MonoGame.Framework.WpfInterop; -using MonoGame.Framework.WpfInterop.Input; - -namespace CLEngine.Editor.graphics_device -{ - public abstract class GraphicsDeviceControl : WpfGame - { - public IGraphicsDeviceService graphicsDeviceManager; - public WpfKeyboard keyboard; - public WpfMouse mouse; - - protected GraphicsDeviceControl() - { - - } - - protected override void Initialize() - { - graphicsDeviceManager = new WpfGraphicsDeviceService(this); - keyboard = new WpfKeyboard(this); - mouse = new WpfMouse(this); - - base.Initialize(); - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/graphics_device/SceneViewGameControl.cs b/Editor/CLEngine.Editor/graphics_device/SceneViewGameControl.cs deleted file mode 100644 index f4a62957bfcea426dd511873d341ef4093be82d9..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/graphics_device/SceneViewGameControl.cs +++ /dev/null @@ -1,1616 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Windows.Forms; -using CLEngine.Editor.core; -using CLEngine.Editor.model; -using CLEngine.Core; -using FarseerPhysics; -using FarseerPhysics.Dynamics; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Content; -using Microsoft.Xna.Framework.Graphics; -using ButtonState = Microsoft.Xna.Framework.Input.ButtonState; -using Keys = Microsoft.Xna.Framework.Input.Keys; - -namespace CLEngine.Editor.graphics_device -{ - internal enum EditorModes { Select, Move, Rotate, Scale } - - internal enum EditorMapModes - { - None, - AddCollison, - Opacity - } - - internal enum TilesetModes { Pencil, Rectangle, Eraser, AddColumn, AddRow, RemoveColumn, RemoveRow } - - public class SceneViewGameControl : GameControl - { - private const int HANDLER_SIZE = 24; - private const int AXIS_OFFSET = 65; - private const int AXIS_OPT_SIZE = 18; - private bool usingYAxis = false; - private bool usingXAxis = false; - private bool hoverYAxis = false; - private bool hoverXAxis = false; - - private EditorMapModes editorMapMode = EditorMapModes.None; - private EditorModes editorMode = EditorModes.Select; - private bool leftMouseKeyDown; - private bool rightMouseKeyDown; - private Vector2 mouseWorldPosition; - private TilesetModes tilesetMode = TilesetModes.Pencil; - private Rectangle selectionArea; - private ContentManager content; - private SpriteBatch spriteBatch; - private bool initialized = false; - private BitmapFontRenderer bmFontRenderer; - private Vector2 selectionStart; - private Vector2 selectionEnd; - private Vector2 mouseLastPosition = Vector2.Zero; - private bool takingScreenshot = false; - private bool lastLeftKeyState; - private float delta; - private float scrollerValue; - - private bool tilesetDragStarted = false; - private Vector2 tilesetMouseDownPos; - private Rectangle tilesetSelectedArea; - private Vector2 panStart; - private Tile[,] memTiles; - private bool objectHandled; - - private bool mouseDragStarted = false; - - private Dictionary objectIcons = new Dictionary(); - private List sceneGameObjects = new List(); - private Dictionary beforeState = new Dictionary(); - - public bool MiddleMouseKeyDown { get; set; } - - public bool TileSetMode - { - get - { - return (EditorHandler.SelectedGameObjects.Count == 1 && EditorHandler.SelectedGameObjects[0] is Tileset); - } - } - - internal EditorModes EditorMode - { - get { return editorMode; } - set { editorMode = value; } - } - - internal TilesetModes TilesetMode - { - get { return tilesetMode; } - set { tilesetMode = value; } - } - - public Rectangle SelectionArea - { - get { return selectionArea; } - set { selectionArea = value; } - } - - public Rectangle MouseBoundingBox - { - get { return new Rectangle((int)mouseWorldPosition.X, (int)mouseWorldPosition.Y, 1, 1); } - } - - public bool LeftMouseKeyDown - { - get { return leftMouseKeyDown; } - set - { - leftMouseKeyDown = value; - } - } - - public bool RightMouseKeyDown - { - get { return rightMouseKeyDown; } - set { rightMouseKeyDown = value; } - } - - internal EditorMapModes EditorMapMode - { - get { return editorMapMode; } - set { editorMapMode = value; } - } - - private bool selectionStarted = false; - private Vector2 panMouseLastPos; - private bool panStarted; - private bool leftMouseKeyStateChanged = false; - public bool LeftMouseKeyPressed { get; set; } - private Vector2 mouseClickPosition = Vector2.Zero; - - public Vector2 SnapToTilesetGrid(Vector2 input) - { - Vector2 result = input; - result.X = ((Tileset) EditorHandler.SelectedGameObjects[0]).TileWidth * (int)Math.Floor(result.X / ((Tileset) EditorHandler.SelectedGameObjects[0]).TileWidth); - result.Y = ((Tileset) EditorHandler.SelectedGameObjects[0]).TileHeight * (int)Math.Floor(result.Y / ((Tileset) EditorHandler.SelectedGameObjects[0]).TileHeight); - - return result; - } - - protected override void Initialize() - { - if (!initialized) - { - base.Initialize(); - - content = new ContentManager(Services, "Content"); - spriteBatch = new SpriteBatch(GraphicsDevice); - - SceneManager.SpriteBatch = spriteBatch; - SceneManager.GraphicsDevice = GraphicsDevice; - SceneManager.ActiveCamera = Camera; - SceneManager.Content = Content; - - EditorHandler.SelectedGameObjects = new List(); - - objectIcons["AudioObject"] = TextureLoader.FromFile(AppDomain.CurrentDomain.BaseDirectory + "\\content\\audio.png"); - objectIcons["EventObject"] = TextureLoader.FromFile(AppDomain.CurrentDomain.BaseDirectory + "\\content\\event.png"); - - FontFile fontFile = FontLoader.Load(AppDomain.CurrentDomain.BaseDirectory + "\\content\\editorBMFont.fnt"); - Texture2D fontTexture = TextureLoader.FromFile(AppDomain.CurrentDomain.BaseDirectory + "\\content\\editorBMFont_0.png"); - bmFontRenderer = new BitmapFontRenderer(fontFile, fontTexture); - - CenterCamera(); - - initialized = true; - } - } - - public void SetMousePosition(Vector2 pos) - { - controlPosition = pos; - mouseWorldPosition = Vector2.Transform(pos, Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)); - } - - public void CenterCamera() - { - SceneManager.ActiveCamera.Position = new Vector2(0, 0); - } - - public void CenterCameraObject() - { - if (EditorHandler.SelectedGameObjects.Count > 0) - { - SceneManager.ActiveCamera.Position = - new Vector2(EditorHandler.SelectedGameObjects[0].Transform.Position.X, - EditorHandler.SelectedGameObjects[0].Transform.Position.Y); - } - } - - Vector2 controlPosition; - - protected override void Update(GameTime gameTime) - { - base.Update(gameTime); - - GameInput.KeyboardState = keyboard.GetState(); - GameInput.MouseState = mouse.GetState(); - - LeftMouseKeyDown = mouse.GetState().LeftButton == ButtonState.Pressed; - MiddleMouseKeyDown = mouse.GetState().MiddleButton == ButtonState.Pressed; - RightMouseKeyDown = mouse.GetState().RightButton == ButtonState.Pressed; - SetMousePosition(mouse.GetState().Position.ToVector2()); - - int mwheeldelta = mouse.GetState().ScrollWheelValue; - if (mwheeldelta - scrollerValue > 0) - { - float zoom = (float)Math.Round(SceneManager.ActiveCamera.Zoom * 100f) + 10.0f; - SceneManager.ActiveCamera.Zoom = zoom / 100f; - scrollerValue = mwheeldelta; - } - if (mwheeldelta - scrollerValue < 0) - { - float zoom = (float)Math.Round(SceneManager.ActiveCamera.Zoom * 100f) - 10.0f; - SceneManager.ActiveCamera.Zoom = zoom / 100f; - scrollerValue = mwheeldelta; - } - - if (SceneManager.GameProject != null) - { - GlobalInput(); - } - - if (SceneManager.ActiveScene != null) - { - if (this.Focusable) - { - // Update list of gameObjects: - sceneGameObjects = GameObject.GetAllGameObjects(); - - Input(gameTime); - } - } - - SceneManager.Update(gameTime); - - mouseLastPosition = new Vector2(mouseWorldPosition.X, mouseWorldPosition.Y); - } - - public void Input(GameTime gameTime) - { - delta = (float)gameTime.ElapsedGameTime.Milliseconds; - if (GameInput.IsKeyDown(Keys.LeftShift)) delta *= 3; - - //Console.WriteLine(MousePosition.X); - - if (leftMouseKeyDown) - { - if (!mouseDragStarted) - { - //mouseClickPosition = mouseWorldPosition; - mouseDragStarted = true; - } - } - else - { - mouseDragStarted = false; - } - - // Camera Movement - if ((GameInput.IsKeyDown(Keys.W)) && GameInput.IsKeyUp(Keys.LeftControl)) SceneManager.ActiveCamera.Position += (new Vector2(0, -delta)); - if ((GameInput.IsKeyDown(Keys.S)) && GameInput.IsKeyUp(Keys.LeftControl)) SceneManager.ActiveCamera.Position += (new Vector2(0, +delta)); - if ((GameInput.IsKeyDown(Keys.A)) && GameInput.IsKeyUp(Keys.LeftControl)) SceneManager.ActiveCamera.Position += (new Vector2(-delta, 0)); - if ((GameInput.IsKeyDown(Keys.D)) && GameInput.IsKeyUp(Keys.LeftControl)) SceneManager.ActiveCamera.Position += (new Vector2(+delta, 0)); - - if (GameInput.IsKeyPressed(Keys.Down)) - foreach (GameObject obj in EditorHandler.SelectedGameObjects) - obj.Transform.Translate(Vector2.UnitY); - else if (GameInput.IsKeyPressed(Keys.Up)) - foreach (GameObject obj in EditorHandler.SelectedGameObjects) - obj.Transform.Translate(-Vector2.UnitY); - else if (GameInput.IsKeyPressed(Keys.Right)) - foreach (GameObject obj in EditorHandler.SelectedGameObjects) - obj.Transform.Translate(Vector2.UnitX); - - else if (GameInput.IsKeyPressed(Keys.Left)) - foreach (GameObject obj in EditorHandler.SelectedGameObjects) - obj.Transform.Translate(-Vector2.UnitX); - - - // Camera Zoom - if (GameInput.IsKeyDown(Keys.OemPlus)) SceneManager.ActiveCamera.Zoom += 0.01f; - if (GameInput.IsKeyDown(Keys.OemMinus)) SceneManager.ActiveCamera.Zoom -= 0.01f; - if (GameInput.IsKeyDown(Keys.D0)) SceneManager.ActiveCamera.Zoom = 1.0f; - - if (leftMouseKeyDown && !lastLeftKeyState) - { - LeftMouseKeyPressed = true; - } - else - { - LeftMouseKeyPressed = false; - } - - if (lastLeftKeyState != leftMouseKeyDown) - { - leftMouseKeyStateChanged = true; - } - - if (leftMouseKeyDown && leftMouseKeyStateChanged) - { - mouseClickPosition = new Vector2(mouseWorldPosition.X, mouseWorldPosition.Y); - leftMouseKeyStateChanged = false; - } - - lastLeftKeyState = leftMouseKeyDown; - - // mouse span - if (MiddleMouseKeyDown) - { - if (!panStarted) - { - panStarted = true; - panStart = mouseWorldPosition; - } - else - { - if (panMouseLastPos != mouseWorldPosition) - { - Vector2 alpha = mouseWorldPosition - panStart; - - SceneManager.ActiveCamera.Position = new Vector2() - { - X = (int)(SceneManager.ActiveCamera.Position.X - alpha.X), - Y = (int)(SceneManager.ActiveCamera.Position.Y - alpha.Y) - }; - - panMouseLastPos = mouseWorldPosition; - } - } - } - else - { - panStart = Vector2.Zero; - panStarted = false; - } - - if (GameInput.IsKeyDown(Keys.O)) CenterCameraObject(); - else if (GameInput.IsKeyPressed(Keys.C) && !GameInput.IsKeyDown(Keys.LeftControl)) CenterCamera(); - - if (GameInput.IsKeyDown(Keys.LeftControl) && GameInput.IsKeyPressed(Keys.Z)) EditorHandler.UnDoRedo.Undo(1); - if (GameInput.IsKeyDown(Keys.LeftControl) && GameInput.IsKeyPressed(Keys.Y)) EditorHandler.UnDoRedo.Redo(1); - - - if (GameInput.IsKeyDown(Keys.LeftControl) && GameInput.IsKeyPressed(Keys.C)) EditorCommands.CopySelectedObjects(); - if (GameInput.IsKeyDown(Keys.LeftControl) && GameInput.IsKeyPressed(Keys.V)) EditorCommands.PasteSelectedObjects(); - - //if (GameInput.IsKeyDown(Keys.LeftControl) && GameInput.IsKeyDown(Keys.C)) - //{ - // if (EditorHandler.SelectedGameObjects.Count > 0) - // { - // Clipboard.SetData("GameObject", EditorHandler.SelectedGameObjects); - // } - //} - - UpdateCurrentCursor(); - - // the selected game object is a tileset? - if (TileSetMode) - { - TilesetTool(); - } - else - { - if (editorMapMode == EditorMapModes.None || EditorHandler.SelectedGameObjects.Count == 0) - { - if (editorMode == EditorModes.Select) - SelectTool(); - else - if (!SelectedObjectInput()) // if no object was handled, select: - SelectTool(); - } - } - - if (EditorMapMode == EditorMapModes.AddCollison || EditorMapMode == EditorMapModes.Opacity) - if (LeftMouseKeyDown) - QuickSelectGrid(); - else if (RightMouseKeyDown) - QuickRemoveGrid(); - - //if (GameInput.IsKeyDown(Keys.LeftControl) && GameInput.IsKeyPressed(Keys.S)) SceneManager.SaveActiveScene(); - } - - /// - /// 快速选择网格 - /// - private void QuickSelectGrid() - { - if (EditorHandler.SelectedGameObjects.Count == 0) - return; - - if (EditorHandler.SelectedGameObjects[0] is MapObject mapObject) - { - var tileX = MathExtension.FastFloorToInt(mouseWorldPosition.X / mapObject.TileWidth); - - var x = MathHelper.Clamp(tileX, 0, mapObject.Texture.Width - 1); - - var tileY = MathExtension.FastFloorToInt(mouseWorldPosition.Y / mapObject.TileHeight); - - var y = MathHelper.Clamp(tileY, 0, mapObject.Texture.Height - 1); - - if (EditorMapMode == EditorMapModes.AddCollison) - mapObject.CollisionGrid[x][y] = 1; - else if (EditorMapMode == EditorMapModes.Opacity) - mapObject.OpacityGrid[x][y] = 1; - } - } - - private void QuickRemoveGrid() - { - if (EditorHandler.SelectedGameObjects.Count == 0) - return; - - if (EditorHandler.SelectedGameObjects[0] is MapObject mapObject) - { - var tileX = MathExtension.FastFloorToInt(mouseWorldPosition.X / mapObject.TileWidth); - - var x = MathHelper.Clamp(tileX, 0, mapObject.Texture.Width - 1); - - var tileY = MathExtension.FastFloorToInt(mouseWorldPosition.Y / mapObject.TileHeight); - - var y = MathHelper.Clamp(tileY, 0, mapObject.Texture.Height - 1); - - if (EditorMapMode == EditorMapModes.AddCollison) - mapObject.CollisionGrid[x][y] = 0; - else if (EditorMapMode == EditorMapModes.Opacity) - mapObject.OpacityGrid[x][y] = 0; - } - } - - private void SaveState() - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - beforeState[gameObject] = (Transform)gameObject.Transform.DeepCopy(); - beforeState[gameObject].GameObject = new GameObject(); - } - } - - private bool SelectedObjectInput() - { - if (EditorHandler.SelectedGameObjects.Count == 0) - { - if (!panStarted) - Cursor = System.Windows.Input.Cursors.Arrow; - - return false; - } - - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - Vector2 spos = gameObject.Transform.Position; - - Rectangle selectedObjectBoundingBox = - new Rectangle((int)spos.X - HANDLER_SIZE / 2, (int)spos.Y - HANDLER_SIZE / 2, HANDLER_SIZE, HANDLER_SIZE); - - Rectangle YAxisBoundingBox = new Rectangle((int)spos.X - AXIS_OPT_SIZE / 2, (int)spos.Y - AXIS_OFFSET - AXIS_OPT_SIZE / 2, AXIS_OPT_SIZE, AXIS_OFFSET - (HANDLER_SIZE / 2)); - Rectangle XAxisBoundingBox = new Rectangle((int)spos.X + (HANDLER_SIZE / 2), (int)spos.Y - AXIS_OPT_SIZE / 2, AXIS_OFFSET - (HANDLER_SIZE / 2) + AXIS_OPT_SIZE / 2, AXIS_OPT_SIZE); - - bool intersects = false; - - if (!objectHandled && !panStarted) - { - hoverXAxis = false; - hoverYAxis = false; - - // 鼠标与所选对象相交? - if (MouseBoundingBox.Intersects(YAxisBoundingBox)) - { - intersects = true; - hoverYAxis = true; - - CheckCursor(); // - - if (leftMouseKeyDown) - { - usingYAxis = true; - - SaveState(); - - objectHandled = true; - } - } - else if (MouseBoundingBox.Intersects(XAxisBoundingBox)) - { - intersects = true; - hoverXAxis = true; - - CheckCursor(); // - - if (leftMouseKeyDown) - { - usingXAxis = true; - - SaveState(); - - objectHandled = true; - } - } - else if ((MouseBoundingBox.Intersects(selectedObjectBoundingBox) || MouseBoundingBox.Intersects(gameObject.MeasureDimension())) && gameObject.Selectable) - { - intersects = true; - - CheckCursor(); - - if (leftMouseKeyDown) - { - // Save the current transform for Undo / Redo purposes - SaveState(); - - objectHandled = true; - } - } - } - else if (panStarted) - { - Cursor = System.Windows.Input.Cursors.Arrow; - } - - if (!leftMouseKeyDown) - { - if (objectHandled) - { - // Save Undo / Redo history - InsertUndoRedo(); - - // Snap to grid? - if (SceneManager.GameProject.EditorSettings.SnapToGrid) - { - gameObject.Transform.Position = - SnapToGrid(gameObject.Transform.Position); - } - } - - if (!intersects && !panStarted) - Cursor = System.Windows.Input.Cursors.Arrow; - - objectHandled = false; - usingYAxis = false; - usingXAxis = false; - } - } - - if (objectHandled) - { - HandleTransformations(); - } - - return objectHandled; - } - - private void InsertUndoRedo() - { - switch (editorMode) - { - case EditorModes.Move: - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - EditorHandler.UnDoRedo.InsertInUnDoRedoForMove(gameObject.Transform.Position, - beforeState[gameObject].Position, gameObject); - } - break; - case EditorModes.Scale: - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - EditorHandler.UnDoRedo.InsertInUnDoRedoForScale(gameObject.Transform.Scale, - beforeState[gameObject].Scale, gameObject); - } - break; - case EditorModes.Rotate: - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - EditorHandler.UnDoRedo.InsertInUnDoRedoForRotate(gameObject.Transform.Rotation, - beforeState[gameObject].Rotation, gameObject); - } - break; - } - - beforeState.Clear(); - } - - private bool ChildrenOfSelected(GameObject obj) - { - Transform o = obj.Transform.Parent; - while (o != null) - { - if (EditorHandler.SelectedGameObjects.Contains(o.GameObject)) - return true; - - o = o.Parent; - } - - return false; - } - - private void HandleTransformations() - { - if (editorMode == EditorModes.Move) - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - if (ChildrenOfSelected(gameObject)) continue; - - if (GameInput.IsKeyDown(Keys.X) || usingXAxis) - { - gameObject.Transform.Position = - new Vector2(gameObject.Transform.Position.X + (mouseWorldPosition.X - mouseLastPosition.X), gameObject.Transform.Position.Y); - - } - else if (GameInput.IsKeyDown(Keys.Y) || usingYAxis) - { - gameObject.Transform.Position = - new Vector2(gameObject.Transform.Position.X, gameObject.Transform.Position.Y + (mouseWorldPosition.Y - mouseLastPosition.Y)); - } - else - { - gameObject.Transform.Position += mouseWorldPosition - mouseLastPosition; - } - } - } - else if (editorMode == EditorModes.Rotate) - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - // value relative to the selected object [0] position - float value = (float)Math.Atan2(mouseWorldPosition.Y - EditorHandler.SelectedGameObjects[0].Transform.Position.Y, mouseWorldPosition.X - EditorHandler.SelectedGameObjects[0].Transform.Position.X); - - if (GameInput.IsKeyDown(Keys.Z)) - { - if (value < -((float)Math.PI / 4.0f) && value > -((float)Math.PI / 4.0f) * 3) - { - // Top Snap - gameObject.Transform.Rotation = -(float)Math.PI / 2.0f; - } - else if (value > ((float)Math.PI / 4.0f) && value < ((float)Math.PI / 4.0f) * 3) - { - // Bottom Snap - gameObject.Transform.Rotation = (float)Math.PI / 2.0f; - } - else if (value > -((float)Math.PI / 4.0f) && value < ((float)Math.PI / 4.0f)) - { - // Right Snap - gameObject.Transform.Rotation = 0.0f; - } - else - { - // Left Snap - gameObject.Transform.Rotation = (float)Math.PI; - } - } - else - { - gameObject.Transform.Rotation = value; - } - } - } - else if (editorMode == EditorModes.Scale) - { - // todo: proportional scale - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - // SCALE A = ? - // POSI = X (X => primeiro clique) -- 100% - // POSA = SCALE A - if (usingYAxis) - { - gameObject.Transform.Scale = new Vector2(gameObject.Transform.Scale.X, Math.Abs(((gameObject.Transform.Position.Y - mouseWorldPosition.Y) * beforeState[gameObject].Scale.Y / (gameObject.Transform.Position.Y - mouseClickPosition.Y)))); - } - else if (usingXAxis) - { - gameObject.Transform.Scale = new Vector2(Math.Abs((gameObject.Transform.Position.X - mouseWorldPosition.X) * beforeState[gameObject].Scale.X / (gameObject.Transform.Position.X - mouseClickPosition.X)), gameObject.Transform.Scale.Y); - } - else - { - float dx = (gameObject.Transform.Position.X - mouseWorldPosition.X) - (gameObject.Transform.Position.X - mouseClickPosition.X); - float dy = (gameObject.Transform.Position.Y - mouseWorldPosition.Y) - (gameObject.Transform.Position.Y - mouseClickPosition.Y); - float h = (dx * dx) + (dy * dy); - - gameObject.Transform.Scale = new Vector2(Math.Abs((gameObject.Transform.Position.X - mouseWorldPosition.X) * beforeState[gameObject].Scale.X / (gameObject.Transform.Position.X - mouseClickPosition.X)), - Math.Abs(((gameObject.Transform.Position.Y - mouseWorldPosition.Y) * beforeState[gameObject].Scale.Y / (gameObject.Transform.Position.Y - mouseClickPosition.Y)))); - } - } - } - } - - private void CheckCursor() - { - switch (editorMode) - { - case EditorModes.Move: - if (hoverXAxis) - Cursor = System.Windows.Input.Cursors.Cross; - else if (hoverYAxis) - Cursor = System.Windows.Input.Cursors.Cross; - else - Cursor = System.Windows.Input.Cursors.Cross; - break; - case EditorModes.Rotate: - Cursor = System.Windows.Input.Cursors.Arrow; - break; - case EditorModes.Scale: - if (hoverXAxis) - Cursor = System.Windows.Input.Cursors.Arrow; - else if (hoverYAxis) - Cursor = System.Windows.Input.Cursors.Arrow; - else - Cursor = System.Windows.Input.Cursors.Arrow; - break; - default: - Cursor = System.Windows.Input.Cursors.Arrow; - break; - } - } - - public Vector2 SnapToGrid(Vector2 input) - { - Vector2 result = Vector2.Zero; - result.X = SceneManager.GameProject.EditorSettings.GridSpacing * (int)Math.Floor(input.X / SceneManager.GameProject.EditorSettings.GridSpacing); - result.Y = SceneManager.GameProject.EditorSettings.GridSpacing * (int)Math.Floor(input.Y / SceneManager.GameProject.EditorSettings.GridSpacing); - - return result; - } - - private void CheckSelectCollision() - { - if (!GameInput.IsKeyDown(Keys.LeftControl)) - EditorHandler.SelectedGameObjects = new List(); - - foreach (GameObject gameObject in sceneGameObjects) - { - if (gameObject.Visible && gameObject.Selectable && selectionArea.Intersects(gameObject.MeasureDimension())) //new Rectangle((int)gameObject.Transform.Position.X, (int)gameObject.Transform.Position.Y, 1, 1))) - { - if (selectionArea.Width <= 2 && selectionArea.Height <= 2 && !GameInput.IsKeyDown(Keys.LeftControl)) - { - EditorHandler.SelectedGameObjects.Clear(); - } - - if (!EditorHandler.SelectedGameObjects.Contains(gameObject)) - EditorHandler.SelectedGameObjects.Add(gameObject); - } - } - - Fixture detected = SceneManager.ActiveScene.World.TestPoint(ConvertUnits.ToSimUnits(mouseWorldPosition)); - if (detected != null) - { - if (detected.Body.GameObject.Visible && detected.Body.GameObject.Selectable && !EditorHandler.SelectedGameObjects.Contains(detected.Body.GameObject)) - EditorHandler.SelectedGameObjects.Add(detected.Body.GameObject); - } - - EditorHandler.SceneTreeView.SelectionUpdate(); - } - - private void SelectTool() - { - if (LeftMouseKeyDown) - { - if (!selectionStarted) - { - if (SceneManager.GameProject.EditorSettings.SnapToGrid) - { - selectionStart = SnapToGrid(new Vector2(mouseWorldPosition.X, mouseWorldPosition.Y)); - } - else - { - selectionStart = new Vector2(mouseWorldPosition.X, mouseWorldPosition.Y); - } - - selectionStarted = true; - } - else - { - if (SceneManager.GameProject.EditorSettings.SnapToGrid) - { - selectionEnd = SnapToGrid(new Vector2(mouseWorldPosition.X + SceneManager.GameProject.EditorSettings.GridSpacing, mouseWorldPosition.Y + SceneManager.GameProject.EditorSettings.GridSpacing)); - } - else - { - selectionEnd = new Vector2(mouseWorldPosition.X, mouseWorldPosition.Y); - } - - //Console.WriteLine(selectionStart + ":" + selectionEnd); - - selectionArea = MathExtension.RectangleFromVectors(selectionStart, selectionEnd); - } - - CheckSelectCollision(); - } - else - { - if (selectionStarted) - { - if (!GameInput.IsKeyDown(Keys.LeftControl)) - selectionArea = Rectangle.Empty; - - if (EditorHandler.SelectedGameObjects.Count > 0) - { - // EditorHandler.PropertyGrid.SelectedObjects = EditorHandler.SelectedGameObjects.ToArray(); - EditorHandler.ChangeSelectedObjects(); - } - else - { - //EditorHandler.PropertyGrid.SelectedObject = null; - //EditorHandler.PropertyPage.Text = "Nothing selected"; - EditorHandler.ChangeSelectedObjects(); - } - //EditorHandler.ChangeSelectedObject(EditorHandler.SelectedGameObjects[0]); - } - - selectionStarted = false; - } - } - - private void TilesetTool() - { - if (tilesetMode == TilesetModes.Pencil) - { - if (LeftMouseKeyDown) - { - if (!tilesetDragStarted) - { - memTiles = (EditorHandler.SelectedGameObjects[0] as Tileset).DeepCopy(); - } - - (EditorHandler.SelectedGameObjects[0] as Tileset).PlaceTiles(EditorHandler.TilesetBrushControl.CurrentSelectionXNA, SnapToTilesetGrid(mouseWorldPosition)); - - tilesetDragStarted = true; - } - else - { - if (tilesetDragStarted) - { - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset).Tiles, memTiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - - tilesetDragStarted = false; - } - } - } - else if (tilesetMode == TilesetModes.Rectangle) - { - if (LeftMouseKeyDown) - { - if (tilesetDragStarted) - { - Vector2 releasePos = SnapToTilesetGrid(mouseWorldPosition); - tilesetSelectedArea = MathExtension.RectangleFromVectors(tilesetMouseDownPos, releasePos); - - tilesetSelectedArea = new Rectangle() - { - X = tilesetSelectedArea.X, - Y = tilesetSelectedArea.Y, - Width = tilesetSelectedArea.Width + (EditorHandler.SelectedGameObjects[0] as Tileset).TileWidth, - Height = tilesetSelectedArea.Height + (EditorHandler.SelectedGameObjects[0] as Tileset).TileHeight - }; - } - else - { - tilesetDragStarted = true; - tilesetMouseDownPos = SnapToTilesetGrid(mouseWorldPosition); - } - } - else - { - if (tilesetDragStarted) - { - if (EditorHandler.TilesetBrushControl.CurrentSelectionXNA != Rectangle.Empty) - { - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset).DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset).PlaceTiles(EditorHandler.TilesetBrushControl.CurrentSelectionXNA, tilesetSelectedArea); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset).Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - } - - tilesetSelectedArea = Rectangle.Empty; - tilesetDragStarted = false; - } - } - else if (tilesetMode == TilesetModes.Eraser) - { - if (LeftMouseKeyDown) - { - if (tilesetDragStarted) - { - Vector2 releasePos = SnapToTilesetGrid(mouseWorldPosition); - tilesetSelectedArea = MathExtension.RectangleFromVectors(tilesetMouseDownPos, releasePos); - - tilesetSelectedArea = new Rectangle() - { - X = tilesetSelectedArea.X, - Y = tilesetSelectedArea.Y, - Width = tilesetSelectedArea.Width + (EditorHandler.SelectedGameObjects[0] as Tileset).TileWidth, - Height = tilesetSelectedArea.Height + (EditorHandler.SelectedGameObjects[0] as Tileset).TileHeight - }; - } - else - { - tilesetDragStarted = true; - tilesetMouseDownPos = SnapToTilesetGrid(mouseWorldPosition); - } - } - else - { - if (tilesetDragStarted) - { - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset).DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset).RemoveTiles(tilesetSelectedArea); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset).Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - - tilesetSelectedArea = Rectangle.Empty; - tilesetDragStarted = false; - } - } - else if (tilesetMode == TilesetModes.AddColumn) - { - if (LeftMouseKeyPressed) - { - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset)?.DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset)?.AddColumn((int)mouseWorldPosition.X); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset)?.Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - } - else if (tilesetMode == TilesetModes.AddRow) - { - if (LeftMouseKeyPressed) - { - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset)?.DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset)?.AddRow((int)mouseWorldPosition.Y); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset)?.Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - } - else if (tilesetMode == TilesetModes.RemoveColumn) - { - if (LeftMouseKeyPressed) - { - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset)?.DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset)?.RemoveColumn((int)mouseWorldPosition.X); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset)?.Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - } - else if (tilesetMode == TilesetModes.RemoveRow) - { - if (LeftMouseKeyPressed) - { - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset)?.DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset)?.RemoveRow((int)mouseWorldPosition.Y); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset)?.Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - } - } - - private void UpdateCurrentCursor() - { - if (panStarted) - { - Cursor = System.Windows.Input.Cursors.Arrow; - } - } - - private void GlobalInput() - { - //if (GameInput.IsKeyPressed(Keys.F6)) - //{ - // CompilerWindow cf = new CompilerWindow(); - // cf.Show(); - //} - - if (GameInput.IsKeyPressed(Keys.F7)) - { - lock (this) - { - if (!takingScreenshot) - { - takingScreenshot = true; - - //RotatedRectangle dimensions = EditorHandler.SelectedGameObjects[0].MeasureDimension(); - //TODO: REMOVE COMMENTARY TakeScreenshot(dimensions.Width, dimensions.Height); - TakeScreenshot(6400, 6400); - takingScreenshot = false; - } - } - } - else if (GameInput.IsKeyPressed(Keys.F9) && !takingScreenshot) - { - lock (this) - { - takingScreenshot = true; - TakeScreenshot(); - takingScreenshot = false; - } - } - - if (TileSetMode) - { - if (GameInput.IsKeyDown(Keys.Escape)) - { - EditorHandler.SelectedGameObjects.Clear(); - EditorHandler.ChangeSelectedObjects(); - } - } - - //if (GameInput.IsKeyPressed(Keys.F5)) - // EditorCommands.DebugGame(); - - if (this.Focusable) - { - if (GameInput.IsKeyPressed(Keys.Delete)) - { - if (EditorHandler.SelectedGameObjects.Count > 0 && - System.Windows.Forms.MessageBox.Show("您确定要删除所选的游戏对象吗?", "警告", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - GameObject.Remove(gameObject); - } - - EditorHandler.SceneTreeView.CreateView(); - EditorHandler.SelectedGameObjects = new List(); - EditorHandler.ChangeSelectedObjects(); - } - } - else if (GameInput.IsKeyPressed(Keys.Q)) - { - editorMode = EditorModes.Select; - } - else if (GameInput.IsKeyPressed(Keys.E)) - { - editorMode = EditorModes.Move; - } - else if (GameInput.IsKeyPressed(Keys.R)) - { - editorMode = EditorModes.Rotate; - } - else if (GameInput.IsKeyPressed(Keys.T)) - { - editorMode = EditorModes.Scale; - } - else if (GameInput.IsKeyPressed(Keys.G)) - { - SceneManager.GameProject.EditorSettings.ShowGrid = !SceneManager.GameProject.EditorSettings.ShowGrid; - } - } - } - - internal string TakeScreenshot(int captureWidth = 0, int captureHeight = 0) - { - var path = Screenshot(captureWidth, captureHeight); - - // screenshot - if (path != string.Empty) - { - System.Windows.MessageBoxResult r = - System.Windows.MessageBox.Show("截图保存在 " + path + ". 打开目录?", "成功", - System.Windows.MessageBoxButton.YesNo); - - if (r == System.Windows.MessageBoxResult.Yes) - { - ProcessStartInfo runExplorer = new ProcessStartInfo(); - runExplorer.FileName = "explorer.exe"; - runExplorer.Arguments = System.IO.Path.GetDirectoryName(path); - Process.Start(runExplorer); - } - } - else - { - System.Windows.MessageBox.Show("截屏时出错", "错误", - System.Windows.MessageBoxButton.OK); - } - - return path; - } - - protected override void Draw(GameTime gameTime) - { - if (SceneManager.ActiveScene != null) - { - GraphicsDevice.Clear(SceneManager.ActiveScene.BackgroundColor); - - DrawEditorBottom(); - - SceneManager.Draw(gameTime); - - DrawEditorTop(); - - if (Properties.Settings.Default.ShowDebugView) - { - string text = string.Format("相机位置: (X: {0}, Y: {1})", SceneManager.ActiveCamera.Position.X, SceneManager.ActiveCamera.Position.Y); - - spriteBatch.Begin(); - - bmFontRenderer.DrawText(spriteBatch, new Vector2(10, 8), text, Color.White); - - //if(this.Focused) - // bmFontRenderer.DrawText(spriteBatch, new Vector2(10, 26), "FPS: " + SceneManager.FPS.ToString("0"), Color.White); - - spriteBatch.End(); - } - } - else - { - GraphicsDevice.Clear(Color.FromNonPremultiplied(50, 50, 50, 255)); - } - - base.Draw(gameTime); - } - - private void DrawEditorTop() - { - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp); - - if (TileSetMode && SceneManager.GameProject.EditorSettings.ShowGrid) - { - if (EditorHandler.SelectedGameObjects[0] is Tileset tileset) - { - DrawGrid(tileset.TileWidth, - tileset.TileHeight, - 0, 0, - tileset.Width / 2, - tileset.Height / 2, - //(EditorHandler.SelectedGameObjects[0] as Tileset).OffsetX, - //(EditorHandler.SelectedGameObjects[0] as Tileset).OffsetY, - SceneManager.GameProject.EditorSettings.GridColor); - } - } - else if (SceneManager.GameProject.EditorSettings.ShowGrid) - { - DrawGrid( - SceneManager.GameProject.EditorSettings.GridSpacing, - SceneManager.GameProject.EditorSettings.GridSpacing, - 0, 0, - SceneManager.GameProject.EditorSettings.GridNumberOfLines / 2, - SceneManager.GameProject.EditorSettings.GridNumberOfLines / 2, - SceneManager.GameProject.EditorSettings.GridColor); - } - - if (EditorHandler.SelectedGameObjects.Count == 0 || EditorHandler.SelectedGameObjects[0] is MapObject == false) - { - - } - else - { - //if (EditorHandler.SelectedGameObjects.Count > 0 && - // EditorHandler.SelectedGameObjects[0] is MapObject mapObject && mapObject.Texture != null) - //{ - // DrawGrid(mapObject.TileWidth, - // mapObject.TileHeight, 0, 0, - // mapObject.Texture.Width / mapObject.TileWidth / 2, - // mapObject.Texture.Height / mapObject.TileHeight / 2, - // SceneManager.GameProject.EditorSettings.GridColor); - //} - } - - spriteBatch.End(); - - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, null, null, null, null, SceneManager.ActiveCamera.TransformMatrix); - - if (Properties.Settings.Default.ShowDebugView) - DrawObjectIcons(); - - if (TileSetMode) - { - // snap to the tileset grid - //Vector2 drawPosition = new Vector2() - //{ - // X = ((EditorHandler.SelectedGameObjects[0] as Tileset).TileWidth * (int)Math.Round(((mouseWorldPosition.X - (EditorHandler.SelectedGameObjects[0] as Tileset).OffsetX - EditorHandler.BrushControl.CurrentSelectionXNA.Width / 2) / (EditorHandler.SelectedGameObjects[0] as Tileset).TileWidth))), - // Y = ((EditorHandler.SelectedGameObjects[0] as Tileset).TileHeight * (int)Math.Round(((mouseWorldPosition.Y - (EditorHandler.SelectedGameObjects[0] as Tileset).OffsetY - EditorHandler.BrushControl.CurrentSelectionXNA.Height / 2) / (EditorHandler.SelectedGameObjects[0] as Tileset).TileHeight))) - //}; - - //drawPosition.X += (EditorHandler.SelectedGameObjects[0] as Tileset).OffsetX; - //drawPosition.Y += (EditorHandler.SelectedGameObjects[0] as Tileset).OffsetY; - - if (tilesetMode == TilesetModes.Pencil) - { - if ((EditorHandler.SelectedGameObjects[0] as Tileset)?.Texture != null && EditorHandler.TilesetBrushControl.SelectionRectangle != System.Windows.Rect.Empty) - { - spriteBatch.Draw(((Tileset) EditorHandler.SelectedGameObjects[0]).Texture, SnapToTilesetGrid(mouseWorldPosition), EditorHandler.TilesetBrushControl.CurrentSelectionXNA, Color.White); - } - } - else if (tilesetMode == TilesetModes.Rectangle) - { - if (tilesetSelectedArea != Rectangle.Empty) - { - //Rectangle drawRectangle = new Rectangle() - //{ - // X = (int)((EditorHandler.SelectedGameObjects[0] as Tileset).TileWidth * (int)Math.Floor((((float)tilesetSelectedArea.X - (EditorHandler.SelectedGameObjects[0] as Tileset).OffsetX - EditorHandler.BrushControl.CurrentSelectionXNA.Width / 2) / (EditorHandler.SelectedGameObjects[0] as Tileset).TileWidth))), - // Y = (int)((EditorHandler.SelectedGameObjects[0] as Tileset).TileHeight * (int)Math.Floor((((float)tilesetSelectedArea.Y - (EditorHandler.SelectedGameObjects[0] as Tileset).OffsetY - EditorHandler.BrushControl.CurrentSelectionXNA.Height / 2) / (EditorHandler.SelectedGameObjects[0] as Tileset).TileHeight))), - // Width = tilesetSelectedArea.Width, - // Height = tilesetSelectedArea.Height - //}; - - //drawRectangle.X += (EditorHandler.SelectedGameObjects[0] as Tileset).OffsetX; - //drawRectangle.Y += (EditorHandler.SelectedGameObjects[0] as Tileset).OffsetY; - - Primitives.DrawBoxFilled(spriteBatch, tilesetSelectedArea, new Color(65, 115, 175, 140)); - Primitives.DrawBox(spriteBatch, tilesetSelectedArea, new Color(23, 55, 95, 140), 2); - } - } - else if (tilesetMode == TilesetModes.Eraser) - { - if (tilesetSelectedArea != Rectangle.Empty) - { - Primitives.DrawBoxFilled(spriteBatch, tilesetSelectedArea, new Color(217, 0, 0, 140)); - Primitives.DrawBox(spriteBatch, tilesetSelectedArea, new Color(217, 0, 0, 180), 2); - } - } - else if (tilesetMode == TilesetModes.AddColumn) - { - Vector2 ps = SnapToTilesetGrid(mouseWorldPosition); - float tBorder = Vector2.Transform(new Vector2(0, 0), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).Y; - float bBorder = Vector2.Transform(new Vector2(0, (float)Height), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).Y; - - Rectangle dispRect = new Rectangle() - { - X = (int)ps.X, - Y = (int)tBorder, - Width = ((Tileset) EditorHandler.SelectedGameObjects[0]).TileWidth, - Height = (int)bBorder - (int)tBorder - }; - - Primitives.DrawBoxFilled(spriteBatch, dispRect, new Color(65, 115, 175, 140)); - } - else if (tilesetMode == TilesetModes.RemoveColumn) - { - Vector2 ps = SnapToTilesetGrid(mouseWorldPosition); - float tBorder = Vector2.Transform(new Vector2(0, 0), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).Y; - float bBorder = Vector2.Transform(new Vector2(0, (float)Height), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).Y; - - Rectangle dispRect = new Rectangle() - { - X = (int)ps.X, - Y = (int)tBorder, - Width = ((Tileset) EditorHandler.SelectedGameObjects[0]).TileWidth, - Height = (int)bBorder - (int)tBorder - }; - - Primitives.DrawBoxFilled(spriteBatch, dispRect, new Color(217, 0, 0, 140)); - } - else if (tilesetMode == TilesetModes.AddRow) - { - Vector2 ps = SnapToTilesetGrid(mouseWorldPosition); - float lBorder = Vector2.Transform(new Vector2(0, 0), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).X; - float rBorder = Vector2.Transform(new Vector2((float)Width, 0), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).X; - - Rectangle dispRect = new Rectangle() - { - X = (int)lBorder, - Y = (int)ps.Y, - Width = (int)rBorder - (int)lBorder, - Height = ((Tileset) EditorHandler.SelectedGameObjects[0]).TileHeight - }; - - Primitives.DrawBoxFilled(spriteBatch, dispRect, new Color(65, 115, 175, 140)); - } - else if (tilesetMode == TilesetModes.RemoveRow) - { - Vector2 ps = SnapToTilesetGrid(mouseWorldPosition); - float lBorder = Vector2.Transform(new Vector2(0, 0), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).X; - float rBorder = Vector2.Transform(new Vector2((float)Width, 0), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).X; - - Rectangle dispRect = new Rectangle() - { - X = (int)lBorder, - Y = (int)ps.Y, - Width = (int)rBorder - (int)lBorder, - Height = ((Tileset) EditorHandler.SelectedGameObjects[0]).TileHeight - }; - - Primitives.DrawBoxFilled(spriteBatch, dispRect, new Color(217, 0, 0, 140)); - } - } - - spriteBatch.End(); - - if (EditorHandler.SelectedGameObjects.Count > 0) - { - DrawCurrentObjectHandler(); - } - - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, null, null, null, null, SceneManager.ActiveCamera.TransformMatrix); - - if (editorMode == EditorModes.Select && selectionStart != selectionEnd) - { - Primitives.DrawBoxFilled(spriteBatch, selectionArea, new Color(65, 115, 175, 140)); - Primitives.DrawBox(spriteBatch, selectionArea, new Color(23, 55, 95, 140), 2); - } - - if (EditorHandler.SelectedGameObjects.Count > 0 && - EditorHandler.SelectedGameObjects[0] is MapObject mapObj && - mapObj.Texture != null) - { - if (editorMapMode == EditorMapModes.AddCollison) - { - Primitives.DrawBox(spriteBatch, - new Rectangle((int)mouseWorldPosition.X - mapObj.TileWidth / 2, - (int)mouseWorldPosition.Y - mapObj.TileHeight / 2, mapObj.TileWidth, - mapObj.TileHeight), Color.Red, 1); - Primitives.DrawBoxFilled(spriteBatch, new Rectangle((int)mouseWorldPosition.X - mapObj.TileWidth / 2, - (int)mouseWorldPosition.Y - mapObj.TileHeight / 2, mapObj.TileWidth, - mapObj.TileHeight), Color.FromNonPremultiplied(255, 0, 0, 128)); - } - else if (editorMapMode == EditorMapModes.Opacity) - { - Primitives.DrawBox(spriteBatch, - new Rectangle((int)mouseWorldPosition.X - mapObj.TileWidth / 2, - (int)mouseWorldPosition.Y - mapObj.TileHeight / 2, mapObj.TileWidth, - mapObj.TileHeight), Color.FromNonPremultiplied(0, 255, 255, 255), 1); - Primitives.DrawBoxFilled(spriteBatch, new Rectangle((int)mouseWorldPosition.X - mapObj.TileWidth / 2, - (int)mouseWorldPosition.Y - mapObj.TileHeight / 2, mapObj.TileWidth, - mapObj.TileHeight), Color.FromNonPremultiplied(0, 255, 255, 128)); - } - } - - - //if (spanStarted) - // Primitives.DrawLine(spriteBatch, spanStart, mouseWorldPosition, new Color(0, 0, 0, 180), 2); - - spriteBatch.End(); - - spriteBatch.Begin(); - - if (Properties.Settings.Default.ShowDebugView) - DrawSceneCamera(); - - spriteBatch.End(); - } - - private void DrawSceneCamera() - { - Vector2 vertex = new Vector2(-SceneManager.GameProject.Settings.ScreenWidth / 2 + SceneManager.ActiveScene.Camera.Position.X, - -SceneManager.GameProject.Settings.ScreenHeight / 2 + SceneManager.ActiveScene.Camera.Position.Y); - - vertex = Vector2.Transform(vertex, SceneManager.ActiveCamera.TransformMatrix); - - string text = string.Format("场景相机 ({0}x{1})", SceneManager.GameProject.Settings.ScreenWidth, SceneManager.GameProject.Settings.ScreenHeight); - - bmFontRenderer.DrawText(spriteBatch, new Vector2(vertex.X, vertex.Y - 25), text, Color.Yellow); - //spriteBatch.DrawString(hudFont, text, new Vector2(vertex.X, vertex.Y - 20), Color.Yellow, 0.0f, Vector2.Zero, 0.8f, SpriteEffects.None, 1); - Primitives.DrawBox(spriteBatch, new Rectangle((int)vertex.X, (int)vertex.Y, (int)(SceneManager.GameProject.Settings.ScreenWidth * Camera.Zoom), (int)(SceneManager.GameProject.Settings.ScreenHeight * SceneManager.ActiveCamera.Zoom)), Color.Black, 4); - Primitives.DrawBox(spriteBatch, new Rectangle((int)vertex.X, (int)vertex.Y, (int)(SceneManager.GameProject.Settings.ScreenWidth * Camera.Zoom), (int)(SceneManager.GameProject.Settings.ScreenHeight * SceneManager.ActiveCamera.Zoom)), Color.Yellow, 2); - } - - private void DrawCurrentObjectHandler() - { - foreach (GameObject gameObject in EditorHandler.SelectedGameObjects) - { - if (!(gameObject is Tileset)) - { - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, null, null, null, null, SceneManager.ActiveCamera.TransformMatrix); - - Vector2 spos = gameObject.Transform.Position; - - //如果您不想使用Camera.tion矩阵的spritebatch,请将位置乘以如下所示: - //Vector2.Transform(EditorHandler.SelectedGameObject.Transform.Position,SceneManager.ActiveCamera.TransformMatrix); - - // 画中心箭头 - Vector2 start = new Vector2(spos.X, spos.Y - HANDLER_SIZE); - Vector2 end = new Vector2(spos.X, spos.Y + HANDLER_SIZE); - - //start = new Vector2(spos.X - HANDLER_SIZE, spos.Y); - //end = new Vector2(spos.X + HANDLER_SIZE, spos.Y); - //Primitives.DrawLine(spriteBatch, start, end, Color.Yellow, 2); - - if (editorMode == EditorModes.Move || editorMode == EditorModes.Scale) - { - // Y axis: - { - start = new Vector2(spos.X, spos.Y - AXIS_OFFSET); - end = new Vector2(spos.X, spos.Y); - Primitives.DrawLine(spriteBatch, start, end, Color.Green, 4); - - if (editorMode == EditorModes.Move) - { - start = new Vector2(spos.X - AXIS_OPT_SIZE / 2, spos.Y - AXIS_OFFSET + AXIS_OPT_SIZE / 2); - end = new Vector2(spos.X + 1, spos.Y - AXIS_OFFSET); - Primitives.DrawLine(spriteBatch, start, end, Color.Green, 4); - - start = new Vector2(spos.X + AXIS_OPT_SIZE / 2, spos.Y - AXIS_OFFSET + AXIS_OPT_SIZE / 2); - end = new Vector2(spos.X - 1, spos.Y - AXIS_OFFSET); - Primitives.DrawLine(spriteBatch, start, end, Color.Green, 4); - - - } - else if (editorMode == EditorModes.Scale) - { - Primitives.DrawBoxFilled(spriteBatch, - new Rectangle((int)spos.X - AXIS_OPT_SIZE / 2, (int)spos.Y - AXIS_OFFSET - AXIS_OPT_SIZE / 2, AXIS_OPT_SIZE, AXIS_OPT_SIZE) - , Color.Green); - } - - if (usingYAxis || GameInput.IsKeyDown(Keys.Y)) - { - float tBorder = Vector2.Transform(new Vector2(0, 0), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).Y; - float bBorder = Vector2.Transform(new Vector2(0, (float)Height), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).Y; - - start = new Vector2(spos.X, tBorder); - end = new Vector2(spos.X, bBorder); - - Primitives.DrawLine(spriteBatch, start, end, Color.CornflowerBlue, 2); - } - else if (usingXAxis || GameInput.IsKeyDown(Keys.X)) - { - float lBorder = Vector2.Transform(new Vector2(0, 0), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).X; - float rBorder = Vector2.Transform(new Vector2((float)Width, 0), Matrix.Invert(SceneManager.ActiveCamera.TransformMatrix)).X; - - start = new Vector2(lBorder, spos.Y); - end = new Vector2(rBorder, spos.Y); - - Primitives.DrawLine(spriteBatch, start, end, Color.CornflowerBlue, 2); - } - } - - // X axis: - { - start = new Vector2(spos.X + AXIS_OFFSET, spos.Y); - end = new Vector2(spos.X, spos.Y); - Primitives.DrawLine(spriteBatch, start, end, Color.Red, 4); - - if (editorMode == EditorModes.Move) - { - start = new Vector2(spos.X + AXIS_OFFSET - AXIS_OPT_SIZE / 2, spos.Y - AXIS_OPT_SIZE / 2); - end = new Vector2(spos.X + AXIS_OFFSET, spos.Y + 1); - Primitives.DrawLine(spriteBatch, start, end, Color.Red, 4); - - start = new Vector2(spos.X + AXIS_OFFSET - AXIS_OPT_SIZE / 2, spos.Y + AXIS_OPT_SIZE / 2); - end = new Vector2(spos.X + AXIS_OFFSET, spos.Y - 1); - Primitives.DrawLine(spriteBatch, start, end, Color.Red, 4); - } - else if (editorMode == EditorModes.Scale) - { - Primitives.DrawBoxFilled(spriteBatch, - new Rectangle((int)spos.X + AXIS_OFFSET - AXIS_OPT_SIZE / 2, (int)spos.Y - AXIS_OPT_SIZE / 2, AXIS_OPT_SIZE, AXIS_OPT_SIZE) - , Color.Red); - } - } - } - - Rectangle measure = gameObject.MeasureDimension().CollisionRectangle; - - // Draw Transform Box - if (measure.Width < HANDLER_SIZE || measure.Height < HANDLER_SIZE) - { - Rectangle box = new Rectangle((int)spos.X - HANDLER_SIZE / 2, (int)spos.Y - HANDLER_SIZE / 2, HANDLER_SIZE, HANDLER_SIZE); - Primitives.DrawBox(spriteBatch, box, Color.CornflowerBlue, 2); - } - - Primitives.DrawBoxFilled(spriteBatch, new Rectangle((int)spos.X - 4, (int)spos.Y - 4, 8, 8), Color.CornflowerBlue); - - spriteBatch.End(); - - // Draw Measure Box - if (measure.Width > HANDLER_SIZE * 2 && measure.Height > HANDLER_SIZE * 2) - { - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, null, null, null, null, SceneManager.ActiveCamera.ObjectTransform(gameObject)); - Primitives.DrawBox(spriteBatch, measure, Color.CornflowerBlue, 3); - spriteBatch.End(); - } - } - } - } - - private void DrawObjectIcons() - { - foreach (GameObject gameObject in sceneGameObjects) - { - if (objectIcons.ContainsKey(gameObject.GetType().Name)) - { - //spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, null, null, null, null, SceneManager.ActiveCamera.TransformMatrix); - spriteBatch.Draw(objectIcons[gameObject.GetType().Name], gameObject.Transform.Position, null, - Color.White, 0, - new Vector2(objectIcons[gameObject.GetType().Name].Width / 2, - objectIcons[gameObject.GetType().Name].Height / 2), 1, SpriteEffects.None, 1); - //spriteBatch.End(); - } - } - } - - private void DrawGrid(int gridSizeX, int gridSizeY, int offsetX, int offsetY, int maxX, int maxY, Color color) - { - //int max = SceneManager.GameProject.EditorSettings.GridNumberOfLines / 2; - - //绘制垂直线 - for (int x = 0; x <= maxX; x++) - { - Vector2 start = Vector2.Transform(new Vector2(x * gridSizeX + offsetX, -maxY * gridSizeY), SceneManager.ActiveCamera.TransformMatrix); - Vector2 end = Vector2.Transform(new Vector2(x * gridSizeX + offsetX, maxY * gridSizeY), SceneManager.ActiveCamera.TransformMatrix); - - Primitives.DrawLine(spriteBatch, start, end, color, SceneManager.GameProject.EditorSettings.GridThickness); - - start = Vector2.Transform(new Vector2(-x * gridSizeX + offsetX, -maxY * gridSizeY), SceneManager.ActiveCamera.TransformMatrix); - end = Vector2.Transform(new Vector2(-x * gridSizeX + offsetX, maxY * gridSizeY), SceneManager.ActiveCamera.TransformMatrix); - - Primitives.DrawLine(spriteBatch, start, end, color, SceneManager.GameProject.EditorSettings.GridThickness); - } - - // 绘制水平线 - for (int y = 0; y <= maxY; y++) - { - Vector2 start = Vector2.Transform(new Vector2(-maxX * gridSizeX, y * gridSizeY + offsetY), SceneManager.ActiveCamera.TransformMatrix); - Vector2 end = Vector2.Transform(new Vector2(maxX * gridSizeX, y * gridSizeY + offsetY), SceneManager.ActiveCamera.TransformMatrix); - - Primitives.DrawLine(spriteBatch, start, end, color, SceneManager.GameProject.EditorSettings.GridThickness); - - start = Vector2.Transform(new Vector2(-maxX * gridSizeX, -y * gridSizeY + offsetY), SceneManager.ActiveCamera.TransformMatrix); - end = Vector2.Transform(new Vector2(maxX * gridSizeX, -y * gridSizeY + offsetY), SceneManager.ActiveCamera.TransformMatrix); - - Primitives.DrawLine(spriteBatch, start, end, color, SceneManager.GameProject.EditorSettings.GridThickness); - } - - // 绘制中心线 - Vector2 px, py; - px = Vector2.Transform(new Vector2(-maxX * gridSizeX, offsetY), SceneManager.ActiveCamera.TransformMatrix); - py = Vector2.Transform(new Vector2(maxX * gridSizeX, offsetY), SceneManager.ActiveCamera.TransformMatrix); - Primitives.DrawLine(spriteBatch, px, py, color, SceneManager.GameProject.EditorSettings.GridThickness * 3); - px = Vector2.Transform(new Vector2(offsetX, -maxY * gridSizeY), SceneManager.ActiveCamera.TransformMatrix); - py = Vector2.Transform(new Vector2(offsetX, maxY * gridSizeY), SceneManager.ActiveCamera.TransformMatrix); - Primitives.DrawLine(spriteBatch, px, py, color, SceneManager.GameProject.EditorSettings.GridThickness * 3); - } - - private void DrawEditorBottom() - { - - } - - internal string Screenshot(int captureWidth = 0, int captureHeight = 0) - { - RenderTarget2D renderTarget = new RenderTarget2D( - SceneManager.GraphicsDevice, - (captureWidth == 0 ? SceneManager.GraphicsDevice.PresentationParameters.BackBufferWidth : captureWidth), - (captureHeight == 0 ? SceneManager.GraphicsDevice.PresentationParameters.BackBufferHeight : captureHeight)); - - SceneManager.GraphicsDevice.SetRenderTarget(renderTarget); - - Draw(new GameTime()); - - SceneManager.GraphicsDevice.SetRenderTarget(null); - - if (!Directory.Exists("Screenshots")) - Directory.CreateDirectory("Screenshots"); - - var path = AppDomain.CurrentDomain.BaseDirectory + "Screenshots\\screenshot " + DateTime.Now.ToString("yy-MM-dd H_mm_ss") + ".png"; - - using (FileStream fs = new FileStream(path, FileMode.OpenOrCreate)) - { - int width = renderTarget.Width; - int height = renderTarget.Height; - byte[] data = null; - GCHandle? handle = null; - System.Drawing.Bitmap bitmap = null; - try - { - data = new byte[width * height * 4]; - handle = GCHandle.Alloc(data, GCHandleType.Pinned); - renderTarget.GetData(data); - - // 内部结构是BGR,而位图需要RGB - for (int i = 0; i < data.Length; i += 4) - { - byte temp = data[i + 0]; - data[i + 0] = data[i + 2]; - data[i + 2] = temp; - } - - bitmap = new System.Drawing.Bitmap(width, height, width * 4, - System.Drawing.Imaging.PixelFormat.Format32bppRgb, - handle.Value.AddrOfPinnedObject()); - // System.Drawing.Imaging.PixelFormat.Format32bppArgb // does not save alpha properly - - bitmap.Save(fs, System.Drawing.Imaging.ImageFormat.Png); - } - catch (Exception) - { - return string.Empty; - } - finally - { - if (bitmap != null) - { - bitmap.Dispose(); - } - if (handle.HasValue) - { - handle.Value.Free(); - } - if (data != null) - { - data = null; - } - - } - } - - return path; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/ErrorLog.cs b/Editor/CLEngine.Editor/model/ErrorLog.cs deleted file mode 100644 index 9754585ef7cc1ae539f7d4fefa1c8969020c80dd..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/ErrorLog.cs +++ /dev/null @@ -1,120 +0,0 @@ -using Microsoft.Build.Framework; -using System.Collections.Generic; - -namespace CLEngine.Editor.model -{ - public class ErrorLog - { - private string fileName; - private int lineNumber; - private int columnNumber; - private string errorMessage; - - public int LineNumber - { - get { return lineNumber; } - set { lineNumber = value; } - } - - public int ColumnNumber - { - get { return columnNumber; } - set { columnNumber = value; } - } - - public string FileName - { - get { return fileName; } - set { fileName = value; } - } - - public string ErrorMessage - { - get { return errorMessage; } - set { errorMessage = value; } - } - - public override string ToString() - { - return fileName + " - Line: " + lineNumber + " - Error: " + errorMessage; - } - } - - /// - /// 自定义实现MSBuild ILogger接口记录 - /// 内容构建错误,以便我们以后可以将它们显示给用户 - /// - public class ErrorLogger : ILogger - { - private List errors = new List(); - - /// - /// 获取已记录的所有错误的列表。 - /// - public List Errors - { - get { return errors; } - } - - /// - /// 初始化自定义记录器,挂钩ErrorRaised通知事件。 - /// - public void Initialize(IEventSource eventSource) - { - if (eventSource != null) - { - eventSource.ErrorRaised += ErrorRaised; - } - } - /// - /// 关闭自定义记录器 - /// - public void Shutdown() - { - } - - - /// - /// 通过存储错误消息字符串来处理错误通知事件 - /// - void ErrorRaised(object sender, BuildErrorEventArgs e) - { - errors.Add(new ErrorLog() - { - ColumnNumber = e.ColumnNumber, - LineNumber = e.LineNumber, - ErrorMessage = e.Message, - FileName = e.File - }); - } - - #region ILogger Members - - - /// - /// 实现ILogger.Parameters属性 - /// - string ILogger.Parameters - { - get { return parameters; } - set { parameters = value; } - } - - string parameters; - - - /// - /// 实现ILogger.Verbosity属性 - /// - LoggerVerbosity ILogger.Verbosity - { - get { return verbosity; } - set { verbosity = value; } - } - - LoggerVerbosity verbosity = LoggerVerbosity.Normal; - - - #endregion - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/FileHelper.cs b/Editor/CLEngine.Editor/model/FileHelper.cs deleted file mode 100644 index 0fc7590be797a936bb2fc1005a9332cb161f01fe..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/FileHelper.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.IO; - -namespace CLEngine.Editor.model -{ - public enum FileTemplate { None, Component }; - - public static class FileHelper - { - public static string CreateFile(string path, FileTemplate template) - { - // 解析所选的文件名 - path = ResolveFilename(path); - - // 创建文件或追加 - using (System.IO.FileStream fs = new System.IO.FileStream(path, FileMode.Append)) - { - - } - - switch (template) - { - case FileTemplate.Component: - - //File.WriteAllText(path, Properties.Settings.Default.NewComponentTemplate); - break; - - } - - return path; - } - - public static string ResolveFilename(string filename) - { - // 该文件不存在? - if (!File.Exists(filename)) return filename; - - string extension = Path.GetExtension(filename); - string nameNoExtension = Path.GetFileNameWithoutExtension(filename); - string _filename = Path.GetDirectoryName(filename) + "\\" + nameNoExtension; - - int cnt = 1; - while (File.Exists(_filename + cnt + extension)) cnt++; - _filename += cnt + extension; - - return _filename; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/GlobalCommands.cs b/Editor/CLEngine.Editor/model/GlobalCommands.cs deleted file mode 100644 index 9542c4d6a48468e312ddaeea5f3166e78f932c1d..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/GlobalCommands.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using CLEngine.Core; - -namespace CLEngine.Editor.model -{ - public static class GlobalCommands - { - public static void RemoveEmptyFolders(string path, SearchOption searchOption) - { - foreach (string dirPath in Directory.GetDirectories(path, "*", SearchOption.AllDirectories)) - { - if (Directory.GetFiles(dirPath).Count() == 0 && Directory.GetDirectories(dirPath).Count() == 0) - Directory.Delete(dirPath); - } - } - - public static bool DeployProject(string projectPath, string destinationPath, string platform) - { - List blockedDirs = new List(); - blockedDirs.Add("bin"); - blockedDirs.Add("obj"); - - List blockedFileExtensions = new List(); - blockedFileExtensions.Add(".cs"); - blockedFileExtensions.Add(".clengine"); - blockedFileExtensions.Add(".csproj"); - blockedFileExtensions.Add(".sln"); - - switch (platform.ToLower()) - { - case "windows": - // creates shadow directories - foreach (string dirPath in Directory.GetDirectories(projectPath, "*", SearchOption.AllDirectories)) - { - Directory.CreateDirectory(dirPath.Replace(projectPath, destinationPath)); - } - - // clear blocked directories from the root folder: - foreach (string dirPath in Directory.GetDirectories(destinationPath, "*", SearchOption.TopDirectoryOnly)) - { - if (blockedDirs.Contains(System.IO.Path.GetFileName(dirPath))) - Directory.Delete(dirPath, true); - } - - // copy all the files - foreach (string path in Directory.GetFiles(projectPath, "*.*", SearchOption.AllDirectories)) - { - string filename = System.IO.Path.GetFileName(path); - string ext = System.IO.Path.GetExtension(path); - if (!blockedFileExtensions.Contains(ext) && - Directory.Exists(System.IO.Path.GetDirectoryName(path.Replace(projectPath, destinationPath)))) - { - if (filename.ToLower().Equals("CLEngine.Windows.exe")) - { - File.Copy(path, System.IO.Path.GetDirectoryName(path.Replace(projectPath, destinationPath)) + "\\" + SceneManager.GameProject.ProjectName + ".exe", true); - } - else - { - File.Copy(path, path.Replace(projectPath, destinationPath), true); - } - } - } - - RemoveEmptyFolders(destinationPath, SearchOption.AllDirectories); - - return true; - case "windowsstore": - // creates shadow directories - foreach (string dirPath in Directory.GetDirectories(projectPath, "*", SearchOption.AllDirectories)) - Directory.CreateDirectory(destinationPath.Replace(projectPath, destinationPath)); - - //Copy all the files - foreach (string path in Directory.GetFiles(projectPath, "*.*", SearchOption.AllDirectories)) - { - if (!Directory.Exists(System.IO.Path.GetDirectoryName(path.Replace(projectPath, destinationPath)))) - { - Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path.Replace(projectPath, destinationPath))); - } - - if (path.ToLower().EndsWith(".scene")) - { - GameScene scene = (GameScene)CHelper.DeserializeObject(path); - CHelper.SerializeObjectXML(path.Replace(projectPath, destinationPath), scene); - } - else if (path.ToLower().EndsWith(".clengine")) - { - CProject gp = (CProject)CHelper.DeserializeObject(path); - CHelper.SerializeObjectXML(path.Replace(projectPath, destinationPath), gp); - } - else - { - File.Copy(path, path.Replace(projectPath, destinationPath), true); - } - } - - RemoveEmptyFolders(destinationPath, SearchOption.AllDirectories); - - return true; - } - - return false; - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/ICommand.cs b/Editor/CLEngine.Editor/model/ICommand.cs deleted file mode 100644 index 320b97c6eb7e9d4cda743ed226b0eb4b216bb731..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/ICommand.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace CLEngine.Editor.model -{ - public interface ICommand - { - void Execute(); - void UnExecute(); - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/ResizeBasedVisibility.cs b/Editor/CLEngine.Editor/model/ResizeBasedVisibility.cs deleted file mode 100644 index 9ecf610da2d6a3b52dc3f55d69041b531ba9e9db..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/ResizeBasedVisibility.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Windows; - -namespace CLEngine.Editor.model -{ - public class ResizeBasedVisibility : System.ComponentModel.INotifyPropertyChanged - { - private Visibility maximizeVisibility; - public Visibility MaximizeVisibility - { - get - { - return maximizeVisibility; - } - set - { - maximizeVisibility = value; - OnPropertyChanged("MaximizeVisibility"); - } - } - - private Visibility minimizeVisibility; - public Visibility MinimizeVisibility - { - get - { - return minimizeVisibility; - } - set - { - minimizeVisibility = value; - OnPropertyChanged("MinimizeVisibility"); - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - private void OnPropertyChanged(string propertyName) - { - PropertyChanged?.Invoke(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/ScaleCommand.cs b/Editor/CLEngine.Editor/model/ScaleCommand.cs deleted file mode 100644 index 90d41f201bf6626d3387e2a725fc91b8c2a0e3ad..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/ScaleCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -using CLEngine.Core; -using Microsoft.Xna.Framework; - -namespace CLEngine.Editor.model -{ - public class ScaleCommand : ICommand - { - #region fields - - private Vector2 _change; - private Vector2 _beforeChange; - private GameObject _element; - - #endregion - - #region constructors - - /// - /// - /// - /// - /// - public ScaleCommand(Vector2 change, Vector2 before, GameObject element) - { - _change = change; - _element = element; - _beforeChange = before; - } - - #endregion - - #region ICommand methods - - /// - /// - /// - public void Execute() - { - _element.Transform.Scale = _change; - } - - /// - /// - /// - public void UnExecute() - { - _element.Transform.Scale = _beforeChange; - } - - #endregion - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/ScriptsBuilder.cs b/Editor/CLEngine.Editor/model/ScriptsBuilder.cs deleted file mode 100644 index 8469ab8c13753d39c4e279e14cc85b9bca399f59..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/ScriptsBuilder.cs +++ /dev/null @@ -1,173 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Xml; -using CLEngine.Core; -using Microsoft.Build.Evaluation; -using Microsoft.Build.Execution; -using Microsoft.Build.Framework; - -namespace CLEngine.Editor.model -{ - public static class ScriptsBuilder - { - private static object locker = new object(); - private static ErrorLogger logger; - - public static ErrorLogger Logger { get { return logger; } } - - public static bool IsFileLocked(FileInfo file) - { - FileStream stream = null; - - try - { - stream = file.Open(FileMode.Open, FileAccess.ReadWrite, FileShare.None); - } - catch (IOException) - { - //该文件不可用,因为它是: - //仍然被写入 - //或由另一个线程处理 - //或者不存在(已经处理过) - return true; - } - finally - { - if (stream != null) - stream.Close(); - } - - //file is not locked - return false; - } - - /// - /// - /// - public static bool ReloadScripts() - { - if (SceneManager.GameProject == null) return false; - - lock (locker) - { - - try - { - if (File.Exists(SceneManager.GameProject.ProjectPath + @"\_Scripts.csproj")) - File.Delete(SceneManager.GameProject.ProjectPath + @"\_Scripts.csproj"); - //搜索.sln和.csproj文件 - foreach (string filename in Directory.GetFiles(SceneManager.GameProject.ProjectPath)) - { - if (System.IO.Path.GetExtension(filename).ToLower().Equals(".csproj")) - { - UserPreferences.Instance.ProjectCsProjFilePath = filename; - } - else if (System.IO.Path.GetExtension(filename).ToLower().Equals(".sln")) - { - UserPreferences.Instance.ProjectSlnFilePath = filename; - } - } - - // 检查脚本是否已删除: - bool removed = false; - - string projectFileName = UserPreferences.Instance.ProjectCsProjFilePath; - XmlDocument doc = new XmlDocument(); - doc.Load(projectFileName); - - while (doc.GetElementsByTagName("ItemGroup").Count < 2) - doc.GetElementsByTagName("Project").Item(0).AppendChild(doc.CreateElement("ItemGroup")); - - foreach (XmlNode _node in doc.GetElementsByTagName("ItemGroup").Item(1).ChildNodes) - { - if (_node.Name.ToLower().Equals("compile")) - { - if (!File.Exists(SceneManager.GameProject.ProjectPath + "\\" + _node.Attributes.GetNamedItem("Include").Value)) - { - doc.GetElementsByTagName("ItemGroup").Item(1).RemoveChild(_node); - removed = true; - } - } - } - - if (removed) - doc.Save(projectFileName); - - string tmpProjectFileName = SceneManager.GameProject.ProjectPath + @"\_Scripts.csproj"; - string hash = string.Empty; - - hash = CHelper.EncryptMD5(DateTime.Now.ToString()); - - //try - //{ - /* 更改程序集名称 */ - doc = new XmlDocument(); - doc.Load(projectFileName); - doc.GetElementsByTagName("Project").Item(0).ChildNodes[0]["AssemblyName"].InnerText = hash; - doc.Save(tmpProjectFileName); - //} - //catch (Exception ex) - //{ - // Console.WriteLine(ex.Message); - //} - - /* Compile project */ - ProjectCollection projectCollection = new ProjectCollection(); - Dictionary GlobalProperty = new Dictionary(); - GlobalProperty.Add("Configuration", SceneManager.GameProject.Debug ? "Debug" : "Release"); - GlobalProperty.Add("Platform", "x86"); - - //FileLogger logger = new FileLogger() { Parameters = @"logfile=C:\clengine_log.txt" }; - logger = new ErrorLogger(); - - BuildRequestData buildRequest = new BuildRequestData(tmpProjectFileName, GlobalProperty, null, new string[] { "Build" }, null); - BuildResult buildResult = BuildManager.DefaultBuildManager.Build( - new BuildParameters(projectCollection) - { - BuildThreadPriority = System.Threading.ThreadPriority.AboveNormal, - Loggers = new List() { logger } - }, - buildRequest); - - //foreach (var tr in logger.Errors) - //{ - // Console.WriteLine(tr.ToString()); - //} - - //Console.WriteLine(buildResult.OverallResult); - - string cPath = SceneManager.GameProject.ProjectPath + @"\bin\" + (SceneManager.GameProject.Debug ? "Debug" : "Release") + "\\" + hash + ".dll"; - - if (File.Exists(cPath)) - { - /* read assembly to memory without locking the file */ - byte[] readAllBytes = File.ReadAllBytes(cPath); - SceneManager.ScriptsAssembly = Assembly.Load(readAllBytes); - - if (SceneManager.ActiveScene != null) - { - SceneManager.ActiveScene.SaveComponentValues(); - SceneManager.ActiveScene.Initialize(); - } - - //Console.WriteLine("Path: " + SceneManager.ScriptsAssembly.GetName().Name); - } - else - { - File.Delete(tmpProjectFileName); - return false; - } - - File.Delete(tmpProjectFileName); - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); - } - return true; - } - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/TilesetCommand.cs b/Editor/CLEngine.Editor/model/TilesetCommand.cs deleted file mode 100644 index 2f0e2d1455df1e7f489f5a2361f421c539b444f7..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/TilesetCommand.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using CLEngine.Core; - -namespace CLEngine.Editor.model -{ - public class TilesetCommand : ICommand - { - private Tileset _element; - - private Tile[,] _change; - private Tile[,] _beforeChange; - - public TilesetCommand(Tile[,] change, Tile[,] before, Tileset element) - { - _change = change; - _element = element; - _beforeChange = before; - } - - public void Execute() - { - _element.Tiles = (_change); - } - - public void UnExecute() - { - _element.Tiles = (_beforeChange); - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/UndoRedo.cs b/Editor/CLEngine.Editor/model/UndoRedo.cs deleted file mode 100644 index e1430219b8f5e7474c78ddd824426a461fbd2beb..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/UndoRedo.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System.Collections.Generic; -using CLEngine.Editor.model.commands; -using CLEngine.Core; -using Microsoft.Xna.Framework; - -namespace CLEngine.Editor.model -{ - public class UndoRedo - { - private Stack _Undocommands = new Stack(); - private Stack _Redocommands = new Stack(); - - public void InsertUndoRedo(ICommand cmd) - { - _Undocommands.Push(cmd); - _Redocommands.Clear(); - } - - public void Undo(int levels) - { - for (int i = 1; i <= levels; i++) - { - if (_Undocommands.Count != 0) - { - ICommand command = _Undocommands.Pop(); - command.UnExecute(); - _Redocommands.Push(command); - } - - } - } - - public void Redo(int levels) - { - for (int i = 1; i <= levels; i++) - { - if (_Redocommands.Count != 0) - { - ICommand command = _Redocommands.Pop(); - command.Execute(); - _Undocommands.Push(command); - } - - } - } - - public void InsertInUnDoRedoForMove(Vector2 position, Vector2 oldPosition, GameObject element) - { - ICommand cmd = new MoveCommand(position, oldPosition, element); - _Undocommands.Push(cmd); - _Redocommands.Clear(); - } - - public void InsertInUnDoRedoForRotate(float rotate, float oldRotate, GameObject element) - { - ICommand cmd = new RotateCommand(rotate, oldRotate, element); - _Undocommands.Push(cmd); - _Redocommands.Clear(); - } - - public void InsertInUnDoRedoForScale(Vector2 scale, Vector2 oldScale, GameObject element) - { - ICommand cmd = new ScaleCommand(scale, oldScale, element); - _Undocommands.Push(cmd); - _Redocommands.Clear(); - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/UserPreferences.cs b/Editor/CLEngine.Editor/model/UserPreferences.cs deleted file mode 100644 index f78665cc5ce7a3c819466933327ef0bebb0b069e..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/UserPreferences.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; - -namespace CLEngine.Editor.model -{ - [Serializable] - public class UserPreferences - { - private String projectCsProjFilePath; - private String projectSlnFilePath; - private string networkcode; - - private static UserPreferences instance; - - public static UserPreferences Instance - { - get { return instance; } - set { instance = value; } - } - - public String ProjectCsProjFilePath - { - get { return projectCsProjFilePath; } - set { projectCsProjFilePath = value; } - } - - public String ProjectSlnFilePath - { - get { return projectSlnFilePath; } - set { projectSlnFilePath = value; } - } - - public string NetworkCode - { - get { return networkcode; } - set { networkcode = value; } - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/commands/MoveCommand.cs b/Editor/CLEngine.Editor/model/commands/MoveCommand.cs deleted file mode 100644 index 7fb07caef577f3b6835c4b0fa2885a9b0ea02933..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/commands/MoveCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -using CLEngine.Core; -using Microsoft.Xna.Framework; - -namespace CLEngine.Editor.model.commands -{ - public class MoveCommand : ICommand - { - #region fields - - private Vector2 _change; - private Vector2 _beforeChange; - private GameObject _element; - - #endregion - - #region constructors - - /// - /// - /// - /// - /// - public MoveCommand(Vector2 change, Vector2 before, GameObject element) - { - _change = change; - _element = element; - _beforeChange = before; - } - - #endregion - - #region ICommand methods - - /// - /// - /// - public void Execute() - { - _element.Transform.Position = _change; - } - - /// - /// - /// - public void UnExecute() - { - _element.Transform.Position = _beforeChange; - } - - #endregion - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/model/commands/RotateCommand.cs b/Editor/CLEngine.Editor/model/commands/RotateCommand.cs deleted file mode 100644 index 2e41f7e855cf78e322f31211960411b54ddc62f3..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/model/commands/RotateCommand.cs +++ /dev/null @@ -1,51 +0,0 @@ -using CLEngine.Core; - -namespace CLEngine.Editor.model.commands -{ - public class RotateCommand : ICommand - { - #region fields - - private float _change; - private float _beforeChange; - private GameObject _element; - - #endregion - - #region constructors - - /// - /// - /// - /// - /// - public RotateCommand(float change, float before, GameObject element) - { - _change = change; - _element = element; - _beforeChange = before; - } - - #endregion - - #region ICommand methods - - /// - /// - /// - public void Execute() - { - _element.Transform.Rotation = _change; - } - - /// - /// - /// - public void UnExecute() - { - _element.Transform.Rotation = _beforeChange; - } - - #endregion - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/packages.config b/Editor/CLEngine.Editor/packages.config deleted file mode 100644 index c7f906788696224de9e927caf78542ff50fdbba7..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/packages.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/theme/CheckBoxStyle.xaml b/Editor/CLEngine.Editor/theme/CheckBoxStyle.xaml deleted file mode 100644 index 126b549d4c918fef8c25ed39c0aaac87c75b9bd8..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/theme/CheckBoxStyle.xaml +++ /dev/null @@ -1,57 +0,0 @@ - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/theme/ComboBoxStyle.xaml b/Editor/CLEngine.Editor/theme/ComboBoxStyle.xaml deleted file mode 100644 index a873c602e4043496f7f434bd66c539f81a86ef51..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/theme/ComboBoxStyle.xaml +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/theme/DarkThemeResourceDictionary.cs b/Editor/CLEngine.Editor/theme/DarkThemeResourceDictionary.cs deleted file mode 100644 index cab23f0996f56582038303f0063406c56b6f0217..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/theme/DarkThemeResourceDictionary.cs +++ /dev/null @@ -1,373 +0,0 @@ -using System; -using System.Linq; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Input; -using CLEngine.Editor.core; -using CLEngine.Core; -using Microsoft.Win32; - -namespace CLEngine.Editor.theme -{ - partial class DarkThemeResourceDictionary : ResourceDictionary - { - public DarkThemeResourceDictionary() - { - InitializeComponent(); - } - - void grid_mouseLeftButtonDown(object sender, MouseButtonEventArgs e) - { - if (sender is Window) - (sender as Window).DragMove(); - } - - void LayoutTextBox_Loaded(object sender, RoutedEventArgs e) - { - (sender as TextBox).Text = Properties.Settings.Default.Layout; - } - - void btnClose_Click(object sender, RoutedEventArgs e) - { - Window win = Application.Current.Windows.OfType().SingleOrDefault(x => x.IsActive); - - if (win == null || !win.IsVisible) return; - - win.Close(); - } - - void btnMaximize_Click(object sender, RoutedEventArgs e) - { - Window win = Application.Current.Windows.OfType().SingleOrDefault(x => x.IsActive); - - if (win == null || !win.IsVisible || (win.ResizeMode != ResizeMode.CanResize && win.ResizeMode != ResizeMode.CanResizeWithGrip) || win.WindowState == WindowState.Maximized) return; - - if (win is MainWindow) // 全屏 - (win as MainWindow).SetFullScreen(false); - else - win.WindowState = WindowState.Maximized; - - } - - void btnMinimize_Click(object sender, RoutedEventArgs e) - { - Window win = Application.Current.Windows.OfType().SingleOrDefault(x => x.IsActive); - - win.WindowState = WindowState.Minimized; - - } - - void Layouts_SelectionChanged(object sender, RoutedEventArgs e) - { - if ((sender as ComboBox).SelectedItem == null) return; - - string name = ((sender as ComboBox).SelectedItem as TextBlock).Text; - LayoutHelper.LoadLayout(name); - - DependencyObject parent = EditorUtils.GetParent(sender as ComboBox, 3); - (parent as TextBox).Text = name; - } - - void LayoutTextBox_PreviewKeyDown(object sender, KeyEventArgs e) - { - if (e.Key == Key.Enter) - { - string layoutName = (sender as TextBox).Text.Trim(); - if (layoutName.Equals(string.Empty)) return; - - if (LayoutHelper.RenameLayout(layoutName)) - { - (sender as TextBox).Text = ""; - EditorUtils.SelectAnotherElement(sender as DependencyObject); - } - //if (LayoutHelper.LoadLayout(layoutName)) - //{ - // (sender as TextBox).Text = ""; - // EditorUtils.SelectAnotherElement(sender as DependencyObject); - //} - //else - //{ - // if (LayoutHelper.CreateNewLayout(layoutName)) - // { - // (sender as TextBox).Text = ""; - // EditorUtils.SelectAnotherElement(sender as DependencyObject); - // } - //} - } - } - - void LayoutsPreviewMouseDown(object sender, MouseEventArgs e) - { - (sender as ComboBox).Items.Clear(); - - foreach (var layout in LayoutHelper.GetLayouts()) - { - (sender as ComboBox).Items.Add(new TextBlock() - { - Margin = new Thickness(4, 0, 0, 0), - Text = layout - }); - } - } - - void removeLayoutMouseDown(object sender, RoutedEventArgs e) - { - DependencyObject parent = EditorUtils.GetParent(sender as TextBlock, 3); - - string layoutName = (parent as TextBox).Text.Trim(); - - if (layoutName.Equals(string.Empty)) return; - - if (LayoutHelper.RemoveLayout(layoutName)) - { - (parent as TextBox).Text = ""; - EditorUtils.SelectAnotherElement(parent); - } - } - - void addLayoutMouseDown(object sender, RoutedEventArgs e) - { - DependencyObject parent = EditorUtils.GetParent(sender as TextBlock, 3); - - string layoutName = (parent as TextBox).Text.Trim(); - - if (layoutName.Equals(string.Empty)) return; - - if (LayoutHelper.CreateNewLayout(layoutName)) - { - (parent as TextBox).Text = ""; - EditorUtils.SelectAnotherElement(parent); - } - } - - void TagPreviewMouseDown(object sender, MouseEventArgs e) - { - (sender as ComboBox).Items.Clear(); - - foreach (var item in SceneManager.ActiveScene.CommonTags) - { - (sender as ComboBox).Items.Add(new TextBlock() - { - Margin = new Thickness(4, 0, 0, 0), - Text = item - }); - } - } - - void TagItemChanged(object sender, RoutedEventArgs e) - { - if ((sender as ComboBox).SelectedItem == null) return; - - DependencyObject parent = EditorUtils.GetParent(sender as ComboBox, 3); - (parent as TextBox).Text = ((sender as ComboBox).SelectedItem as TextBlock).Text; - - EditorUtils.SelectAnotherElement(parent); - } - - void GlobalPathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置其他文件路径"; - - // 拆分每个接受的扩展 - string[] extensions = Properties.Settings.Default.AcceptedExtensions.Split('|'); - - // 设置初始过滤内容 - string filter = "接受的扩展程序|"; - - // 循环遍历每个扩展并将所有扩展添加到同一类别(接受的扩展) - foreach (var extension in extensions) - { - filter += "*" + extension + ";"; - } - - // 删除最后一个字符(;) - filter = filter.Remove(filter.Length - 1); - - // 添加所有文件类别 - filter += "|All Files (*.*)|*.*"; - - // 将字符串分配给打开文件对话框过滤器 - ofd.Filter = filter; - - this.ProcessDialog(sender, e, ofd, "Misc\\"); - } - - void TexturePathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置BMFont纹理路径"; - ofd.Filter = "PNG|*.png"; - this.ProcessDialog(sender, e, ofd, "Fonts\\"); - } - - void FntPathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置BMFont文件路径"; - ofd.Filter = "FNT|*.fnt"; - this.ProcessDialog(sender, e, ofd, "Fonts\\"); - } - - void AudioPathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置音频文件路径"; - ofd.Filter = "所有支持的音频类型|*.mp3;*.wav|WAV|*.wav|MP3|*.mp3"; - this.ProcessDialog(sender, e, ofd, "Audio\\"); - } - - void UIPathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置UI图片文件路径"; - ofd.Filter = "所有支持的UI图片类型|*.png"; - this.ProcessDialog(sender, e, ofd, "UI\\"); - } - - void FUIPathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置FUI文件路径"; - ofd.Filter = "所有支持的FUI类型|*.fui"; - this.ProcessDialog(sender, e, ofd, "UI\\"); - } - - void PathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置图像路径"; - ofd.Filter = "所有支持的图形类型|*.bmp;*.jpg;*.jpeg;*.png;*.tif;*.tiff" + "|BMP|*.bmp|GIF|*.gif|JPG|*.jpg;*.jpeg|PNG|*.png|TIFF|*.tif;*.tiff"; - this.ProcessDialog(sender, e, ofd, "Images\\"); - } - - void LuaPathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置脚本文件路径"; - ofd.Filter = "所有支持的脚本类型|*.lua"; - this.ProcessDialog(sender, e, ofd, "Scripts\\"); - } - - void SkePathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置Ske文件路径"; - ofd.Filter = "所有支持的类型|*.json"; - this.ProcessDialog(sender, e, ofd, "Animation\\"); - } - - void TexJsonPathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置Tex JSON文件路径"; - ofd.Filter = "所有支持的类型|*.json"; - this.ProcessDialog(sender, e, ofd, "Animation\\"); - } - - void TexImagePathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置Tex图片文件路径"; - ofd.Filter = "所有支持的类型|*.png"; - this.ProcessDialog(sender, e, ofd, "Animation\\"); - } - - void MapImagePathMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置地图图片文件路径"; - ofd.Filter = "所有支持的类型|*.png;*.jpg"; - this.ProcessDialog(sender, e, ofd, "Map\\"); - } - - void VideoMouseDown(object sender, RoutedEventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Title = "设置视频文件路径"; - ofd.Filter = "所有支持的类型|*.asf;*.avi;*.flv;*.mov;*.mp4;*.m4a;*.3gp"; - this.ProcessDialog(sender, e, ofd, "video\\"); - } - - void ProcessDialog(object sender, RoutedEventArgs e, OpenFileDialog ofd, string specificFolder = "") - { - var result = ofd.ShowDialog(); - if (result.HasValue && result.Value) - { - //(EditorUtils.FindVisualChildren(parent).ElementAt(0) as ScrollViewer).Visibility = Visibility.Collapsed; - DependencyObject parent = EditorUtils.GetParent(sender as TextBlock, 3); - - string destFolder = (SceneManager.GameProject.ProjectPath + "\\Content\\" + specificFolder).Trim(); - string filename = System.IO.Path.GetFileName(ofd.FileName); - - bool fileOnDirectory = ofd.FileName.StartsWith(SceneManager.GameProject.ProjectPath); - - if (!System.IO.Directory.Exists(destFolder) && !fileOnDirectory) - System.IO.Directory.CreateDirectory(destFolder); - - if (!System.IO.File.Exists(destFolder + filename) || fileOnDirectory) - this.SetNewPath(ofd.FileName, destFolder, specificFolder, filename, parent); - else - { - MessageBoxResult overwriteResult = MessageBox.Show("带有名称的文件 " + filename + " 已经存在。 你想覆盖它吗?", "警告", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No); - if (overwriteResult == MessageBoxResult.Yes) - this.SetNewPath(ofd.FileName, destFolder, specificFolder, filename, parent, true); - } - } - } - - void SetNewPath(string srcPath, string destFolder, string specificFolder, string filename, DependencyObject parentDO, bool overwrite = false) - { - try - { - bool fileOnDirectory = srcPath.StartsWith(SceneManager.GameProject.ProjectPath); - - if (!fileOnDirectory) - System.IO.File.Copy(srcPath, destFolder + filename, overwrite); - - string relativePath = (@"\Content\" + specificFolder + filename).Trim(); - if (fileOnDirectory) - relativePath = srcPath.Replace(SceneManager.GameProject.ProjectPath, string.Empty); - - if (relativePath.StartsWith("\\")) - relativePath = relativePath.Substring(1, relativePath.Length - 1); - - (parentDO as TextBox).Text = relativePath; - - EditorUtils.SelectAnotherElement(parentDO); - } - catch (Exception ex) - { - MessageBox.Show(ex.Message); - } - } - - void titleBarMouseDown(object sender, MouseButtonEventArgs e) - { - if (e.LeftButton == MouseButtonState.Pressed) - { - if (e.ClickCount == 2) - { - //Window win = Application.Current.Windows.OfType().SingleOrDefault(x => x.IsActive); - - //if (win == null || !win.IsVisible || win.ResizeMode != ResizeMode.CanResize) return; - - //if (win.WindowState == WindowState.Maximized) - //{ - // win.WindowState = WindowState.Normal; - // if (win is MainWindow) - // (win as MainWindow).setFullScreenName(false); - //} - //else - //{ - // if (win is MainWindow) - // (win as MainWindow).SetFullScreen(false); - // else - // win.WindowState = WindowState.Maximized; - //} - } - } - - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/theme/IgniteDark.xaml b/Editor/CLEngine.Editor/theme/IgniteDark.xaml deleted file mode 100644 index d7654c7bf478457b3e76102612e6216360b13798..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/theme/IgniteDark.xaml +++ /dev/null @@ -1,3186 +0,0 @@ - - - - - - - /CLEngine.Editor;component/content/_logo_a.png - /CLEngine.Editor;component/content/_x.png - /CLEngine.Editor;component/content/_maximize_btn.png - /CLEngine.Editor;component/content/_minimize.png - /CLEngine.Editor;component/content/_layer.png - /CLEngine.Editor;component/content/_game_object_empty.png - /CLEngine.Editor;component/content/_game_object_sprite.png - /CLEngine.Editor;component/content/_game_object_audio.png - /CLEngine.Editor;component/content/_game_object_tileset.png - /CLEngine.Editor;component/content/_game_object_particle.png - /CLEngine.Editor;component/content/_game_object_text.png - /CLEngine.Editor;component/content/_btn_toggle_on.png - /CLEngine.Editor;component/content/_btn_toggle_off.png - /CLEngine.Editor;component/content/_folder.png - /CLEngine.Editor;component/content/_folder_add.png - /CLEngine.Editor;component/content/_file.png - /CLEngine.Editor;component/content/_cs_file.png - /CLEngine.Editor;component/content/_lua_file.png - /CLEngine.Editor;component/content/_scene_file.png - /CLEngine.Editor;component/content/_text_file.png - /CLEngine.Editor;component/content/_image.png - /CLEngine.Editor;component/content/_sln.png - /CLEngine.Editor;component/content/_component_item.png - /CLEngine.Editor;component/content/_component.png - /CLEngine.Editor;component/content/_save.png - /CLEngine.Editor;component/content/_cut.png - /CLEngine.Editor;component/content/_copy.png - /CLEngine.Editor;component/content/_paste.png - /CLEngine.Editor;component/content/_rename.png - /CLEngine.Editor;component/content/_move_up.png - /CLEngine.Editor;component/content/_move_down.png - /CLEngine.Editor;component/content/_ui_object.png - /CLEngine.Editor;component/content/_game_event.png - /CLEngine.Editor;component/content/_game_video.png - /CLEngine.Editor;component/content/_camera_object_16.png - /CLEngine.Editor;component/content/_map_object.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #585858 - - #585858 - - #FF211AA9 - #444 - #FFC5CBF9 - #FF7381F9 - #FF3843C4 - #FF211AA9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/theme/PropertyGridStyle.xaml b/Editor/CLEngine.Editor/theme/PropertyGridStyle.xaml deleted file mode 100644 index 21b1348bb1b990d45d45a84adb0a44af452e3170..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/theme/PropertyGridStyle.xaml +++ /dev/null @@ -1,561 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/theme/VisualScriptingDictionary.xaml b/Editor/CLEngine.Editor/theme/VisualScriptingDictionary.xaml deleted file mode 100644 index 7ae29affac0e401e8b1eeca28beefa6cfea6d524..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/theme/VisualScriptingDictionary.xaml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Editor/CLEngine.Editor/theme/Xceed.Wpf.AvalonDock.Themes.IgniteDark.dll b/Editor/CLEngine.Editor/theme/Xceed.Wpf.AvalonDock.Themes.IgniteDark.dll deleted file mode 100644 index 1a3b91914b957f37112556746a444a0d7e2ef3df..0000000000000000000000000000000000000000 Binary files a/Editor/CLEngine.Editor/theme/Xceed.Wpf.AvalonDock.Themes.IgniteDark.dll and /dev/null differ diff --git a/Editor/CLEngine.Editor/viewmodel/ButtonVisibilityViewModel.cs b/Editor/CLEngine.Editor/viewmodel/ButtonVisibilityViewModel.cs deleted file mode 100644 index 1bcfbd15be5525adbff49861927f859266738fc0..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/viewmodel/ButtonVisibilityViewModel.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Linq; -using System.Windows; -using CLEngine.Editor.model; - -namespace CLEngine.Editor.viewmodel -{ - public class ButtonVisibilityViewModel - { - public ResizeBasedVisibility ButtonVisibility { get; set; } - - public ButtonVisibilityViewModel() - { - - Window win = Application.Current.Windows.OfType().SingleOrDefault(x => x.IsActive); - if (win != null) - { - ResizeBasedVisibility bar = new ResizeBasedVisibility(); - switch (win.ResizeMode) - { - case ResizeMode.CanMinimize: - bar.MaximizeVisibility = Visibility.Hidden; - bar.MinimizeVisibility = Visibility.Visible; - break; - case ResizeMode.CanResize: - case ResizeMode.CanResizeWithGrip: - bar.MaximizeVisibility = Visibility.Visible; - bar.MaximizeVisibility = Visibility.Visible; - break; - case ResizeMode.NoResize: - default: - bar.MaximizeVisibility = Visibility.Collapsed; - bar.MinimizeVisibility = Visibility.Collapsed; - break; - } - } - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/viewmodel/MainViewModel.cs b/Editor/CLEngine.Editor/viewmodel/MainViewModel.cs deleted file mode 100644 index c2861d860e284bd4bb890dfd30cbce5879831eed..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/viewmodel/MainViewModel.cs +++ /dev/null @@ -1,254 +0,0 @@ -using CLEngine.Core; -using CLEngine.Core.components; -using CLEngine.Editor.core; -using CLEngine.Editor.model; -using CLEngine.Editor.windows; -using GalaSoft.MvvmLight; -using GalaSoft.MvvmLight.Command; -using Microsoft.Xna.Framework; -using System.Collections.Generic; -using System.Windows.Forms; -using System.Windows.Media; - -namespace CLEngine.Editor.ViewModel -{ - /// - /// This class contains properties that the main View can data bind to. - /// - /// Use the mvvminpc snippet to add bindable properties to this ViewModel. - /// - /// - /// You can also use Blend to data bind with the tool's support. - /// - /// - /// See http://www.galasoft.ch/mvvm - /// - /// - public class MainViewModel : ViewModelBase - { - public RelayCommand ShiftRightTilesetCommand { get; set; } - public RelayCommand ShiftDownTilesetCommand { get; set; } - public RelayCommand SaveProjectCommand { get; set; } - public RelayCommand UndoKeyCommand { get; set; } - public RelayCommand RedoKeyCommand { get; set; } - public RelayCommand FullDebugCommand { get; set; } - public RelayCommand ToCollisionBlockCommand { get; set; } - public RelayCommand CopyKeyCommand { get; set; } - public RelayCommand PasteKeyCommand { get; set; } - public RelayCommand ThumbScreenshotCommand { get; set; } - public RelayCommand NewProjectCommand { get; set; } - public RelayCommand LoadProjectCommand { get; set; } - public RelayCommand SaveSceneCommand { get; set; } - public RelayCommand ManageTagsCommand { get; set; } - public RelayCommand ProjectSettingsCommand { get; set; } - public RelayCommand SceneSettingsCommand { get; set; } - public RelayCommand CompileCommand { get; set; } - public RelayCommand DebugCommand { get; set; } - public RelayCommand ClearTextureBuffCommand { get; set; } - - public MainViewModel() - { - ShiftRightTilesetCommand = new RelayCommand(ShiftRightTilesetAction); - ShiftDownTilesetCommand = new RelayCommand(ShiftDownTilesetAction); - SaveProjectCommand = new RelayCommand(SaveProjectAction); - UndoKeyCommand = new RelayCommand(UndoKeyAction); - RedoKeyCommand = new RelayCommand(RedoKeyAction); - FullDebugCommand = new RelayCommand(FullDebugAction); - ToCollisionBlockCommand = new RelayCommand(ToCollisionBlockAction); - CopyKeyCommand = new RelayCommand(CopyKeyAction); - PasteKeyCommand = new RelayCommand(PasteKeyAction); - ThumbScreenshotCommand = new RelayCommand(ThumbScreenshotAction); - NewProjectCommand = new RelayCommand(NewProjectAction); - LoadProjectCommand = new RelayCommand(LoadProjectAction); - SaveSceneCommand = new RelayCommand(SaveSceneAction); - ManageTagsCommand = new RelayCommand(ManageTagsAction); - ProjectSettingsCommand = new RelayCommand(ProjectSettingsAction); - SceneSettingsCommand = new RelayCommand(SceneSettingsAction); - CompileCommand = new RelayCommand(CompileAction); - DebugCommand = new RelayCommand(DebugAction); - ClearTextureBuffCommand = new RelayCommand(ClearTextureBuffAction); - } - - private void ClearTextureBuffAction() - { - TextureLoader.Clear(); - } - - private void DebugAction() - { - debugProject(); - } - - private void CompileAction() - { - compileProject(); - } - - private void SceneSettingsAction() - { - EditorHandler.ChangeSelectedObject(SceneManager.ActiveScene); - } - - private void ProjectSettingsAction() - { - new SettingsWindow().ShowDialog(); - } - - private void ManageTagsAction() - { - ManageTagsWindow window = new ManageTagsWindow(); - - window.ShowDialog(); - } - - private void SaveSceneAction() - { - SceneManager.SaveActiveScene(); - EditorCommands.ShowOutputMessage("Ϸѱ"); - } - - private void LoadProjectAction() - { - EditorCommands.LoadProject(); - } - - private void NewProjectAction() - { - NewProjectWindow np = new NewProjectWindow(); - np.ShowDialog(); - - // һĿ - if (np.DialogResult.Value) - { - //Reload(); - EditorCommands.LoadProject(np.ProjectPath); - EditorCommands.AddToProjectHistory(np.ProjectPath); - } - } - - private void ThumbScreenshotAction() - { - EditorHandler.SceneViewControl.TakeScreenshot(); - } - - private void PasteKeyAction() - { - var SceneViewFormContainer = MainWindow.Instance.SceneViewFormContainer; - var sceneTreeView = MainWindow.Instance.sceneTreeView; - if (SceneViewFormContainer.IsFocused || sceneTreeView.canCopyPaste) - { - EditorCommands.PasteSelectedObjects(); - } - } - - private void CopyKeyAction() - { - var SceneViewFormContainer = MainWindow.Instance.SceneViewFormContainer; - var sceneTreeView = MainWindow.Instance.sceneTreeView; - if (SceneViewFormContainer.IsFocused || sceneTreeView.canCopyPaste) - { - EditorCommands.CopySelectedObjects(); - } - } - - private void ToCollisionBlockAction() - { - var sceneViewGameControl = MainWindow.Instance.sceneViewGameControl; - var sceneTreeView = MainWindow.Instance.sceneTreeView; - if (sceneViewGameControl.SelectionArea != Rectangle.Empty) - { - GameObject gameObject = new GameObject(); - gameObject.Name = "Collision Block"; - - gameObject.Transform.Position = - new Vector2(sceneViewGameControl.SelectionArea.X + sceneViewGameControl.SelectionArea.Width / 2, - sceneViewGameControl.SelectionArea.Y + sceneViewGameControl.SelectionArea.Height / 2); - - SceneManager.ActiveScene.GameObjects.Add(gameObject); - - RectangleBody body = new RectangleBody(); - body.EditorExpanded = true; - - gameObject.AddComponent(body); - - body.Width = sceneViewGameControl.SelectionArea.Width; - body.Height = sceneViewGameControl.SelectionArea.Height; - body.BodyType = FarseerPhysics.Dynamics.BodyType.Static; - - sceneTreeView.CreateView(); - - EditorHandler.SelectedGameObjects = new List(); - EditorHandler.SelectedGameObjects.Add(gameObject); - EditorHandler.ChangeSelectedObjects(); - } - else - MessageBox.Show("ûṩЧѡִд֮ǰѡһ", ""); - } - - private void FullDebugAction() - { - if (compileProject()) - debugProject(); - } - - private void debugProject() - { - EditorCommands.ApplyBlurEffect(MainWindow.Instance); - EditorCommands.DebugGame(); - EditorCommands.ClearEffect(MainWindow.Instance); - } - - private bool compileProject() - { - EditorCommands.ApplyBlurEffect(MainWindow.Instance); - - CompilerWindow cw = new CompilerWindow(); - - cw.ShowDialog(); - EditorCommands.ClearEffect(MainWindow.Instance); - EditorCommands.CreatePropertyGridView(); - - return cw.Result; - } - - private void RedoKeyAction() - { - EditorHandler.UnDoRedo.Redo(1); - } - - private void UndoKeyAction() - { - EditorHandler.UnDoRedo.Undo(1); - } - - private void SaveProjectAction() - { - EditorCommands.SaveProject(); - EditorCommands.SaveScene(false); - } - - private void ShiftDownTilesetAction() - { - if (EditorHandler.SelectedGameObjects.Count == 0 || !(EditorHandler.SelectedGameObjects[0] is Tileset)) return; - - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset).DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset).ShiftDown(1); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset).Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - - private void ShiftRightTilesetAction() - { - if (EditorHandler.SelectedGameObjects.Count == 0 || !(EditorHandler.SelectedGameObjects[0] is Tileset)) return; - - Tile[,] _tiles = (EditorHandler.SelectedGameObjects[0] as Tileset).DeepCopy(); - - (EditorHandler.SelectedGameObjects[0] as Tileset).ShiftRight(1); - - TilesetCommand tc = new TilesetCommand((EditorHandler.SelectedGameObjects[0] as Tileset).Tiles, _tiles, (EditorHandler.SelectedGameObjects[0] as Tileset)); - EditorHandler.UnDoRedo.InsertUndoRedo(tc); - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/viewmodel/ViewModelLocator.cs b/Editor/CLEngine.Editor/viewmodel/ViewModelLocator.cs deleted file mode 100644 index 57b0b37610ff55af7e2bed7cf2ac450da4d23035..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/viewmodel/ViewModelLocator.cs +++ /dev/null @@ -1,50 +0,0 @@ -/* - In App.xaml: - - - - - In the View: - DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}" - - You can also use Blend to do all this with the tool's support. - See http://www.galasoft.ch/mvvm -*/ - -using CommonServiceLocator; -using GalaSoft.MvvmLight; -using GalaSoft.MvvmLight.Ioc; - -namespace CLEngine.Editor.ViewModel -{ - /// - /// This class contains static references to all the view models in the - /// application and provides an entry point for the bindings. - /// - public class ViewModelLocator - { - /// - /// Initializes a new instance of the ViewModelLocator class. - /// - public ViewModelLocator() - { - ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); - - SimpleIoc.Default.Register(); - } - - public MainViewModel Main - { - get - { - return ServiceLocator.Current.GetInstance(); - } - } - - public static void Cleanup() - { - // TODO Clear the ViewModels - } - } -} \ No newline at end of file diff --git a/Editor/CLEngine.Editor/windows/AddNewItemWindow.xaml b/Editor/CLEngine.Editor/windows/AddNewItemWindow.xaml deleted file mode 100644 index 04a362b759dcfaf3fea83128bdfd62b255ddf4e1..0000000000000000000000000000000000000000 --- a/Editor/CLEngine.Editor/windows/AddNewItemWindow.xaml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - 空对象 - - - - - - 图片 - - - - - - 动画(已弃用->使用龙骨动画) - - - - - - 地图集 - - - - - - 音频 - - - - - - 位图字体 - - - - - - 粒子 - - - - - - 龙骨动画 - - - - - - 通用地图(非横版) - - - - - - - - - - - - - - - - - - - - - - - -