本文整理汇总了C#中Character.GetSkillCastTime方法的典型用法代码示例。如果您正苦于以下问题:C# Character.GetSkillCastTime方法的具体用法?C# Character.GetSkillCastTime怎么用?C# Character.GetSkillCastTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character
的用法示例。
在下文中一共展示了Character.GetSkillCastTime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Changed
public bool Changed(Character c, int hudID)
{
bool change = false;
if(HUDElementType.STATUS.Equals(this.type) &&
c.status[this.statusID].lastValueHUD[hudID] != c.status[this.statusID].GetValue())
{
change = true;
}
else if(HUDElementType.TIMEBAR.Equals(this.type) &&
c.timeBarHUD[hudID] != c.timeBar)
{
change = true;
}
else if(HUDElementType.USED_TIMEBAR.Equals(this.type) &&
c.usedTimeBarHUD[hudID] != c.usedTimeBar)
{
change = true;
}
else if(HUDElementType.CASTTIME.Equals(this.type) &&
c.castTimeHUD[hudID] != c.GetSkillCastTime())
{
change = true;
}
else if(HUDElementType.EFFECT.Equals(this.type) && c.effectHUD)
{
change = true;
}
else if(HUDElementType.VARIABLE.Equals(this.type) && this.lastVarText != this.GetVariableText())
{
change = true;
}
return change;
}
示例2: ShowElement
//.........这里部分代码省略.........
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) && 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;
示例3: AddTexture
//.........这里部分代码省略.........
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.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;