Exemplo n.º 1
0
    void Start()
    {
        offlinePly = GameObject.FindGameObjectWithTag("OfflineStats").GetComponent <OfflinePlayerStats>();
        rg         = GetComponent <Rigidbody>();
        aiAnim     = GetComponent <Animator>();

        totalDesiredFleeVel = Vector3.zero;
        totalDesiredSeekVel = Vector3.zero;
    }
Exemplo n.º 2
0
    private void Awake()
    {
        playerAnim     = GetComponent <Animator>();
        coolDownImage  = GameObject.FindGameObjectWithTag("DropAbility");
        coolDown       = 0;
        playerBody     = gameObject.GetComponent <Rigidbody>();
        playerCollider = gameObject.GetComponent <BoxCollider>();

        offlinePlyStats = GameObject.FindGameObjectWithTag("OfflineStats").GetComponent <OfflinePlayerStats>();
    }
Exemplo n.º 3
0
    void Awake()
    {
        zombieAnim    = this.gameObject.GetComponent <Animator>();
        rg            = GetComponent <Rigidbody>();
        delayedDamage = 2;
        timeToAttack  = 2;
        attacking     = false;

        offZomPool = GameObject.FindGameObjectWithTag("OfflineZombieSpawner").GetComponent <OfflineZombiePool>();
        offlinePly = GameObject.FindGameObjectWithTag("OfflineStats").GetComponent <OfflinePlayerStats>();

        players      = GameObject.FindGameObjectsWithTag("Player").OrderBy(go => go.name).ToArray();
        randomTarget = Random.Range(0, players.Length);
    }