public Wall() { var mesh = Game.Current.NewMesh("Wall"); _MeshTextured = new MeshStaticPart(Game.Current.NewMesh("WallTextured")); Add(_Mesh = new MeshStaticPart(mesh)); Add(new ObbCollider(mesh)); Add(_Dust = new IndependentParticlePart() { Translation = new Vector3(0, 0, -4), Sound = Game.Current.GetSound("WallStrike.wav", EffectVolume), Animation = new AnimatedQuad() { Texture = Game.Current.GetParticle("Dust.png"), FrameSize = new Size(512, 102), FirstFrame = 0, CurrentFrame = 0, FrameRate = 15, TotalFrames = 5, }, Size = new Vector2(25, 15), }); MaxScale = _DefaultMaxScale; MinScale = _DefaultMinScale; }
public Portal() { var mesh = Game.Current.NewMesh("BallTextured"); Add(_PartList[0] = new MeshStaticPart(mesh) { Texture = Game.Current.GetMaterial("BluePortal.png") }); _PartList[1] = _Collider = new ObbCollider(mesh); Add(_Collider); var receptorMesh = Game.Current.NewMesh("BallTextured"); Add(_PartList[2] = _Receptor = new MeshImmutableePart(receptorMesh) { Texture = Game.Current.GetMaterial("OrangePortal.png") }); _SoundEffect = Game.Current.GetSound("Portal.wav", EffectVolume); }