Esempio n. 1
0
    public void Respawn()
    {
        int id = Random.Range(0, gameManager.respawnPoints.Length);

        GetComponent <NavMeshAgent>().Warp(gameManager.respawnPoints[id].transform.position);
        bOT_Profile.isDead = false;
        currState          = BOT_FStateMachineRespawn.Stop;
    }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     currState   = BOT_FStateMachineRespawn.Stop;
     bOT_Profile = GetComponent <BOT_Profile>();
     gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();
     mesh        = transform.Find("Player_3PNew:Character_Unwrapped:Egor");
     bOT_Manager = GetComponent <BOT_Manager>();
 }
Esempio n. 3
0
    public void RespawnTimer()
    {
        curTimer -= Time.deltaTime;

        if (curTimer < 0)
        {
            currState = BOT_FStateMachineRespawn.Respawn;
        }
    }
Esempio n. 4
0
    public void Death()
    {
        mesh.gameObject.SetActive(false);
        bOT_Manager.currentStateAttack = BOT_Manager.BOT_FStateMachineAttack.Stop;
        bOT_Manager.currentStateWander = BOT_Manager.BOT_FStateMachineWander.Stop;

        GetComponent <NavMeshAgent>().Warp(gameObject.transform.position = new Vector3(99999, 99999, 99999));

        curTimer           = timer;
        currState          = BOT_FStateMachineRespawn.RespawnTimer;
        bOT_Profile.isDead = true;
    }