void DisableComponents()
        {
            canMove = false;
            GetComponent <Rigidbody2D>().velocity = Vector2.zero;

            TileMapMovement tileMapMovement = GetComponent <TileMapMovement>();

            tileMapMovement.lockMovement       = true;
            tileMapMovement.enabled            = false;
            GetComponent <Feeder>().enabled    = false;
            GetComponent <Harvester>().enabled = false;
            GetComponent <Animator>().enabled  = false;
        }
Exemple #2
0
 void Awake()
 {
     _behaviour       = GetComponent <BehaviourController>();
     _animator        = GetComponent <Animator>();
     _tileMapMovement = GetComponent <TileMapMovement>();
 }