コード例 #1
0
 void ChangeState(float timeBeforeStateChange, NeptoAI nextState)
 {
     if (timer > timeBeforeStateChange)
     {
         NeptoState = nextState;
         timer      = 0;
     }
 }
コード例 #2
0
    void Fire()
    {
        Rigidbody projectileClone = Instantiate(projectile, shootPoint.position, transform.rotation) as Rigidbody;

        projectileClone.SendMessage("OriginPos", transform.position, SendMessageOptions.DontRequireReceiver);
        projectileClone.velocity = transform.forward * 20;
        shootCount++;
        shoot      = true;
        NeptoState = NeptoAI.IDLE;
    }
コード例 #3
0
 void OnCollisionEnter(Collision col)
 {
     if (col.collider.tag == "dagger")
     {
         //play Death2 anim
         //NeptoController.SetBool("isHit", true);
         NeptoController.Play("Death1");
         _rb.isKinematic = false;
         NeptoState      = NeptoAI.DEAD;
     }
     if (col.collider.tag == "Ball")
     {
         //play Death1 anim
         Debug.Log("DEAD");
         NeptoController.Play("Death2");
         _rb.isKinematic = false;
         NeptoState      = NeptoAI.DEAD;
         Destroy(col.collider.gameObject, 0.2f);
     }
 }
コード例 #4
0
ファイル: SpitFlowerAI.cs プロジェクト: Darylcxz/ANIMA-FYP
 void ChangeState(float timeBeforeStateChange, NeptoAI nextState)
 {
     if (timer > timeBeforeStateChange)
     {
         NeptoState = nextState;
         timer = 0;
     }
 }
コード例 #5
0
ファイル: SpitFlowerAI.cs プロジェクト: Darylcxz/ANIMA-FYP
    void OnCollisionEnter(Collision col)
	{
		if (col.collider.tag == "dagger")
		{
            //play Death2 anim
            //NeptoController.SetBool("isHit", true);
            NeptoController.Play("Death1");
			_rb.isKinematic = false;
			NeptoState = NeptoAI.DEAD;
		}
		if (col.collider.tag == "Ball")
		{
 			//play Death1 anim
			Debug.Log("DEAD");
            NeptoController.Play("Death2");
            _rb.isKinematic = false;
			NeptoState = NeptoAI.DEAD;
			Destroy(col.collider.gameObject, 0.2f);
		}
	}
コード例 #6
0
ファイル: BossNepto.cs プロジェクト: Darylcxz/ANIMA-FYP
 void Fire()
 {
     Rigidbody projectileClone = Instantiate(projectile, shootPoint.position, transform.rotation) as Rigidbody;
     projectileClone.SendMessage("OriginPos", transform.position,SendMessageOptions.DontRequireReceiver);
     projectileClone.velocity = transform.forward * 20;
     shootCount++;
     shoot = true;
     NeptoState = NeptoAI.IDLE;
 }