void Start()
 {
     mPlayerObject = GameObject.FindGameObjectWithTag("Player");
     tileAutomata  = GameObject.FindGameObjectWithTag("TileAutomata").GetComponent <TileAutomata>();
     if (mPlayerObject != null)
     {
         lastKnownPlayerLocation = mPlayerObject.transform.position;
     }
     if (directionsToPlayer == null && mPlayerObject != null)
     {
         this.directionsToPlayer = tileAutomata.getShortestPath(transform.position.x, transform.position.y, mPlayerObject.transform.position.x, mPlayerObject.transform.position.y);
     }
     timer = Timer.Register(2f, () => updatePlayerLocation(), isLooped: true);
     //Debug.Log(tileAutomata.name);
     m_Animator = GetComponent <Animator>();
 }
    // Start is called before the first frame update
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject)
            ;
        }

        DontDestroyOnLoad(gameObject);

        board = GetComponent <TileAutomata>();
        InitGame();
    }
 void Start()
 {
     tileAutomata = FindObjectOfType <TileAutomata>();
 }