Beispiel #1
0
    private void Start()
    {
        rend       = GetComponent <Renderer>();
        startColor = rend.material.color;

        buildManager   = BuildManager.instance;
        nodeSensorData = GetComponent <NodeSensorData>();
    }
Beispiel #2
0
    private void Start()
    {
        x = y = -1;
        var parent = GameObject.Find("Nodes");

        nodes = new Dictionary <Tuple <int, int>, Node>();
        shop  = GameObject.Find("Shop").GetComponent <Shop>();
        foreach (Transform row in parent.transform)
        {
            foreach (Transform child in row)
            {
                NodeSensorData nodeSensorData = child.gameObject.GetComponent <NodeSensorData>();
                Node           node           = child.gameObject.GetComponent <Node>();
                nodes.Add(new Tuple <int, int>(nodeSensorData.X, nodeSensorData.Y), node);
            }
        }
    }
 public bool Remove(NodeSensorData item) =>
 list.Remove(item);
 public void Add(NodeSensorData item) =>
 list.Add(item);