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


C# Character.getSkillType方法代码示例

本文整理汇总了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;
		}
	}
开发者ID:HandsomeCharming,项目名称:Free_Lunch,代码行数:13,代码来源:Projectile.cs

示例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;
	}
开发者ID:HandsomeCharming,项目名称:Free_Lunch,代码行数:9,代码来源:Projectile.cs

示例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;
	}
开发者ID:HandsomeCharming,项目名称:Free_Lunch,代码行数:10,代码来源:Projectile.cs

示例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);
		}
			
	}
开发者ID:HandsomeCharming,项目名称:Free_Lunch,代码行数:22,代码来源:Projectile.cs

示例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);
	}
开发者ID:HandsomeCharming,项目名称:Free_Lunch,代码行数:11,代码来源:Projectile.cs


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