本文整理汇总了C#中LWF类的典型用法代码示例。如果您正苦于以下问题:C# LWF类的具体用法?C# LWF怎么用?C# LWF使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LWF类属于命名空间,在下文中一共展示了LWF类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BitmapClip
public BitmapClip(LWF lwf, Movie parent, int objId)
: base(lwf, parent, objId)
{
var data = lwf.data.bitmaps[objId];
var fragment = lwf.data.textureFragments[data.textureFragmentId];
var texdata = lwf.data.textures[fragment.textureId];
width = fragment.w / texdata.scale;
height = fragment.h / texdata.scale;
offsetX = fragment.x;
offsetY = fragment.y;
originalWidth = fragment.ow;
originalHeight = fragment.oh;
depth = -1;
visible = true;
regX = 0;
regY = 0;
x = 0;
y = 0;
scaleX = 0;
scaleY = 0;
rotation = 0;
alpha = 1;
_scaleX = scaleX;
_scaleY = scaleY;
_rotation = rotation;
_cos = 1;
_sin = 0;
_matrix = new Matrix();
}
开发者ID:DelSystem32,项目名称:lwf,代码行数:33,代码来源:lwf_bitmapclip.cs
示例2: BitmapClip
public BitmapClip(LWF lwf, Movie parent, int objId)
: base(lwf, parent, objId)
{
m_dataMatrixId = lwf.data.bitmaps[objId].matrixId;
var data = lwf.data.bitmaps[objId];
var fragment = lwf.data.textureFragments[data.textureFragmentId];
var texdata = lwf.data.textures[fragment.textureId];
width = fragment.w / texdata.scale;
height = fragment.h / texdata.scale;
m_renderer = lwf.rendererFactory.ConstructBitmap(lwf, objId, this);
depth = -1;
visible = true;
regX = 0;
regY = 0;
x = 0;
y = 0;
scaleX = 0;
scaleY = 0;
rotation = 0;
alpha = 1;
_scaleX = scaleX;
_scaleY = scaleY;
_rotation = rotation;
_cos = 1;
_sin = 0;
_matrix = new Matrix();
}
开发者ID:rayyee,项目名称:lwf,代码行数:31,代码来源:lwf_bitmapclip.cs
示例3: Property
public Property(LWF lwf)
{
m_lwf = lwf;
m_matrix = new Matrix();
m_colorTransform = new ColorTransform();
ClearRenderingOffset();
}
开发者ID:BenoitLafont,项目名称:lwf-demo,代码行数:7,代码来源:lwf_property.cs
示例4: Text
public Text(LWF lwf, Movie p, int objId, int instId = -1)
: base(lwf, p, Format.Object.Type.TEXT, objId)
{
Format.Text text = lwf.data.texts[objId];
m_dataMatrixId = text.matrixId;
if (text.nameStringId != -1) {
m_name = lwf.data.strings[text.nameStringId];
} else {
if (instId >= 0 && instId < lwf.data.instanceNames.Length) {
int stringId = lwf.GetInstanceNameStringId(instId);
if (stringId != -1)
m_name = lwf.data.strings[stringId];
}
}
TextRenderer textRenderer =
lwf.rendererFactory.ConstructText(lwf, objId, this);
string t = null;
if (text.stringId != -1)
t = lwf.data.strings[text.stringId];
if (text.nameStringId == -1 && string.IsNullOrEmpty(name)) {
if (text.stringId != -1)
textRenderer.SetText(t);
} else {
lwf.SetTextRenderer(p.GetFullName(), name, t, textRenderer);
}
m_renderer = textRenderer;
}
开发者ID:yonekawa,项目名称:lwf,代码行数:32,代码来源:lwf_text.cs
示例5: enterFrameCallback
void enterFrameCallback( LWF.Movie movie )
{
if (movie.currentFrame == movie.totalFrames
|| !movie.playing) {
message += movie.GetFullName() + " is done \n";
lwf.rootMovie.DetachMovie( movie );
}
}
开发者ID:BenoitLafont,项目名称:lwf-demo,代码行数:9,代码来源:LWFSampleObject.cs
示例6: TextMeshRenderer
public TextMeshRenderer(LWF lwf, TextContext context) : base(lwf, context)
{
m_mesh = new Mesh();
m_matrix = new Matrix4x4();
m_renderMatrix = new Matrix4x4();
m_colorMult = new UnityEngine.Color();
m_colorAdd = new UnityEngine.Color();
m_color = new Color32();
}
开发者ID:DelSystem32,项目名称:lwf,代码行数:9,代码来源:lwf_drawmesh_text.cs
示例7: TextMeshRenderer
public TextMeshRenderer(LWF lwf, UnityRenderer.TextContext context)
: base(lwf, context)
{
m_matrix = new Matrix(0, 0, 0, 0, 0, 0);
m_matrixForRender = new Matrix4x4();
m_colorMult = new UnityEngine.Color();
m_colorAdd = new UnityEngine.Color();
m_color = new Color32();
m_z = -1;
}
开发者ID:rayyee,项目名称:lwf,代码行数:10,代码来源:lwf_combinedmesh_text.cs
示例8: ObjectContainer
public ObjectContainer(
LWFObject lo, LWF.Object o, int h, int d, int ri, int rc, int ro)
{
lwfObject = lo;
obj = o;
hierarchy = h;
depth = d;
renderingIndex = ri;
renderingCount = rc;
renderingOffset = ro;
objects = new Dictionary<int, ObjectContainer>();
}
开发者ID:KitoHo,项目名称:lwf,代码行数:12,代码来源:LWFObjectInspector.cs
示例9: DrawInfo
void DrawInfo(ObjectContainer container, LWF.Object obj)
{
LWF.Matrix m = obj.matrix;
EditorGUILayout.LabelField("Matrix", string.Format(
"(sx:{0}, sy:{1}, k0:{2}, k1:{3}, tx:{4}, ty:{5}) ri:{6} rc:{7}",
m.scaleX, m.scaleY, m.skew0, m.skew1, m.translateX, m.translateY,
container.renderingIndex, container.renderingCount));
LWF.ColorTransform c = obj.colorTransform;
EditorGUILayout.LabelField("ColorTransform",
string.Format("multi:(r:{0},g:{1},b:{2},a:{3}) " +
"add:(r:{4},g:{5},b:{6},a:{7})",
c.multi.red, c.multi.green, c.multi.blue, c.multi.alpha,
c.add.red, c.add.green, c.add.blue, c.add.alpha));
}
开发者ID:KitoHo,项目名称:lwf,代码行数:15,代码来源:LWFObjectInspector.cs
示例10: RendererFactoryArguments
public RendererFactoryArguments(LWF.Data d, GameObject gObj, float zOff,
float zR, int rQOff, bool uAC, Camera cam, string texturePrfx,
string fontPrfx, TextureLoader textureLdr, TextureUnloader textureUnldr)
{
data = d;
gameObject = gObj;
zOffset = zOff;
zRate = zR;
renderQueueOffset = rQOff;
useAdditionalColor = uAC;
camera = cam;
texturePrefix = texturePrfx;
fontPrefix = fontPrfx;
textureLoader = textureLdr;
textureUnloader = textureUnldr;
}
开发者ID:pravusjif,项目名称:PravusUnityTests,代码行数:16,代码来源:LWFObject.cs
示例11: DrawButton
void DrawButton(LWF.Button button, Factory factory)
{
Matrix4x4 savedMatrix = GUI.matrix;
Color savedColor = GUI.color;
factory.ConvertMatrix(ref matrix, button.matrix, 0, button.height);
Factory.MultiplyMatrix(ref renderMatrix,
factory.gameObject.transform.localToWorldMatrix, matrix);
Camera camera = factory.camera;
Matrix4x4 m = renderMatrix;
Vector2 lt = GUIUtility.ScreenToGUIPoint(camera.WorldToScreenPoint(
m.MultiplyPoint(new Vector3(0, button.height))));
Vector2 rt = GUIUtility.ScreenToGUIPoint(camera.WorldToScreenPoint(
m.MultiplyPoint(new Vector3(button.width, button.height))));
Vector2 ld = GUIUtility.ScreenToGUIPoint(camera.WorldToScreenPoint(
m.MultiplyPoint(new Vector3(0, 0))));
float dx = rt.x - lt.x;
float dy = rt.y - lt.y;
float w = Mathf.Sqrt(dx * dx + dy * dy);
dx = ld.x - lt.x;
dy = ld.y - lt.y;
float h = Mathf.Sqrt(dx * dx + dy * dy);
float angle =
Mathf.Atan2(rt.x - lt.x, rt.y - lt.y) * Mathf.Rad2Deg - 90;
lt.y = Screen.height - lt.y;
GUIUtility.RotateAroundPivot(angle, lt);
GUI.color = button == button.lwf.focus ?
LWFObjectInspector.focusButtonColor :
LWFObjectInspector.buttonColor;
GUI.DrawTexture(new Rect(lt.x, lt.y, w, h), texture);
GUI.matrix = savedMatrix;
GUI.color = savedColor;
}
开发者ID:BenoitLafont,项目名称:lwf-demo,代码行数:37,代码来源:LWFObjectInspector.cs
示例12: ConstructText
public override TextRenderer ConstructText(LWF lwf, int objectId, Text text)
{
return new TextMeshRenderer(lwf, m_textContexts[objectId]);
}
开发者ID:rayyee,项目名称:lwf,代码行数:4,代码来源:lwf_combinedmesh_factory.cs
示例13: BitmapRenderer
public BitmapRenderer(LWF lwf, BitmapContext context)
: base(lwf)
{
m_context = context;
m_property = new MaterialPropertyBlock();
m_matrix = new Matrix4x4();
m_renderMatrix = new Matrix4x4();
m_colorMult = new UnityEngine.Color();
#if LWF_USE_ADDITIONALCOLOR
m_colorAdd = new UnityEngine.Color();
#endif
}
开发者ID:BenoitLafont,项目名称:lwf-demo,代码行数:12,代码来源:lwf_drawmesh_bitmap.cs
示例14: BeginRender
public override void BeginRender(LWF lwf)
{
base.BeginRender(lwf);
parent = null;
var lwfParent = lwf.GetParent();
if (lwfParent != null)
parent = lwfParent.rendererFactory as Factory;
if (parent != null)
return;
updateCount = lwf.updateCount;
meshComponentNo = -1;
currentMeshComponent = null;
}
开发者ID:rayyee,项目名称:lwf,代码行数:15,代码来源:lwf_combinedmesh_factory.cs
示例15: EndRender
public override void EndRender(LWF lwf)
{
base.EndRender(lwf);
if (parent != null)
return;
if (currentMeshComponent == null) {
for (int i = 0; i <= usedMeshComponentNo; ++i)
meshComponents[i].Disable();
usedMeshComponentNo = -1;
return;
}
for (int i = 0; i <= meshComponentNo; ++i)
meshComponents[i].UpdateMesh();
for (int i = meshComponentNo + 1; i <= usedMeshComponentNo; ++i)
meshComponents[i].Disable();
usedMeshComponentNo = meshComponentNo;
}
开发者ID:rayyee,项目名称:lwf,代码行数:21,代码来源:lwf_combinedmesh_factory.cs
示例16: EndRender
public virtual void EndRender(LWF lwf)
{
}
开发者ID:rayyee,项目名称:lwf,代码行数:3,代码来源:lwf_unity_factory.cs
示例17: TextRenderer
public TextRenderer(LWF lwf, TextContext context)
: base(lwf)
{
m_context = context;
m_matrix = new Matrix4x4();
m_renderMatrix = new Matrix4x4();
m_colorMult = new UnityEngine.Color();
#if LWF_USE_ADDITIONALCOLOR
m_colorAdd = new UnityEngine.Color();
#endif
if (m_context != null && m_context.systemFontRenderer != null) {
ISystemFontRenderer.Parameter p =
context.systemFontRendererParameter;
float scale = lwf.scaleByStage;
m_context.systemFontRenderer.Init(
p.mSize * scale,
p.mWidth * scale,
p.mHeight * scale,
p.mStyle,
p.mAlign,
p.mVerticalAlign,
p.mLineSpacing * scale,
p.mLetterSpacing * scale,
p.mLeftMargin * scale,
p.mRightMargin * scale);
}
}
开发者ID:99corps,项目名称:lwf,代码行数:27,代码来源:lwf_unity_text.cs
示例18: Init
public virtual void Init(LWF lwf)
{
lwf.scaleByStage = Screen.height / lwf.height;
}
开发者ID:rayyee,项目名称:lwf,代码行数:4,代码来源:lwf_unity_factory.cs
示例19: BeginRender
public virtual void BeginRender(LWF lwf)
{
}
开发者ID:rayyee,项目名称:lwf,代码行数:3,代码来源:lwf_unity_factory.cs
示例20: ConstructParticle
public virtual Renderer ConstructParticle(LWF lwf,
int objectId, Particle particle)
{
return null;
}
开发者ID:rayyee,项目名称:lwf,代码行数:5,代码来源:lwf_unity_factory.cs
注:本文中的LWF类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论