当前位置: 首页>>代码示例>>C#>>正文


C# Character.GetSkillCastTimeMax方法代码示例

本文整理汇总了C#中Character.GetSkillCastTimeMax方法的典型用法代码示例。如果您正苦于以下问题:C# Character.GetSkillCastTimeMax方法的具体用法?C# Character.GetSkillCastTimeMax怎么用?C# Character.GetSkillCastTimeMax使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Character的用法示例。


在下文中一共展示了Character.GetSkillCastTimeMax方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowElement


//.........这里部分代码省略.........
                }
                guiStyle.normal.textColor = DataHolder.Color(this.textColor);
                GUI.Label(this.bounds, txt, guiStyle);
            }
            else if(HUDDisplayType.BAR.Equals(this.displayType) && c.status[this.statusID].IsConsumable())
            {
                float v1 = c.status[this.statusID].GetValue();
                float v2 = c.status[c.status[this.statusID].maxStatus].GetValue();
                v2 /= 100;
                v1 /= v2;
                GUI.DrawTexture(new Rect(this.bounds.x, this.bounds.y, this.bounds.width*v1/100, this.bounds.height),
                        this.GetImage(), this.scaleMode, this.alphaBlend, this.imageAspect);
            }
        }
        else if(HUDElementType.TIMEBAR.Equals(this.type) ||
            HUDElementType.USED_TIMEBAR.Equals(this.type) ||
            HUDElementType.CASTTIME.Equals(this.type))
        {
            float v1 = 0;
            float v2 = 0;
            if(HUDElementType.TIMEBAR.Equals(this.type))
            {
                v1 = c.timeBar;
                v2 = DataHolder.BattleSystem().maxTimebar;
            }
            else if(HUDElementType.USED_TIMEBAR.Equals(this.type))
            {
                v1 = c.usedTimeBar;
                v2 = DataHolder.BattleSystem().maxTimebar;
            }
            else if(HUDElementType.CASTTIME.Equals(this.type))
            {
                v1 = c.GetSkillCastTime();
                v2 = c.GetSkillCastTimeMax();
            }
            if(HUDDisplayType.TEXT.Equals(this.displayType))
            {
                string txt = ((int)v1).ToString();
                if(this.showShadow)
                {
                    guiStyle.normal.textColor = DataHolder.Color(this.shadowColor);
                    GUI.Label(
                        new Rect(this.bounds.x + this.shadowOffset.x, this.bounds.y + this.shadowOffset.y,
                                this.bounds.width, this.bounds.height), txt, guiStyle);
                }
                guiStyle.normal.textColor = DataHolder.Color(this.textColor);
                GUI.Label(this.bounds, txt, guiStyle);
            }
            else if(HUDDisplayType.BAR.Equals(this.displayType) && v2 > 0)
            {
                v2 /= 100;
                v1 /= v2;
                GUI.DrawTexture(new Rect(this.bounds.x, this.bounds.y, this.bounds.width*v1/100, this.bounds.height),
                        this.GetImage(), this.scaleMode, this.alphaBlend, this.imageAspect);
            }
        }
        else if(HUDElementType.EFFECT.Equals(this.type))
        {
            int maxView = this.rows*this.columns;
            float cellWidth = this.bounds.width;
            float cellHeight = this.bounds.height;
            cellWidth -= this.spacing*(this.columns-1);
            cellHeight -= this.spacing*(this.rows-1);
            cellWidth /= this.columns;
            cellHeight /= this.rows;
            int currentColumn = 0;
开发者ID:hughrogers,项目名称:RPGQuest,代码行数:67,代码来源:HUD.cs

示例2: AddTexture


//.........这里部分代码省略.........

                this.GetImage();
                if(this.texture != null)
                {
                    Rect b = new Rect(this.bounds.x, this.bounds.y, this.bounds.width*v1/100, this.bounds.height);
                    Vector2 scaledSize = TextureDrawer.GetScaledSize(this.texture, b, this.scaleMode);
                    hudTexture = TextureDrawer.AddTexture(hudTexture,
                            new Rect(b.x+pos.x, pos.y-b.y-scaledSize.y, scaledSize.x, scaledSize.y),
                            TextureDrawer.GetScaledPixels(this.texture, scaledSize, b, this.scaleMode));
                }
            }
        }
        else if(HUDElementType.TIMEBAR.Equals(this.type) ||
            HUDElementType.USED_TIMEBAR.Equals(this.type) ||
            HUDElementType.CASTTIME.Equals(this.type))
        {
            float v1 = 0;
            float v2 = 0;
            if(HUDElementType.TIMEBAR.Equals(this.type))
            {
                v1 = c.timeBar;
                v2 = DataHolder.BattleSystem().maxTimebar;
                c.timeBarHUD[hudID] = v1;
            }
            else if(HUDElementType.USED_TIMEBAR.Equals(this.type))
            {
                v1 = c.usedTimeBar;
                v2 = DataHolder.BattleSystem().maxTimebar;
                c.usedTimeBarHUD[hudID] = v1;
            }
            else if(HUDElementType.CASTTIME.Equals(this.type))
            {
                v1 = c.GetSkillCastTime();
                v2 = c.GetSkillCastTimeMax();
                c.castTimeHUD[hudID] = v1;
            }
            if(HUDDisplayType.TEXT.Equals(this.displayType))
            {
                string txt = ((int)v1).ToString();
                hudTexture = font.AddTextTexture(hudTexture, txt,
                        this.GetAnchoredRect(pos, font.GetTextSize(txt), this.bounds),
                        DataHolder.Color(this.textColor), DataHolder.Color(this.shadowColor), 0,
                        Vector2.zero, this.showShadow, this.shadowOffset, false);
            }
            else if(HUDDisplayType.BAR.Equals(this.displayType) && v2 > 0)
            {
                v2 /= 100;
                v1 /= v2;

                this.GetImage();
                if(this.texture != null)
                {
                    Rect b = new Rect(this.bounds.x, this.bounds.y, this.bounds.width*v1/100, this.bounds.height);
                    Vector2 scaledSize = TextureDrawer.GetScaledSize(this.texture, b, this.scaleMode);
                    hudTexture = TextureDrawer.AddTexture(hudTexture,
                            new Rect(b.x+pos.x, pos.y-b.y-scaledSize.y, scaledSize.x, scaledSize.y),
                            TextureDrawer.GetScaledPixels(this.texture, scaledSize, b, this.scaleMode));
                }
            }
        }
        else if(HUDElementType.EFFECT.Equals(this.type))
        {
            c.effectHUD = false;
            int maxView = this.rows*this.columns;
            float cellWidth = this.bounds.width;
            float cellHeight = this.bounds.height;
开发者ID:hughrogers,项目名称:RPGQuest,代码行数:67,代码来源:HUD.cs


注:本文中的Character.GetSkillCastTimeMax方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。