本文整理匯總了C#中Character.getSkillType方法的典型用法代碼示例。如果您正苦於以下問題:C# Character.getSkillType方法的具體用法?C# Character.getSkillType怎麽用?C# Character.getSkillType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Character
的用法示例。
在下文中一共展示了Character.getSkillType方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: InitByType
static void InitByType(ref Projectile projectile, Character shooter, CharacterSkillType skillType, int subType = 0) {
int type = shooter.getSkillType(skillType);
ProjectileData data = projectileTypes[type].projectileDatas[subType];
projectile.type = type;
projectile.speed = data.speed;
projectile.existTime = data.existTime;
projectile.subType = subType;
if(type == 251 || type == 258) {
projectile.clearHit = true;
}
}
示例2: initByType
void initByType(Character shooter, CharacterSkillType skillType, int subType = 0) {
int type = shooter.getSkillType(skillType);
ProjectileData data = projectileTypes[type].projectileDatas[subType];
type = type;
speed = data.speed;
existTime = data.existTime;
subType = subType;
}
示例3: objectByType
static GameObject objectByType(Character shooter, CharacterSkillType skillType, int subType = 0) {
Modifier modifier;
int type = shooter.getSkillType(skillType);
GameObject obj = null;
Projectile pro = null;
obj = (GameObject)Instantiate(Resources.Load(projectileTypes[type].projectileDatas[subType].prefabName));
return obj;
}
示例4: rotationByType
static Quaternion rotationByType(Character shooter, Vector2 dir, CharacterSkillType skillType, int subType = 0) {
int type = shooter.getSkillType(skillType);
float angle = Vector2.Angle(new Vector2(1f, 0), dir);
angle = dir.y>0?angle:-angle;
switch(type) {
case 152:
return Quaternion.Euler(270, 0, 0);
case 200:
return Quaternion.Euler(320, 90-angle, 90);
case 204:
return Quaternion.Euler(0,0,0);
case 251:
return Quaternion.Euler(90, 0, 0);
case 258:
return Quaternion.Euler(0, 90-angle, 0);
default:
return Quaternion.Euler(0, -angle, 0);
}
}
示例5: ShootProjectile
public static Projectile ShootProjectile(Character shooter, Vector2 dir, CharacterSkillType skillType, int subType = 0) {
Vector3 pos = shooter.transform.position;
if(shooter.getSkillType(skillType) != 152) {
pos.x += dir.x * 3f;
pos.z += dir.y * 3f;
} else {
pos.x -= dir.x * 3f;
pos.z -= dir.y * 3f;
}
return ShootProjectile(shooter, dir, pos, skillType, subType);
}