本文整理汇总了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);
}