EnemyBase.OnEnable C# (CSharp) Method

OnEnable() public method

Called when object is enabled.
public OnEnable ( ) : void
return void
    void OnEnable()
    {
        this.objectManager = ObjectManager.GetInstance ();
        this.objectManager.AddEntity (this);
        this.onNode = this.objectManager.NodeManager.GetClosestNode (this.transform.position);
        this.SpawnNode = this.onNode;
        this.InitAttributes();
        this.transform.position = this.objectManager.NodeManager.CorrectPosition(this.transform.position);

        animator.SetTrigger("Alive");
    }