Unit.Awake C# (CSharp) Method

Awake() protected method

protected Awake ( ) : void
return void
    protected override void Awake()
    {
        base.Awake ();
        seeker = gameObject.AddComponent<Seeker> ();
        anim = gameObject.GetComponent<Animator>();
        rigbody.constraints = RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
        ent.IsUnit = true;
        ent.Range = visibility;

        // Calculem la dimensio del CharacterController
        FittedCharacterCollider();
        gameObject.layer = 11;
        gameObject.tag = "mility";
        // Asignem els components extres per al funcionament de la IA per a unitats
        //RDV = gameObject.AddComponent<SphereCollider> ();
        //RDV.radius = characterController.radius * 10;
        //RDA = gameObject.AddComponent<BoxCollider> ();
        baseMoveSpeed = 5;
    }