本文整理汇总了C#中ICore.GetName方法的典型用法代码示例。如果您正苦于以下问题:C# ICore.GetName方法的具体用法?C# ICore.GetName怎么用?C# ICore.GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICore
的用法示例。
在下文中一共展示了ICore.GetName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Trigger
public Trigger(ICore core)
: base(core)
{
this.core = core;
Name = core.GetName<Trigger>();
Color = new MyColor(0, 255, 0);
mesh = core.Scene.CreateMeshBuilder();
mesh.CreateBox(1f, 1f, 1f, false);
mesh.SetColor(core.Globals.RGBA(Color.R / 255f, Color.G / 255f, Color.B / 255f, 1));
mesh.SetLightingMode(CONST_TV_LIGHTINGMODE.TV_LIGHTING_MANAGED);
mesh.SetAlphaTest(true);
mesh.SetBlendingMode(CONST_TV_BLENDINGMODE.TV_BLEND_ADD);
UniqueId = mesh.GetMeshName();
}
示例2: Sound
public Sound(ICore core, string fileName)
: base(core)
{
FileName = fileName;
Name = core.GetName<Sound>();
TV_3DVECTOR position = Core.Camera.GetFrontPosition(10.0f);
Position = new VECTOR3D(position.x, position.y, position.z);
Is3D = false;
mySound = core.SoundFactory.Load(fileName, Is3D);
core.SoundFactory.StopAllSounds();
mesh = core.Scene.CreateBillboard(Helpers.GetTextureFromResource(core, Resources.sound), position.x, position.y,
position.z, 1.0f, 1.0f);
mesh.SetAlphaTest(true);
Stopped = true;
Loop = false;
volume = 100;
UniqueId = mesh.GetMeshName();
}
示例3: Water
public Water(ICore core)
: base(core)
{
this.core = core;
ReflectRS = core.Scene.CreateRenderSurfaceEx(-1, -1, CONST_TV_RENDERSURFACEFORMAT.TV_TEXTUREFORMAT_DEFAULT, true, true, 1);
ReflectRS.SetBackgroundColor(core.Globals.RGBA(0f, 0f, 0.1906f, 1f));
RefractRS = core.Scene.CreateRenderSurfaceEx(-1, -1, CONST_TV_RENDERSURFACEFORMAT.TV_TEXTUREFORMAT_DEFAULT, true, true, 1);
RefractRS.SetBackgroundColor(core.Globals.RGBA(0f, 0f, 0.1906f, 1f));
mesh = core.Scene.CreateMeshBuilder();
mesh.AddFloor(Helpers.GetDUDVTextureFromResource(core, Resources.water), -256, -256, 256, 256, -3, 2, 2);
plane = new TV_PLANE(core.Globals.Vector3(0, 1, 0), 3f);
core.GraphicEffect.SetWaterReflection(mesh, ReflectRS, RefractRS, 0, plane);
Name = core.GetName<Water>();
UniqueId = mesh.GetMeshName();
}
示例4: Particle
//[Browsable(false)]
//public override VECTOR3D Rotation { get; set; }
public Particle(ICore core, string fileName)
: base(core)
{
this.core = core;
FileName = fileName;
Visible = true;
Name = core.GetName<Particle>();
TV_3DVECTOR position = Core.Camera.GetFrontPosition(10.0f);
Position = new VECTOR3D(position.x, position.y, position.z);
mesh = core.Scene.CreateBillboard(Helpers.GetTextureFromResource(core, Resources.particleBig), position.x, position.y,
position.z, 1.0f, 1.0f);
mesh.SetAlphaTest(true);
particle = core.Scene.CreateParticleSystem();
particle.Load(fileName);
particle.SetGlobalPosition(Position.X, Position.Y, Position.Z);
particle.SetGlobalRotation(Rotation.X, Rotation.Y, Rotation.Z);
particle.SetGlobalScale(Scale.X, Scale.Y, Scale.Z);
UniqueId = mesh.GetMeshName();
}
示例5: Mesh
public Mesh(ICore core, ProgramSettings settings, string fileName)
: base(core)
{
this.core = core;
this.settings = settings;
mass = 0f;
staticFriction = 0.9f;
kineticFriction = 0.5f;
softness = 0.1f;
bounciness = 0.1f;
materialIdx = -1;
SetMaterialToCustom();
FileName = fileName;
customTexture = string.Empty;
//Name = fileName.Split(new[] { '\\' }).Last();
PhysicsId = -1;
enableLightning = true;
Name = core.GetName<Mesh>();
string ending = fileName.Split(new[] { '\\' }).Last().ToUpper();
mesh = core.Scene.CreateMeshBuilder();
if (ending.EndsWith(Helpers.GetFileExtension(Helpers.FileFormat.TVM)))
{
mesh.LoadTVM(fileName, true, false);
}
else if (ending.EndsWith(Helpers.GetFileExtension(Helpers.FileFormat.X)))
{
mesh.LoadXFile(fileName, true, false);
}
else if (ending.EndsWith(Helpers.GetFileExtension(Helpers.FileFormat.TVA)))
{
TVActor actor = core.Scene.CreateActor();
actor.Load(fileName, true, false);
mesh = actor.GetDeformedMesh();
core.Scene.DestroyAllActors();
IsAnimated = true;
}
else
return;
mesh.EnableFrustumCulling(true, true);
mesh.ComputeNormals();
mesh.ComputeBoundings();
mesh.ComputeOctree();
mesh.SetCullMode(CONST_TV_CULLING.TV_BACK_CULL);
mesh.SetBlendingMode(CONST_TV_BLENDINGMODE.TV_BLEND_ALPHA);
mesh.SetAlphaTest(true);
mesh.SetLightingMode(CONST_TV_LIGHTINGMODE.TV_LIGHTING_MANAGED);
mesh.SetShadowCast(true, true);
lightmapIdx = mesh.GetTextureEx((int)CONST_TV_LAYER.TV_LAYER_LIGHTMAP);
textureScale = new UV(1.0f, 1.0f);
LoadTextures();
UniqueId = mesh.GetMeshName();
}