示例#1
0
	public void takeDamage(statScript attacker){
		float damage;
	
		if (Random.Range (0, 100) > 75 + attacker.AGI - AGI)
			return ;
		damage = Random.Range(attacker.minDamage, attacker.maxDamage) * Mathf.Clamp(1.0f - Armor / 200.0f, 0.0f, 1.0f);
		HP -= (int)damage;
		return ;
	}
示例#2
0
	void Awake () {
		state = State.IDLE;
		_player = GameObject.Find ("Maya");
		_agent = GetComponent<NavMeshAgent>();
		_animator = GetComponent<Animator> ();
		_stats = GetComponent<statScript> ();
		_stats.setSpwanedStats(_player.GetComponent<statScript>().level);
		_upToDate = true;
	}
示例#3
0
	void Awake()
	{
		instance = this.gameObject.GetComponent<playerScript>();
		state = State.IDLE;
		_upToDate = true;
		target = null;
		_agent = GetComponent<NavMeshAgent>();
		_animator = GetComponent<Animator>();
		stats = GetComponent<statScript>();
	}
示例#4
0
文件: getMP.cs 项目: jsaglio42/rush01
	void Start () {
		_stats = GameObject.Find ("Maya").GetComponent<statScript> ();
		_text = GetComponent<Text> ();
	}