public C_DrawSeasonUI(C_SeasonState seasonState, float depth = 100, float alpha = 1) { this.seasonState = seasonState; this.alpha = alpha; this.depth = depth; graphicsDevice = Renderer_2D.GetGraphicsDevice(); effect = ResouceManager.GetEffect("CircleBar").Clone(); effect.Parameters["WorldViewProjection"].SetValue(Camera2D.GetView() * Camera2D.GetProjection()); effect.CurrentTechnique = effect.Techniques["Technique1"]; vertexPositions = new VertexPositionTexture[4]; }
public C_DrawRouteEffect(float alpha = 1, float depth = 16) { this.alpha = alpha; this.depth = depth; imageNames = new List <string>(); imageEffects = new List <ImageEffect>(); creatTimer = new Timer(0.1f); creatTimer.Dt = new Timer.timerDelegate(CreatEffectOne); creatNO = 0; size = Vector2.One; graphicsDevice = Renderer_2D.GetGraphicsDevice(); }
public C_DrawAnimetion(Vector2 animSpriteSize, float depth = 1, float alpha = 1) { this.alpha = alpha; this.depth = depth; size = 1; animDatas = new Dictionary <string, AnimData>(); this.animSpriteSize = animSpriteSize; graphicsDevice = Renderer_2D.GetGraphicsDevice(); vertexPositions = new VertexPositionTexture[4]; shadeTimer = new Timer(3); isShaderOn = false; }
public C_DrawIceRoute(Vector2 startPosition, Vector2 endPosition, float alpha = 1, float depth = 16) { this.alpha = alpha; this.depth = depth; this.startPosition = startPosition; this.endPosition = endPosition; imageNames = new List <string>(); imageEffects = new List <ImageEffect>(); creatTimer = new Timer(0.1f); creatTimer.Dt = new Timer.timerDelegate(CreatEffectOne); creatNO = 0; aliveSecond = Parameter.IceRouteTime; graphicsDevice = Renderer_2D.GetGraphicsDevice(); RegisterImage("P_Ice_", 5); SetState(0.08f, 0, -20); }
public C_DrawWithShader(string imgName, string maskName, Vector2 offsetPosition, float depth = 1, float alpha = 1) { this.imgName = imgName; this.maskName = maskName; this.offsetPosition = offsetPosition; this.alpha = alpha; this.depth = depth; graphicsDevice = Renderer_2D.GetGraphicsDevice(); effect = ResouceManager.GetEffect("MaskShader").Clone(); effect.Parameters["theTexture"].SetValue(ResouceManager.GetTexture(imgName)); effect.Parameters["theMask"].SetValue(ResouceManager.GetTexture(maskName)); effect.CurrentTechnique = effect.Techniques["Technique1"]; effect.Parameters["Color"].SetValue(new float[4] { 0.5f, 0, 0, 0.5f }); vertexPositions = new VertexPositionTexture[4]; timer = new Timer(5); }
public ImageEffect(string name, Vector2 position, float aliveSecond) { this.name = name; this.position = position; alpha = 0; aliveTimer = new Timer(aliveSecond); isDisappear = false; imageSize = ResouceManager.GetTextureSize(name); rect = new Rectangle(0, 0, (int)imageSize.X, (int)imageSize.Y); size = Vector2.One; graphicsDevice = Renderer_2D.GetGraphicsDevice(); effect = ResouceManager.GetEffect("MaskShader").Clone(); effect.Parameters["theTexture"].SetValue(ResouceManager.GetTexture(name)); effect.Parameters["theMask"].SetValue(ResouceManager.GetTexture("ShadeMask_LR")); effect.CurrentTechnique = effect.Techniques["Technique1"]; effect.Parameters["Color"].SetValue(new float[4] { 0.5f, 0, 0, 0.5f }); effect.Parameters["WorldViewProjection"].SetValue(Camera2D.GetView() * Camera2D.GetProjection()); vertexPositions = new VertexPositionTexture[4]; }