當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。