private void Awake() { CachedTransform = this.transform; _myImage = GetComponent <SpriteRenderer>(); if (!grid) { FindGrid(); } ; cellCoords = grid.WorldToCell(CachedTransform.position); //Debug.Log(cellCoords); MoveableObjects.Add(cellCoords, this); }
public ActionsManager( ref MoveableObjects pActableDictionary ) { // Initialize the dictionary of object ObjectsItems = pActableDictionary; }
public ActionsManager(ref MoveableObjects pActableDictionary) { // Initialize the dictionary of object ObjectsItems = pActableDictionary; }
private void OnDestroy() { MoveableObjects.Remove(cellCoords); }