Exemplo n.º 1
0
    public virtual void Start()
    {
        canMove       = true;
        canAttack     = true;
        aiAgent       = GetComponent <AIPath>();
        AIDestination = GetComponent <AIDestinationSetter>();
        enemyManager  = FindObjectOfType <EnemyManager>();

        RandomiseTarget();

        healthAndVariables = GetComponent <HealthAndVariables>();
    }
 void Start()
 {
     ValueCheck();
     maxCharge         = charge;
     rb2d              = GetComponent <Rigidbody2D>();
     rb2d.gravityScale = 0;
     rb2d.constraints  = RigidbodyConstraints2D.FreezeRotation;
     sr        = GetComponent <SpriteRenderer>();
     anim      = GetComponent <Animator>();
     armPivot  = GameObject.Find("Arm Pivot");
     hav       = gameObject.GetComponent <HealthAndVariables>();
     _camera   = GameObject.Find("Main Camera").GetComponent <Camera>();
     maxHealth = hav.health;
 }
 // Use this for initialization
 void Start()
 {
     hav       = GetComponent <HealthAndVariables>();
     health    = hav.health;
     maxHealth = hav.health;
 }