本文整理汇总了C#中Fighter.CharName方法的典型用法代码示例。如果您正苦于以下问题:C# Fighter.CharName方法的具体用法?C# Fighter.CharName怎么用?C# Fighter.CharName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fighter
的用法示例。
在下文中一共展示了Fighter.CharName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AttackDetect
//.........这里部分代码省略.........
if(aBox.noHit==false){
//if(plr.CharName().CompareTo("PsySword")==0)
// int d2s=2;//checkpt
spBox=new SPoint[aBox.iLength][];
for(int i=0;i<aBox.iLength;i++)
spBox[i]=new SPoint[aBox.jLength[i]];
aBox.FetchSPArr(spBox);
if(ClashCheck(plr, spBox, aBox.atkAng)){
return;
}
numPoly=aBox.iLength;
bool hitCheck = false;
for(pInd=0;pInd<numPoly;pInd++){//iterate per poly
hitflag=true;
atkLen = aBox.GetJlength(pInd);
for(int j = 0; j < atkLen; j++)
if(!CheckAxis(aBox.aVtx[pInd][j].pos, aBox.atkAng[pInd][j], plBox, spBox[pInd], hbLen, aBox.GetJlength(pInd)) ) //no axis intersection
hitflag = false;
if(hitflag)//test on the axis of the player hit box to confirm
for(int j = 0; j < 4; j++)
if(!CheckAxis(plBox[j], plAng[j], plBox, spBox[pInd], hbLen, aBox.GetJlength(pInd))) //no axis intersection
hitflag = false;
if(hitflag)
hitCheck=true;
}
hitflag=hitCheck;
//log.str(std::string());
/* for(int i=0;i<aBox.iLength;i++){//tidy up
if(!aBox.noHit)
delete [] spBox[i];
}
if(aBox.iLength==0){
int ee = 2;
//log.str(std::string());
}
else if(!aBox.noHit){//make sure it was hit
if(aBox.iLength>1)
delete [] spBox;
else
delete spBox;
spBox=NULL;
}*/
}else
hitflag=false;//abandon
if(hitflag){
AttkData retOb = new AttkData(aBox.GetJlength(t));//initilize for holding vals
Attack(plr, t, aBox, retOb);
if(!retOb.noHit){
if(debugModeOn){
if(multiHitFlag)
hitText = CharName() + " multi-hit\r\n" + plr.CharName() + "!";
else
hitText = CharName() + " hit \r\n" + plr.CharName() + "!";
ConsoleLog(hitText);
}
plr.GetHit(retOb);
if((cons!=null)&&(!multiHitFlag)&&(retOb!=null))
cons.PostHit(retOb.GetSPArr(), retOb.curInd, retOb.aBds[0], retOb.attLen, retOb.pBds, retOb.GetConOrigin(), retOb.GetConInter());
multiHitFlag=true;
t=il;//force exit; one track hit
}
}
}
}
}
}
//seems the ideal place to determine pushback
//if the difference in z is less than their average width
if((Mathf.Abs(plr.GetPos().x-GetPos().x) < (plr.stats.size.x+stats.size.x)/2 )
&&(Mathf.Abs(plr.GetPos().y-GetPos().y) < (plr.stats.size.y+stats.size.y)/2)
&&(!fHelper.airborne)&&(!plr.fHelper.airborne))
if(plr.GetPos().x-GetPos().x>0){
stats.motion.move.x-=0.1f;
plr.stats.motion.move.x+=0.1f;}
else{
stats.motion.move.x+=0.1f;
plr.stats.motion.move.x-=0.1f;}
//prob at a second case here for seren sword
// if(plr.CharName().CompareTo("Serenity")==0){
// AttackDetect(plr.GetFamiliar());
// }
if (fHelper.atkType == DATK) {
if ((rightLip != 0) && (stats.motion.pos.x < rightLip)) {
stats.motion.vel.x = 0;
stats.walk.gndSpeed = 0;
} else if ((leftLip != 0) && (stats.motion.pos.x > leftLip)) {
stats.motion.vel.x = 0;
stats.walk.gndSpeed = 0;
}
}
}