private void Awake()
 {
     movePlaceable = FindObjectOfType <MovePlaceable>();
     inventory     = FindObjectOfType <Inventory>();
     objectPooler  = FindObjectOfType <ObjectPooler>();
     toolHandler   = FindObjectOfType <ToolHandler>();
 }
示例#2
0
        protected virtual void Awake()
        {
            if (xDim % 2 == 0 || yDim % 2 == 0)
            {
                Debug.LogError("Center node cannot be found with even dimensions");
            }
            sprite        = GetComponent <SpriteRenderer>();
            movePlaceable = FindObjectOfType <MovePlaceable>();
            player        = FindObjectOfType <PlayerController>();
            inventory     = FindObjectOfType <Inventory>();
            nodeGrid      = FindObjectOfType <NodeGrid>();

            InitColors();
        }
 private void Awake()
 {
     toolHandler   = FindObjectOfType <ToolHandler>();
     movePlaceable = GetComponent <MovePlaceable>();
 }