Exemplo n.º 1
0
    public AttackState(GameObject _go)
    {
        go = _go;
        anim = _go.GetComponent<Animator>();
        ai = _go.GetComponent<ICharacterAI>();

    }
Exemplo n.º 2
0
    //public bool canAttack = false;




    public EvolAttackState(GameObject _go)
    {
        go = _go;
        agent = _go.GetComponent<NavMeshAgent>();
        anim = _go.GetComponent<Animator>();
        ai = _go.GetComponent<ICharacterAI>();

    }
Exemplo n.º 3
0
    bool changeUp = false;//agg when expect passive and vice versa



    public PatrolState(GameObject _go)
    {
        go = _go;
        ai = go.GetComponent<ICharacterAI>();
        anim = go.GetComponent<Animator>();
        rb = go.GetComponent<Rigidbody>();
        pursuitTime = 0f;

    }
Exemplo n.º 4
0
    /// <summary>
    /// 注销
    /// </summary>
    public void Release()
    {
        m_Name           = null;
        m_IconSpriteName = null;
        if (m_Weapon != null)
        {
            m_Weapon.Release();
            m_Weapon = null;
        }

        door        = null;
        m_AssetName = null;
        m_AI        = null;

        if (m_GameObject != null)
        {
            GameObject.Destroy(m_GameObject);
        }
    }
Exemplo n.º 5
0
    bool changeUp = false;//agg when expect passive and vice versa

    public EvolPatrolState(GameObject _go)
    {
        go = _go;
        ai = go.GetComponent<ICharacterAI>();
        agent = go.GetComponent<NavMeshAgent>();
        anim = go.GetComponent<Animator>();
        rb = go.GetComponent<Rigidbody>();
        path = new NavMeshPath();

		if (ai.GetTarget() != null && agent != null) {
			//NavMesh.CalculatePath (go.transform.position, ai.GetTarget().position, NavMesh.AllAreas, path);
		}

        if (agent != null)
        {
            //agent.updateRotation = false;
            //agent.updatePosition = true;
        }
        pursuitTime = 0f;

    }
Exemplo n.º 6
0
 /// <summary>
 /// 设置角色
 /// </summary>
 /// <param name="CharacterAI"></param>
 public void SetCharacterAI(ICharacterAI CharacterAI)
 {
     m_CharacterAI = CharacterAI;
 }
Exemplo n.º 7
0
 //设置CharacterAI的对象
 public void SetCharacterAI(ICharacterAI _characterAI)
 {
     characterAI = _characterAI;
 }
Exemplo n.º 8
0
 public AIStateEnemyrAttack(ICharacterAI characterAI) : base(characterAI)
 {
     StateType = ENUM_State.Attacking;
 }
Exemplo n.º 9
0
 public AIStateEnemyDead(ICharacterAI characterAI) : base(characterAI)
 {
     StateType = ENUM_State.Dead;
 }
Exemplo n.º 10
0
 public AIStateSoldierPatroll(ICharacterAI characterAI) : base(characterAI)
 {
 }
Exemplo n.º 11
0
 public AIStateEnemyIdle(ICharacterAI characterAI) : base(characterAI)
 {
     StateType = ENUM_State.Idle;
 }
Exemplo n.º 12
0
 public void SetAI(EnemyAI theAI)
 {
     m_AI = theAI;
 }
Exemplo n.º 13
0
 internal void SetCharacterAI(ICharacterAI CharacterAI)
 {
     m_AI = CharacterAI;
 }
Exemplo n.º 14
0
 public IAIState(ICharacterAI characterAI)
 {
     m_characterAI = characterAI;
 }
Exemplo n.º 15
0
	// 設定AI
	public void SetAI(ICharacterAI CharacterAI)
	{
		m_AI = CharacterAI;
	}
Exemplo n.º 16
0
 public AIStateSoldierDead(ICharacterAI characterAI) : base(characterAI)
 {
     StateType = ENUM_State.Dead;
 }
Exemplo n.º 17
0
 public AIStateEnemyChase(ICharacterAI characterAI) : base(characterAI)
 {
     StateType = ENUM_State.Chasing;
 }
Exemplo n.º 18
0
 public AIStateSoldierChase(ICharacterAI characterAI) : base(characterAI)
 {
     StateType = ENUM_State.Chasing;
 }