Example #1
0
 public void AddDevice(BaseDeviceActions device)
 {
     if (deviceA == null)
     {
         deviceA = device;
     }
     else
     {
         deviceB = device;
         SwitchDevices();
     }
 }
Example #2
0
    private void MoveDeviceToNode(BaseDeviceActions deviceBaseAction, Node node)
    {
        Node oldNode = deviceBaseAction.GetParentNode();

        //new node settings
        node.deviceBlueprint = oldNode.deviceBlueprint;
        node.device          = oldNode.device;

        //device settings
        deviceBaseAction.SetParentNode(node);
        deviceBaseAction.gameObject.transform.position = node.gameObject.transform.position;

        //old node settings
        oldNode.deviceBlueprint = null;
        oldNode.device          = null;
    }
Example #3
0
 private void ResetDevices()
 {
     deviceA = null;
     deviceB = null;
 }